:root {
    --bg: #020408;
    --card-bg: #0f172a;
    --accent: #00f2ff;
    --gold: #f59e0b;
    --text: #ffffff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body {
    margin: 0; font-family: 'League Spartan', sans-serif;
    background-color: var(--bg); color: var(--text);
    display: flex; justify-content: center; height: 100vh; overflow: hidden;
}

.app-container { width: 100%; max-width: 450px; display: flex; flex-direction: column; padding: 15px; }

/* Dashboard Gamificado */
.top-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.level-badge { background: var(--gold); color: black; font-weight: 900; padding: 6px 10px; border-radius: 10px; font-size: 0.8rem; }
.progress-container { flex-grow: 1; height: 10px; background: #1e293b; border-radius: 20px; overflow: hidden; }
.progress-fill { width: 0%; height: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: width 0.4s ease; }
.streak-badge { font-weight: 900; color: #ff9d00; text-shadow: 0 0 10px rgba(255,157,0,0.4); min-width: 40px; }
.iq-label { font-weight: 800; color: var(--accent); min-width: 60px; text-align: right; }

.logo { font-weight: 900; font-size: 1.6rem; text-align: center; color: var(--accent); text-shadow: 0 0 20px rgba(0,242,255,0.4); margin: 10px 0; }

/* Cards */
.card-stack { flex-grow: 1; position: relative; perspective: 1000px; display: flex; align-items: center; justify-content: center; }
.card {
    position: absolute; width: 100%; height: 95%; background: var(--card-bg); border-radius: 40px; padding: 35px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); border: 1px solid rgba(255,255,255,0.1);
}
.card-content { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.card.flipped { border: 2px solid var(--accent); background: linear-gradient(145deg, #1e293b, #0f172a); }
.card.exit { transform: translateY(-120vh) rotate(-15deg) scale(0.8); opacity: 0; }

/* Botoes e Social */
.social-share-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 15px; }
.social-btn { width: 42px; height: 42px; border-radius: 10px; border: none; color: white; cursor: pointer; font-weight: 900; }
.x-bg { background: #000; border: 1px solid #444; }
.fb-bg { background: #1877F2; }
.rd-bg { background: #FF4500; }

.card-actions { display: flex; gap: 15px; padding-bottom: 5px; }
.circle-btn { width: 60px; height: 60px; border-radius: 50%; border: none; background: #1e293b; color: white; font-size: 1.4rem; cursor: pointer; }
.main-btn { flex: 1; border-radius: 20px; border: none; background: var(--accent); color: black; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.share-native-btn { background: linear-gradient(135deg, var(--accent), #006aff) !important; }

/* Loader & Toasts */
.spinner { width: 40px; height: 40px; border: 4px solid rgba(0,242,255,0.1); border-left-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
#toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--accent); color: black; padding: 12px 25px; border-radius: 50px; font-weight: 900; z-index: 3000; }

/* Modais */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); padding: 20px; }
.modal-content { background: #111827; border-radius: 30px; padding: 25px; height: 85vh; overflow-y: auto; border: 1px solid #333; }
.result-item { background: #1e293b; padding: 15px; border-radius: 15px; margin-bottom: 12px; border-left: 4px solid var(--accent); }
.close-btn { float: right; font-size: 30px; cursor: pointer; }

/* Animações */
.level-up-anim { animation: lvlup 0.8s ease; }
@keyframes lvlup { 50% { transform: scale(1.3); filter: brightness(1.5); } }
