:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #10b981;
    --primary-hover: #059669;
    --accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-attachment: fixed;
}

#app-container {
    width: 100%;
    max-width: 480px; /* Mobile First */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

.view {
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Typography */
h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
}

.glow-text {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    margin-bottom: 20px;
    text-align: center;
}

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.card {
    padding: 20px;
    margin-bottom: 20px;
}

/* Forms & Inputs */
input, select {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.3s;
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:hover {
    background: var(--primary-hover);
}

.primary-btn.outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.action-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 10px;
    display: block;
}

/* Auth Tabs */
.auth-card {
    padding: 30px 20px;
    margin-top: 10vh;
}
.auth-card p { text-align: center; color: var(--text-muted); margin-bottom: 20px; }
.tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.tab-btn { flex: 1; background: none; border: none; padding: 10px; color: var(--text-muted); cursor: pointer; font-size: 16px;}
.tab-btn.active { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 600;}

/* Top Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px 0 15px;
    margin-bottom: 0;
    height: fit-content;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-greeting {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
}
.logo { font-size: 20px; font-weight: 700; color: white;}
.logo span { color: var(--primary); }
.icon-btn, .back-btn { background: none; border: none; color: var(--text-muted); font-size: 14px; cursor: pointer;}

/* Dashboard */
.dashboard-content {
    margin-top: 0;
}
.user-info {
    margin-top: 16px;
}
.highlight { color: var(--primary); font-weight: 600; }
.subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 15px; }

/* Magic Btn */
.magic-btn {
    background: linear-gradient(90deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    position: relative;
}

/* Result Card */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}
.result-box {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.05);
}
.result-box span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;}
.result-box strong { display: block; color: #ffffff; line-height: 1.3; font-weight: 700; }
.result-box #res-grupo { font-size: 18px; margin-bottom: 4px; }
.result-box #res-grupo small { font-size: 14px; font-weight: 700; color: #ffffff; display: block; margin-top: 2px;}
.palpite-line { font-size: 14px; color: #ffffff; font-weight: 700; margin-bottom: 6px; display: block; }
.palpite-line:last-child { margin-bottom: 0; }
.justification { font-size: 11px; text-align: center; color: var(--text-muted); margin-top: 10px; }

/* Plans */
.planos-container { display: flex; flex-direction: column; gap: 20px; }
.plan-card { padding: 25px; text-align: center; position: relative; }
.plan-card h3 { margin-bottom: 10px; }
.plan-card .price { font-size: 32px; font-weight: 700; color: white; margin-bottom: 15px; }
.plan-card .price span { font-size: 16px; color: var(--text-muted); font-weight: 400; }
.plan-card ul { list-style: none; margin-bottom: 20px; text-align: left; }
.plan-card ul li { padding: 8px 0; border-bottom: 1px solid var(--glass-border); font-size: 14px; }
.plan-card ul li:before { content: "✓ "; color: var(--primary); }
.plan-card.premium { border: 1px solid var(--accent); box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
.badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #000; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 12px; }

/* Modal Pix */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; padding: 20px;
}
.modal-content {
    width: 100%; max-width: 400px; padding: 30px 20px; text-align: center;
}
.qr-code { width: 200px; height: 200px; margin: 20px auto; border-radius: 8px; }
.copy-box { display: flex; gap: 10px; margin-top: 15px; }
.copy-box input { margin: 0; font-size: 12px; }
.copy-box button { background: var(--primary); color: white; border: none; padding: 0 15px; border-radius: 8px; cursor: pointer; }

/* Toast */
#toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 10px 20px;
    border-radius: 8px; z-index: 2000; font-weight: 600; font-size: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: opacity 0.3s;
}

/* Stats */
.stats-list { list-style: none; margin-top: 15px; }
.stats-list li {
    display: flex; justify-content: space-between;
    padding: 10px; border-bottom: 1px solid var(--glass-border);
}

/* App Logo */
.app-logo {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 150px;
    width: 100%;
    height: auto;
}

.top-nav .app-logo {
    margin: 0;
    max-width: 120px;
    max-height: 60px;
    width: auto;
}
