:root {
    /* MyFest Modern Palette - Updated */
    --color-primary: #10B981;
    /* Verde (Success/Primary) */
    --color-secondary: #EF4444;
    /* Vermelho (Urgent/Secondary) */
    --color-accent: #FFD700;
    /* Pure Golden */
    --gold-glow: rgba(255, 215, 0, 0.4);
    --gold-glow-strong: rgba(255, 215, 0, 0.6);

    --color-dark: #1F1F1F;
    /* Fundo padrão */
    --color-gray: #1a1a1a;
    --color-light: #F5F5F5;
    /* Texto claro */
    --color-white: #ffffff;
    --color-black: #000000;

    /* Cores de Status Específicas */
    --color-success: #10B981;
    /* Verde */
    --color-danger: #EF4444;
    /* Vermelho */
    --color-warning: #F59E0B;
    /* Laranja/Amarelo */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: var(--color-accent);
    color: var(--color-black);
    font-weight: 800;
    text-transform: uppercase;
    font-family: var(--font-display);
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 0 15px var(--gold-glow);
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #fff;
    border-color: #fff;
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--gold-glow-strong);
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: transparent;
    color: var(--color-accent);
    font-weight: 800;
    text-transform: uppercase;
    font-family: var(--font-display);
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 0 8px var(--gold-glow);
    letter-spacing: 1px;
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--gold-glow-strong);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    display: block;
}

/* Desktop User Actions */
.desktop-user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header Modernizado */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    transition: all 0.4s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: 0.3s;
}

.nav-link:hover {
    opacity: 1;
    color: var(--color-accent);
}

.user-greeting {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.btn-user {
    padding: 0.5rem 1.2rem 0.5rem 0.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid var(--color-accent) !important;
    background: rgba(255, 215, 0, 0.1) !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 0 10px var(--gold-glow);
}

.btn-user:hover {
    background: var(--color-accent) !important;
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--gold-glow-strong);
}

.btn-user .user-avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), #B8860B);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #000;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-logout {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.btn-logout:hover {
    background: #EF4444;
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

/* Mobile Menu Overlay Modernizado */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 20000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.close-menu {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    width: 100%;
    padding: 0 2rem;
}

.mobile-menu-links a {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-display);
    transition: 0.3s;
}

.mobile-menu-links a.accent {
    color: var(--color-accent);
}

.mobile-menu-links .btn {
    margin-top: 1rem;
    font-size: 1.2rem;
}

.logout-link {
    color: #666 !important;
    font-size: 1.1rem !important;
    margin-top: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    z-index: 10001;
    /* Adicionando um leve "brilho" de fundo apenas na área da logo para destacar */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    padding: 5px;
    border-radius: 50%;
    /* margin-left removido - causava desalinhamento no mobile */
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Novo Estilo para parte FEST (Outline Melhorado) */
.logo-fest-outline {
    color: transparent;
    -webkit-text-stroke: 1px #fff;
    /* Adicionando um leve glow branco para destacar mais */
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.logo-dot {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-accent);
    font-weight: 800;
    line-height: 1;
}

/* Responsividade Global */
@media (max-width: 600px) {
    html {
        font-size: 14px;
        /* Reduz escala global levemente */
    }

    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2.5rem !important;
        /* Força títulos menores em telas muito pequenas */
    }
}


/* Neon Buttons */
.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: transparent;
    /* Fundo transparente */
    color: var(--color-accent);
    /* Texto na cor do neon */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid var(--color-accent);
    /* Borda Neon */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-family: var(--font-display);

    /* Efeito de Luz Neon */
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.3), inset 0 0 5px rgba(204, 255, 0, 0.1);
    text-shadow: 0 0 5px rgba(204, 255, 0, 0.5);
    border-radius: 4px;
    /* Levemente arredondado */
}

.btn:hover {
    background-color: var(--color-accent);
    color: var(--color-black);
    text-shadow: none;
    transform: translateY(-2px);
    /* Glow Intenso no Hover */
    box-shadow: 0 0 20px var(--color-accent), 0 0 50px var(--color-accent), inset 0 0 10px var(--color-white);
}

.btn-outline {
    border-color: var(--color-white);
    color: var(--color-white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--color-white), 0 0 40px var(--color-white);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--spacing-lg);
    /* Imagem real de fundo com overlay e Grayscale para foco no TEXTO */
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.95)), url('https://images.unsplash.com/photo-1492684223066-81342ee5ff30?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    background-blend-mode: saturation;
    /* Garante que a imagem fique P&B */
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #888;
    margin-bottom: var(--spacing-md);
    max-width: 500px;
}

.accent-text {
    color: var(--color-accent);
}

/* Cards / Grid with Real Images */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.card {
    background-color: var(--color-gray);
    padding: var(--spacing-md);
    border: 1px solid #333;
    transition: all 0.5s ease;

    /* Configuração para imagem de fundo */
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    /* Altura mínima para mostrar a imagem */
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Filtro para deixar a imagem de fundo Preto e Branco */
    filter: grayscale(100%);
}

/* Overlay escuro para garantir leitura do texto sobre a foto */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4));
    z-index: 1;
    transition: background 0.5s ease;
}

.card:hover::before {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.1));
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    /* Ao passar o mouse, traz a cor de volta levemente ou mantém P&B com destaque */
    filter: grayscale(0%);
}

.card h3,
.card p {
    position: relative;
    z-index: 2;
    /* Texto acima do overlay */
}

.card h3 {
    font-size: 2.5rem;
    /* Fonte AUMENTADA para foco no TEXTO */
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: 2px 2px 0px #000;
}

.card p {
    color: #eee;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.4;
}

/* --- Search & Filters --- */
.search-container {
    margin-top: -3rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 10;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    background: rgba(10, 10, 10, 0.9);
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    width: 95%;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-main);
    min-width: 0;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: #666;
}

.search-btn {
    background: var(--color-accent);
    color: #000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-shadow: none;
}

.search-btn:hover {
    box-shadow: 0 0 15px var(--color-accent);
    transform: translateY(-2px);
}

/* Search Responsive - Stack on Mobile */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        width: 90%;
    }

    .search-input {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.8rem;
    }

    .search-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* --- Category Filters --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: var(--spacing-md);
}

.category-card {
    background: linear-gradient(135deg, #111, #000);
    border: 1px solid #333;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.category-card i {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    display: block;
}

.category-card span {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.category-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(204, 255, 0, 0.1);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--spacing-md);
}

.filter-tab {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-tab.active,
.filter-tab:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.2);
}

/* --- Detalhes (Hero Menor) --- */
.page-hero {
    height: 50vh;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: var(--spacing-md);
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.8rem !important;
        /* Smaller titles on mobile */
    }

    .btn-outline {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* .container>div rule removed - was causing header logo centering on mobile */
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), #000);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-white);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Footer */
footer {
    border-top: 1px solid #333;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
    text-align: center;
    color: #666;
}

/* Mobile/Tablet Header Overrides */
@media (max-width: 900px) {
    header .container {
        padding: 0 1.5rem;
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Fix header container to be a proper flex row - logo left, hamburger right */
    .header-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Fix logo alignment - stays on the left */
    .logo {
        margin-left: 0 !important;
        margin-right: auto !important;
        flex-shrink: 0;
        flex-grow: 0 !important;
    }

    /* Hide desktop nav AND user actions on mobile */
    .main-nav,
    .desktop-user-actions {
        display: none !important;
    }

    /* Show Mobile Menu Toggle (Hamburger) - stays on the right */
    .mobile-menu-toggle {
        display: block !important;
        font-size: 1.8rem;
        z-index: 1001;
        margin-left: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0;
    }

    /* Adjust Logo Size on Mobile */
    .logo-text,
    .logo-dot {
        font-size: 1.6rem;
    }
}

/* --- Bottom Navigation (Mobile Only) --- */
.bottom-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 500px;
    padding: 8px 5px;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--color-accent);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* FORCE Bottom Nav on Mobile */
@media (max-width: 900px) {
    .bottom-nav {
        display: flex !important;
    }

    body {
        /* Add padding to prevent content from being hidden behind bottom nav */
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    html {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .hero {
        /* Disable background-attachment: fixed on mobile - breaks iOS scroll */
        background-attachment: scroll !important;
        min-height: 100vh;
    }

    /* Prevent any wrapper from blocking scroll - BUT keep hero height logic intact */
    /* Prevent any wrapper from blocking scroll */
    main,
    .container,
    section,
    [role="main"] {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* PWA Standalone Fixes */
@media all and (display-mode: standalone) {
    body {
        /* Safe area handling for iPhones with notch */
        padding-top: env(safe-area-inset-top);
        padding-bottom: calc(85px + env(safe-area-inset-bottom));
    }
}

/* Final cleanup and ensuring scroll works everywhere */
html,
body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Ensure pink is gone from variables previously set in root, this is just a backup if user copied partial file */