/* ========================================
   HUNGRY? — DESIGN SYSTEM
   ======================================== */

:root {
    /* Colors */
    --bg-deep: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);

    --accent-primary: #ff6b35;
    --accent-secondary: #ffb347;
    --accent-gradient: linear-gradient(135deg, #ff6b35, #ff8c42, #ffb347);
    --accent-glow: rgba(255, 107, 53, 0.3);
    --accent-glow-soft: rgba(255, 107, 53, 0.12);

    --surprise-gradient: linear-gradient(135deg, #a855f7, #6366f1, #3b82f6);
    --surprise-glow: rgba(168, 85, 247, 0.3);

    --text-primary: #f0f0f5;
    --text-secondary: rgba(240, 240, 245, 0.6);
    --text-muted: rgba(240, 240, 245, 0.35);

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Typography */
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   SCREEN MANAGEMENT
   ======================================== */

.screen {
    display: none;
    min-height: 100vh;
    position: relative;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: screenIn 0.5s var(--ease-smooth);
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    width: 100%;
}

/* ========================================
   BACK BUTTON
   ======================================== */

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-xl);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.back-btn:hover {
    background: var(--bg-card-hover);
    transform: translateX(-3px);
}

/* ========================================
   HERO SECTION
   ======================================== */

#hero-section {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--bg-deep);
    overflow: hidden;
}

.hero-bg-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.4), transparent 70%);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.35), transparent 70%);
    bottom: -5%;
    left: -10%;
    animation-delay: -3s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.3), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -25px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.hero-brand-corner {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    animation: cornerSlideIn 0.8s var(--ease-smooth);
}

.hero-user-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes cornerSlideIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.logo-icon {
    font-size: 2.2rem;
    animation: plateWiggle 3s ease-in-out infinite;
}

.hero-logo-img {
    height: 38px;
    width: 38px;
    object-fit: cover;
    border-radius: 50%;
    border: 1.5px solid var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
    display: block;
}

@keyframes plateWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.q-mark {
    display: inline-block;
    animation: qBounce 2s ease-in-out infinite;
}

@keyframes qBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 20px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 60px; /* Space from top bar */
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border: none;
    border-radius: var(--radius-xl);
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    min-width: 240px;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-surprise {
    background: var(--surprise-gradient);
    color: #fff;
    box-shadow: 0 4px 20px var(--surprise-glow);
}

.btn-surprise:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--surprise-glow);
}

.btn-ghost {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    margin-top: 12px;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ========================================
   SCROLL HINT
   ======================================== */

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 300;
}

.scroll-arrow {
    animation: arrowBounce 1.5s ease-in-out infinite;
    margin-top: 4px;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-sub {
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 32px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Mood Grid */
.mood-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mood-chip {
    padding: 10px 16px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    user-select: none;
}

.mood-chip:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.mood-chip.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 179, 71, 0.15));
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
    box-shadow: 0 0 20px var(--accent-glow-soft);
}

/* Location Input */
.location-input-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.text-input {
    flex: 1;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s var(--ease-smooth);
}

.text-input::placeholder {
    color: var(--text-muted);
}

.text-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.btn-location {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-smooth);
    flex-shrink: 0;
}

.btn-location:hover {
    background: var(--accent-glow-soft);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.btn-location.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    border-color: var(--success);
}

.location-status {
    font-size: 0.8rem;
    margin-top: 6px;
    color: var(--text-muted);
    min-height: 18px;
}

.location-status.success {
    color: var(--success);
}

.location-status.error {
    color: var(--error);
}

/* Range Slider */
.slider-wrap {
    padding: 8px 0;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    outline: none;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.range-slider:hover {
    opacity: 1;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 0 3px var(--accent-primary);
    transition: transform 0.2s var(--ease-bounce);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 0 3px var(--accent-primary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.distance-badge {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1rem;
}

/* Price Grid */
.price-grid {
    display: flex;
    gap: 8px;
}

.price-chip {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.price-chip:hover {
    background: var(--bg-card-hover);
}

.price-chip.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 179, 71, 0.15));
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
    box-shadow: 0 0 15px var(--accent-glow-soft);
}

/* ========================================
   RESULTS
   ======================================== */

.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.35s var(--ease-smooth);
    cursor: pointer;
    animation: cardSlideIn 0.4s var(--ease-smooth) backwards;
}

.result-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 107, 53, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.card-emoji {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-cuisine {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.card-distance {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 10px;
    background: rgba(255, 179, 71, 0.1);
    border-radius: var(--radius-sm);
}

.card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Rating & Price */
.card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--warning);
    margin-top: 4px;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.card-price {
    font-weight: 700;
    color: var(--success);
    margin-left: 4px;
    font-size: 0.85rem;
}

/* Status Badges */
.status-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

.status-open {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-closed {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-tag {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-website-link {
    text-decoration: none;
    color: var(--accent-secondary);
    border: 1px solid rgba(255, 179, 71, 0.2);
    background: rgba(255, 179, 71, 0.08);
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.card-website-link:hover {
    background: rgba(255, 179, 71, 0.18);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 12px rgba(255, 179, 71, 0.15);
    transform: translateY(-1px);
}

.card-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.card-btn-primary {
    background: var(--accent-gradient);
    color: #fff;
}

.card-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.card-btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.card-btn-secondary:hover {
    background: var(--bg-card-hover);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ========================================
   SURPRISE ME
   ======================================== */

.surprise-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.surprise-location-prompt {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: cardReveal 0.5s var(--ease-bounce);
}

.surprise-prompt-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 12px;
    animation: plateWiggle 3s ease-in-out infinite;
}

.surprise-loading {
    text-align: center;
}

.spinner-plate {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--surprise-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: plateSpin 1.5s linear infinite;
    box-shadow: 0 0 40px var(--surprise-glow);
}

.plate-emoji {
    font-size: 3rem;
    animation: plateCounterSpin 1.5s linear infinite;
}

@keyframes plateSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes plateCounterSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.loading-sub {
    color: var(--text-secondary);
    font-size: 1rem;
}

.surprise-result {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 20px;
}

.surprise-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    background: var(--surprise-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 15px var(--surprise-glow); }
    50% { box-shadow: 0 0 30px var(--surprise-glow); }
}

.surprise-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    backdrop-filter: blur(20px);
    animation: cardReveal 0.6s var(--ease-bounce);
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }
}

.surprise-emoji {
    font-size: 4rem;
    margin-bottom: 12px;
}

.surprise-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.surprise-cuisine {
    color: var(--text-secondary);
    text-transform: capitalize;
    margin-bottom: 16px;
}

.surprise-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.meta-tag {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.surprise-dish-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    display: block;
    transition: opacity 0.4s ease;
}

.surprise-dish-photo.loading {
    opacity: 0;
    height: 180px;
    background: rgba(255,255,255,0.05);
}

.surprise-dish-photo.hidden {
    display: none;
}

.surprise-dish-section {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 179, 71, 0.06));
    border: 1px solid rgba(255, 107, 53, 0.15);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 20px;
}

.dish-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 6px;
}

.surprise-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    text-align: left;
}

.menu-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.menu-item-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.menu-item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.4;
}

.surprise-dish-source {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

.surprise-dish-source.from-menu {
    color: var(--success);
    font-style: normal;
    font-weight: 500;
}

.surprise-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.surprise-actions .btn {
    width: 100%;
    min-width: unset;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-msg {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================================
   UTILITIES
   ======================================== */

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .surprise-actions {
        flex-direction: row;
    }
}

@media (max-width: 370px) {
    .mood-chip {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .hero-title {
        font-size: 3rem;
    }
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   AUTH SCREEN
   ======================================== */
#auth-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: var(--bg-deep);
    overflow: hidden;
}

.auth-bg-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: cardReveal 0.6s var(--ease-bounce);
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 10px;
}

.auth-logo-img {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
    margin: 0 auto;
    display: block;
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s var(--ease-smooth);
}

.auth-input:focus {
    border-color: var(--accent-primary);
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.auth-error {
    color: var(--error);
    font-size: 0.85rem;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.auth-switch a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-switch a:hover {
    color: var(--accent-primary);
}

/* ========================================
   HERO TOP BAR & PROFILE
   ======================================== */
.hero-top-bar {
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    display: flex;
    flex-direction: row-reverse; /* Put brand right, greeting left */
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.hero-greeting {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-glass);
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
}

.avatar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 2px solid var(--bg-deep);
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s var(--ease-bounce);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.avatar-btn:hover {
    transform: scale(1.1);
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 8px 16px;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-smooth);
}

.nav-item span {
    font-size: 0.7rem;
    font-family: var(--font);
    font-weight: 600;
}

.nav-item svg {
    transition: all 0.3s var(--ease-bounce);
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-item.active {
    color: var(--accent-primary);
}

.nav-item.active svg {
    transform: scale(1.15) translateY(-2px);
    stroke: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* ========================================
   SURPRISE CARD UPDATES (Photos & Save)
   ======================================== */
.surprise-photo-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.3);
}

.surprise-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.surprise-card-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.save-btn-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-bounce);
}

.save-btn-overlay:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.8);
}

.save-btn-overlay.saved {
    background: var(--accent-primary);
    border-color: var(--accent-secondary);
}

.save-btn-overlay.saved svg {
    fill: white;
}

/* ========================================
   PROFILE & SAVED SCREENS
   ======================================== */
.saved-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px var(--accent-glow);
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid var(--border-glass);
    padding-top: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.profile-action-btn:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
    border-color: rgba(255,255,255,0.15);
}

.profile-action-btn.danger {
    color: var(--error);
}

.profile-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.profile-action-icon {
    font-size: 1.4rem;
    margin-right: 16px;
}

.profile-action-text {
    flex: 1;
    text-align: left;
}

.profile-action-arrow {
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.profile-action-btn:hover .profile-action-arrow {
    transform: translateX(4px);
    color: var(--text-primary);
}

/* Adjust screen padding for bottom nav */
.screen-inner {
    padding-bottom: 100px;
}

/* ========================================
   TRENDING CAROUSEL
   ======================================== */

.trending-container {
    margin-top: 50px;
    width: 100%;
    max-width: 100vw;
    animation: fadeIn 0.8s var(--ease-smooth) 0.3s backwards;
}

.trending-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 0 20px;
    text-align: left;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-title::before {
    content: '🔥';
}

.trending-carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 20px 25px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.trending-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.trending-item {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: left;
    backdrop-filter: blur(10px);
    transition: all 0.4s var(--ease-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.trending-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.trending-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.trending-item-emoji {
    font-size: 2rem;
}

.trending-item-dist {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-secondary);
    padding: 4px 8px;
    background: rgba(255, 179, 71, 0.1);
    border-radius: var(--radius-sm);
}

.trending-item-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-item-cuisine {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.trending-item-meta {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trending-item-tag {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Trending Prompt & Loading */
.trending-location-prompt {
    flex: 1;
    min-width: 280px;
    background: var(--bg-card);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.trending-location-prompt:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.prompt-icon {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

.prompt-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.btn-location-mini {
    padding: 8px 20px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.trending-loading {
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

.trending-loading.error {
    color: var(--error);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   FULL MENU SCREEN
   ======================================== */
.menu-category {
    margin-bottom: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.menu-category-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-secondary);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 8px;
}

.menu-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.menu-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.menu-item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.menu-item-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--success);
    white-space: nowrap;
}

.menu-item-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ========================================
   ADMIN CENTER
   ======================================== */

.admin-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

.admin-tab {
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.admin-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: cardSlideIn 0.3s var(--ease-smooth) backwards;
}

.admin-item-info {
    min-width: 0;
}

.admin-item-name {
    font-weight: 700;
    margin-bottom: 2px;
}

.admin-item-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.admin-item-actions {
    display: flex;
    gap: 8px;
}

.btn-admin-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-icon:hover {
    background: var(--bg-card-hover);
    transform: scale(1.1);
}

.btn-admin-icon.danger:hover {
    background: var(--error);
    border-color: var(--error);
    color: #fff;
}

.btn-admin-icon.active {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    z-index: 2;
    background: var(--bg-deep);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: modalIn 0.4s var(--ease-bounce);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.hidden {
    display: none !important;
}

@keyframes cardSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
