/* --- style.css (Versão Final: FlashcardsGame Ultimate com Logo Fix) --- */
:root {
    --primary: #6366F1;       /* Indigo Vibrante */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #F59E0B;     /* Ouro (Mítico) */
    --accent: #14B8A6;        /* Teal Cyber */
    --success: #22C55E;       /* Verde Botão */
    --danger: #EF4444;        /* Vermelho Botão */
    
    --bg-dark: #0B0F19;       /* Fundo Principal */
    --bg-card: rgba(255, 255, 255, 0.03); /* Vidro */
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    --font-main: 'Inter', sans-serif;
    --radius: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Fundo Animado --- */
.background-glow {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    overflow: hidden; pointer-events: none;
}
.blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.4;
    animation: float 10s infinite alternate;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--primary); }
.blob-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: var(--secondary); animation-delay: -5s; }
.blob-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: var(--accent); opacity: 0.2; animation-duration: 15s; }

@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

/* --- Utilitários --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, #FFF 0%, #94A3B8 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* --- Botões --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: 0.3s;
    border: 1px solid transparent; font-size: 0.95rem; text-decoration: none;
}
.btn-primary {
    background: white; color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(255,255,255,0.4); }

.btn-glass {
    background: rgba(255,255,255,0.05); color: white;
    border: 1px solid var(--border-glass); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

/* --- Header Moderno (Pílulas) --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(11, 15, 25, 0.8); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

/* Flexbox para separar Logo (esquerda) e Menu (direita) */
.nav-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 80px; 
}

/* --- LOGO FIX (CORREÇÃO AQUI) --- */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.logo img {
    height: 45px;       /* Altura fixa impede que fique gigante */
    width: auto;        /* Largura automática mantém proporção */
    max-width: 200px;   /* Limite de segurança */
    object-fit: contain;
    display: block;
}

/* Menu Pílula */
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link { 
    color: var(--text-muted); font-size: 0.9rem; padding: 8px 16px; 
    border-radius: 20px; transition: 0.3s; font-weight: 500;
}
.nav-link:hover { 
    color: white; background: rgba(255, 255, 255, 0.1); 
}

/* --- Hero --- */
.hero { padding: 160px 0 60px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { font-size: 4rem; line-height: 1.1; font-weight: 800; letter-spacing: -2px; margin-bottom: 24px; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; }

/* --- Section: O Que é Flashcard (Tutorial Interativo) --- */
.tutorial-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.card-playground {
    perspective: 1000px; width: 100%; max-width: 400px; height: 260px; margin: 0 auto;
}
.card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.6s; transform-style: preserve-3d; cursor: pointer;
}
.card-inner.flipped { transform: rotateY(180deg); }

.card-face {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 24px;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    padding: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); border: 1px solid var(--border-glass);
    background: rgba(30, 41, 59, 0.9); backdrop-filter: blur(10px);
}
.card-face.back {
    background: var(--primary); color: white; transform: rotateY(180deg);
}
.playground-controls {
    display: flex; gap: 16px; justify-content: center; margin-top: 24px; opacity: 0; transition: 0.3s;
}
.playground-controls.visible { opacity: 1; }
.btn-control {
    width: 50px; height: 50px; border-radius: 50%; border: none; font-size: 24px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; color: white;
}

/* --- Section: Features & Ecosystem --- */
.ecosystem-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-top: 40px;
}
.eco-card {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    padding: 24px; border-radius: 20px; text-align: center; transition: 0.3s;
}
.eco-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.eco-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 12px; }
.eco-card:hover .eco-icon { color: var(--primary); }

/* --- Marquee --- */
.marquee-container {
    overflow: hidden; white-space: nowrap; position: relative;
    margin: 60px 0; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-content { display: inline-flex; gap: 40px; animation: scroll 60s linear infinite; }
.tag-item {
    padding: 10px 24px; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass); border-radius: 100px;
    color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
}
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- AI & Chat --- */
.chat-interface {
    background: #0F1218; border: 1px solid var(--border-glass);
    border-radius: 20px; padding: 30px; max-width: 700px; margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); position: relative;
}
.chat-msg {
    padding: 12px 16px; border-radius: 12px; margin-bottom: 12px; font-size: 0.95rem;
    width: fit-content; max-width: 80%;
}
.user-msg { background: rgba(255,255,255,0.05); color: var(--text-muted); margin-left: auto; text-align: right; }
.ai-msg { background: var(--primary); color: white; box-shadow: 0 0 15px var(--primary-glow); }

/* --- Stats Grid --- */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; margin-top: 50px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; padding: 30px; text-align: center; transition: 0.3s;
}
.stat-card:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-5px); border-color: var(--accent); }
.stat-number {
    font-size: 3rem; font-weight: 900; margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, #34D399 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 1.1rem; color: white; font-weight: 600; margin-bottom: 8px; }
.stat-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; line-height: 1.4; }
.stat-source {
    font-size: 0.75rem; color: var(--text-muted); font-style: italic; opacity: 0.7;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.stat-source a { color: var(--text-muted); text-decoration: underline; }
.stat-source a:hover { color: white; }

/* --- Gamification Ranks --- */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 60px; }
.rank-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-glass); border-radius: 24px; padding: 30px;
    transition: 0.3s; position: relative; overflow: hidden;
}
.rank-card:hover { border-color: var(--secondary); transform: translateY(-5px); }
.rank-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.rank-avatar {
    width: 70px; height: 70px; border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #B45309);
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); border: 2px solid #FEF3C7;
}
.rank-badges { display: flex; gap: 8px; margin-top: 15px; }
.badge-icon {
    width: 36px; height: 36px; background: rgba(0,0,0,0.3); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    border: 1px solid var(--border-glass); color: var(--secondary);
}

/* --- Gerador --- */
.glass-box {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    padding: 40px; border-radius: 24px; max-width: 800px; margin: 120px auto 60px;
}
.form-label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.form-input, .form-textarea {
    width: 100%; padding: 14px; background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass); border-radius: 12px;
    color: white; font-family: inherit; font-size: 1rem; margin-bottom: 24px;
}

/* --- Mobile --- */
@media(max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .nav-links { display: none; }
    .tutorial-layout { grid-template-columns: 1fr; text-align: center; }
}
