@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Paleta Dark Premium (Foco em legibilidade e luxo) */
    --bg-color: #0B0F19; /* Quase preto profundo */
    --card-bg: #151A28; /* Escuro um pouco mais claro */
    --border-color: #232A3B;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    
    /* Cores de Ação (Neon) */
    --accent: #38BDF8; /* Azul vivo Telegram */
    --accent-hover: #0EA5E9;
    --accent-glow: rgba(56, 189, 248, 0.4);
    
    --danger: #EF4444;
    --danger-glow: rgba(239, 68, 68, 0.4);
    --success: #10B981;
    
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 900px; /* Mais focado e limpo, como o concorrente */
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   CABEÇALHO E NAVEGAÇÃO
   ========================================================================== */
.header {
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--accent);
    font-size: 26px;
}

/* Sub Nav (Estilo abas) */
.sub-nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    padding: 10px 0;
    margin: 0;
}

.nav-menu li a {
    padding: 8px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-menu li a:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.nav-menu li a.active {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

/* ==========================================================================
   BOTÕES GERAIS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    color: #0B0F19;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-glow);
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: var(--border-radius);
    font-weight: 800;
}

.btn-pulse {
    animation: pulseRed 2s infinite;
    background: linear-gradient(135deg, #FF4B2B, #FF416C);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 65, 108, 0.4);
}

.btn-pulse:hover {
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: #fff;
}

.btn-pulse-green {
    animation: pulseGreen 2s infinite;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-pulse-green:hover {
    background: linear-gradient(135deg, #059669, #10B981);
    color: #fff;
}

@keyframes pulseRed {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(255, 65, 108, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 65, 108, 0); }
}

/* ==========================================================================
   LISTA DE GRUPOS (HOMEPAGE)
   ========================================================================== */
.main-content {
    padding: 40px 0;
}

.section-title {
    margin-bottom: 30px;
}

.section-title h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.section-title p {
    color: var(--text-muted);
    font-size: 14px;
}

.groups-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.group-list-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    height: 100%;
    text-align: center;
}

.group-list-item:hover {
    border-color: var(--accent);
    background-color: rgba(21, 26, 40, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.group-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.group-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.group-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.group-title a {
    color: var(--text-main);
}

.group-title a:hover {
    color: var(--accent);
}

.group-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.group-action {
    width: 100%;
    margin-top: auto;
}

.group-action .btn {
    width: 100%;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.category-badge {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}

.members-badge {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.status-badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* ==========================================================================
   PÁGINA ÚNICA DO GRUPO
   ========================================================================== */
.group-single-page {
    padding: 40px 0 80px;
}

.group-single {
    max-width: 650px;
    margin: 0 auto;
}

.group-hero {
    text-align: center;
    margin-bottom: 30px;
}

.group-hero-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    margin-bottom: 15px;
}

.group-hero-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
}

.group-meta-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.group-description-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.group-description-box h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--accent);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.group-description-box p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}

/* Caixa de Conversão / Alerta */
.conversion-box {
    text-align: center;
}

.alert-box {
    background-color: rgba(239, 68, 68, 0.05);
    border: 1px dashed var(--danger);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.alert-box h3 {
    color: var(--danger);
    font-size: 18px;
    margin-bottom: 8px;
}

.alert-box p {
    color: var(--text-muted);
    font-size: 14px;
}

.cta-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
}

.cta-text span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    display: block;
    margin-top: 5px;
}

/* ==========================================================================
   AGE GATE (MODAL +18) - GLASSMORPHISM
   ========================================================================== */
.age-gate-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(10px); /* Glassmorphism premium */
    z-index: 9999;
    display: none; /* Inicia oculto e o JS mostra se não houver confirmação (evita bloqueio para crawlers de SEO) */
    justify-content: center;
    align-items: center;
}

.age-gate-modal {
    background: linear-gradient(145deg, #1A2133, #131826);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
}

.age-gate-title {
    color: var(--danger);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 15px;
}

.age-gate-message {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 15px;
}

.age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-confirm {
    background-color: var(--danger);
    color: #fff;
    font-size: 16px;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 0 15px var(--danger-glow);
}

.btn-confirm:hover {
    background-color: #DC2626;
    color: #fff;
}

.btn-deny {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 14px;
}

.btn-deny:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-main);
}

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 10px;
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* Responsividade */
@media (max-width: 768px) {
    .groups-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .group-list-item {
        padding: 15px 10px;
        gap: 10px;
        border-radius: 10px;
        align-items: center;
        text-align: center;
    }
    
    /* Override inline dimensions on mobile for channel icons/initials */
    .group-list-item img, 
    .group-list-item .group-icon-initial { 
        width: 50px !important; 
        height: 50px !important; 
        font-size: 20px !important; 
    }
    
    .group-icon {
        margin: 0 auto;
    }
    
    .group-info {
        width: 100%;
    }
    
    .group-title {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 2px;
        min-height: 34px; /* Vertical alignment helper */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .group-meta {
        gap: 4px;
        justify-content: center;
        margin-bottom: 4px;
    }
    
    .badge {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .group-action {
        width: 100%;
    }
    
    .group-action .btn {
        width: 100%;
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* Destaque para canais fixados/quentes */
.group-list-item.featured {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, var(--card-bg) 100%) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.08) !important;
}

.group-list-item.featured:hover {
    border-color: #EF4444 !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.2) !important;
}

/* Banner Link animations and hover glows */
.banner-link:hover {
    transform: translateY(-3px);
    border-color: var(--accent) !important;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.25);
}

@media (max-width: 600px) {
    .banners-vertical-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

@keyframes pulseGreen {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}



