/* Design System & Variables */
:root {
    --bg-dark: #0f1714;
    --bg-card: rgba(25, 38, 32, 0.6);
    --primary-green: #34d399;
    --primary-glow: #34d39966;
    --accent-red: #f87171;
    --accent-purple: #c084fc;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Background */
.login-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: url('/static/img/login_bg.jpg') center center / cover no-repeat;
    z-index: -2;
    animation: loginBgZoom 30s infinite alternate ease-in-out;
}

.login-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 20, 0.55) 0%,
        rgba(15, 23, 20, 0.75) 50%,
        rgba(15, 23, 20, 0.92) 100%
    );
}

@keyframes loginBgZoom {
    0%   { transform: scale(1);    filter: brightness(0.9); }
    100% { transform: scale(1.08); filter: brightness(1.1); }
}

/* Auth Section styling */
#auth-section {
    position: relative;
    z-index: 10;
    background: rgba(15, 23, 20, 0.75) !important;
    border: 1px solid rgba(52, 211, 153, 0.15) !important;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(52, 211, 153, 0.08) !important;
}

#auth-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

.form-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-premium {
    background: linear-gradient(135deg, #34d399, #059669);
    border-color: #34d399;
    color: #000;
    font-weight: 700;
}

.btn-premium:hover {
    filter: brightness(1.15);
    box-shadow: 0 6px 25px rgba(52, 211, 153, 0.35);
}

.btn-action {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-color: #60a5fa;
    color: #fff;
}

.btn-action:hover {
    filter: brightness(1.15);
    box-shadow: 0 6px 25px rgba(96, 165, 250, 0.35);
}

/* Background animated glow */
.background-anim {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, var(--primary-glow) 0%, transparent 40%);
    z-index: -1;
    animation: pulse 15s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(2%, 2%); }
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
    padding: 1.5rem;
    gap: 1.5rem;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Sidebar */
.sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 15px var(--primary-glow);
}

.logo span {
    color: var(--primary-green);
}

.game-menu {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.menu-item i {
    font-size: 1.2rem;
    filter: grayscale(0.5);
    transition: all 0.3s ease;
}

.menu-item:hover, .menu-item.active {
    background: rgba(52, 211, 153, 0.1);
    color: var(--text-main);
}

.menu-item:hover i, .menu-item.active i {
    filter: grayscale(0);
    transform: scale(1.1);
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Top Bar */
.top-bar {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    font-size: 2.5rem;
    background: rgba(255,255,255,0.05);
    padding: 0.8rem;
    border-radius: 16px;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
}

.details h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.classe {
    font-size: 0.9rem;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.level-indicator {
    text-align: right;
    min-width: 200px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

/* Progress Bars */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-vitaminas { background: var(--primary-green); box-shadow: 0 0 10px var(--primary-glow); }
.bg-fibra { background: var(--accent-red); box-shadow: 0 0 10px rgba(248, 113, 113, 0.4); }
.bg-anti { background: var(--accent-purple); box-shadow: 0 0 10px rgba(192, 132, 252, 0.4); }
.bg-xp { background: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }

/* Action Panel & Log */
.action-panel {
    padding: 1.5rem;
    flex: 1;
}

.action-panel h3 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
}

.log-container {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 1rem;
    height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-entry {
    padding: 0.8rem;
    border-left: 3px solid var(--primary-green);
    background: rgba(255,255,255,0.03);
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
    animation: slideIn 0.3s ease-out;
}

.log-entry.error {
    border-left-color: var(--accent-red);
}

/* Utility Animations */
.mt-2 { margin-top: 1.5rem; }

@keyframes bounce-in {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Modal e Classes */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.modal.hidden { display: none; }
.modal-content {
    width: 80%;
    max-width: 800px;
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;
}
.btn-close {
    background: transparent; color: white; border: none; font-size: 2.5rem; cursor: pointer; transition: 0.3s;
}
.btn-close:hover { color: var(--accent-red); }

.classes-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem;
}
.class-card {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    padding: 1.5rem; border-radius: 12px; text-align: center;
    transition: all 0.3s ease;
}
.class-card:hover { transform: translateY(-5px); background: rgba(52, 211, 153, 0.1); }
.class-card.premium { border-color: #fbbf24; }
.class-card.premium:hover { background: rgba(251, 191, 36, 0.1); }
.class-icon { font-size: 3rem; margin-bottom: 1rem; }
.premium-badge {
    background: rgba(251, 191, 36, 0.2); color: #fbbf24; font-size: 0.8rem; font-weight: bold;
    padding: 0.3rem 0.6rem; border-radius: 15px; display: inline-block; margin-bottom: 0.8rem; border: 1px solid #fbbf24;
}
.btn-select-class {
    margin-top: 1rem; background: var(--primary-green); color: #000;
    border: none; padding: 0.6rem 1rem; border-radius: 6px; font-weight: bold; cursor: pointer;
    width: 100%; transition: 0.3s;
}
.btn-select-class:hover { width: 100%; filter: brightness(1.2); }
.btn-select-class.btn-premium { background: rgba(251, 191, 36, 0.8); }
.btn-select-class.btn-premium:hover { background: #fbbf24; }

