/* ========================================
   QUEST DEL EQUIPO - GAME STYLES
   ======================================== */

:root {
    --bg-dark: #0f0e17;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222244;
    --primary: #ff6b35;
    --primary-glow: rgba(255, 107, 53, 0.3);
    --secondary: #7b2ff7;
    --secondary-glow: rgba(123, 47, 247, 0.3);
    --accent: #00d4aa;
    --accent-glow: rgba(0, 212, 170, 0.3);
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
    --text: #e8e8e8;
    --text-muted: #8888aa;
    --border: #2a2a4a;
    --sidebar-width: 200px;
    --font-title: 'Fredoka One', cursive;
    --font-body: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ========== LOGIN ========== */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0e17 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

#login-screen::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -100px; right: -100px;
    animation: float 6s ease-in-out infinite;
}

#login-screen::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    bottom: -50px; left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

.login-container {
    text-align: center;
    z-index: 1;
    padding: 40px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 24px;
    border: 2px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-width: 420px;
    width: 90%;
}

.login-logo {
    font-size: 80px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.login-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form label {
    text-align: left;
    font-weight: 700;
    color: var(--accent);
}

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff8f5e);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 6px 25px var(--primary-glow); }

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #9b59ff);
    color: white;
    box-shadow: 0 4px 15px var(--secondary-glow);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #00f5c8);
    color: #0f0e17;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ff6b81);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 8px; }

/* ========== INPUTS ========== */
select, input, textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

textarea { resize: vertical; min-height: 80px; }

/* ========== APP LAYOUT ========== */
#app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
#sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid var(--border);
}

.sidebar-logo { font-size: 2rem; }

.sidebar-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--primary);
    margin-left: 8px;
}

.nav-items {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    text-align: left;
}

.nav-btn:hover { background: var(--bg-card-hover); color: var(--text); }

.nav-btn.active {
    background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(255,107,53,0.05));
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-icon { font-size: 1.2rem; }

.sidebar-footer {
    padding: 15px;
    border-top: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#sidebar-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

/* ========== MAIN CONTENT ========== */
#main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.screen-content {
    max-width: 1200px;
    margin: 0 auto;
}

.screen-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.card:hover { border-color: rgba(255,107,53,0.3); }

.card-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary);
}

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

/* ========== LADDER / ESCALERA ========== */
.ladder-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
    padding: 30px 20px;
    min-height: 400px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,212,170,0.03) 100%);
    border-radius: 16px;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.ladder-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 140px;
    position: relative;
}

.ladder-avatar {
    font-size: 2.8rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    border: 3px solid var(--border);
    z-index: 2;
    position: relative;
    transition: transform 0.5s ease;
}

.ladder-avatar.bounce { animation: bounce 0.5s ease; }

.ladder-bar-container {
    width: 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px 12px 4px 4px;
    overflow: hidden;
    position: relative;
    min-height: 20px;
    border: 2px solid var(--border);
}

.ladder-bar {
    width: 100%;
    border-radius: 10px 10px 0 0;
    transition: height 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    bottom: 0;
}

.ladder-name {
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ladder-pts {
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 800;
}

.ladder-level {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
}

/* Ladder colors per player */
.ladder-player:nth-child(1) .ladder-bar { background: linear-gradient(180deg, #ff6b35, #ff8f5e); }
.ladder-player:nth-child(2) .ladder-bar { background: linear-gradient(180deg, #7b2ff7, #9b59ff); }
.ladder-player:nth-child(3) .ladder-bar { background: linear-gradient(180deg, #00d4aa, #00f5c8); }
.ladder-player:nth-child(4) .ladder-bar { background: linear-gradient(180deg, #ffd700, #ffe44d); }
.ladder-player:nth-child(5) .ladder-bar { background: linear-gradient(180deg, #ff4757, #ff6b81); }
.ladder-player:nth-child(6) .ladder-bar { background: linear-gradient(180deg, #1e90ff, #63b3ed); }

.ladder-player:nth-child(1) .ladder-avatar { border-color: #ff6b35; }
.ladder-player:nth-child(2) .ladder-avatar { border-color: #7b2ff7; }
.ladder-player:nth-child(3) .ladder-avatar { border-color: #00d4aa; }
.ladder-player:nth-child(4) .ladder-avatar { border-color: #ffd700; }
.ladder-player:nth-child(5) .ladder-avatar { border-color: #ff4757; }
.ladder-player:nth-child(6) .ladder-avatar { border-color: #1e90ff; }

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
}

.badge-gold { background: rgba(255,215,0,0.15); border-color: var(--gold); color: var(--gold); }
.badge-silver { background: rgba(192,192,192,0.15); border-color: var(--silver); color: var(--silver); }
.badge-bronze { background: rgba(205,127,50,0.15); border-color: var(--bronze); color: var(--bronze); }
.badge-special { background: rgba(123,47,247,0.15); border-color: var(--secondary); color: var(--secondary); }

.badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* ========== XP BAR ========== */
.xp-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 6px;
    transition: width 1s ease;
}

/* ========== PROFILE CARD ========== */
.profile-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
}

.profile-avatar {
    font-size: 5rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

.profile-info { flex: 1; }
.profile-name { font-family: var(--font-title); font-size: 1.5rem; }
.profile-level { color: var(--accent); font-weight: 700; margin: 4px 0; }

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.stat-card {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== TABLE ========== */
.table-container { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
}

tr:hover td { background: rgba(255,255,255,0.02); }

.rank-1 td { background: rgba(255,215,0,0.05); }
.rank-2 td { background: rgba(192,192,192,0.03); }
.rank-3 td { background: rgba(205,127,50,0.03); }

/* ========== VOTING ========== */
.vote-category {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.vote-category-title {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.vote-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vote-option {
    padding: 10px 18px;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    color: var(--text);
    font-size: 0.9rem;
}

.vote-option:hover { border-color: var(--secondary); background: rgba(123,47,247,0.1); }
.vote-option.selected { border-color: var(--secondary); background: rgba(123,47,247,0.2); box-shadow: 0 0 15px var(--secondary-glow); }

/* ========== POWERS ========== */
.power-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    border: 2px solid var(--secondary);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.power-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--secondary-glow);
}

.power-icon { font-size: 3rem; margin-bottom: 10px; }
.power-name { font-family: var(--font-title); font-size: 1rem; color: var(--secondary); }
.power-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ========== MISSION CARD ========== */
.mission-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--primary);
}

.mission-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.mission-player-avatar { font-size: 2rem; }
.mission-player-name { font-weight: 700; font-size: 1.1rem; }

.mission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-bottom: 6px;
}

.mission-status {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.status-pending { background: rgba(255,165,2,0.2); color: var(--warning); }
.status-done { background: rgba(46,213,115,0.2); color: var(--success); }
.status-fail { background: rgba(255,71,87,0.2); color: var(--danger); }

/* ========== PROYECTO TRACKING ========== */
.proyecto-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.proyecto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.proyecto-nombre {
    font-family: var(--font-title);
    font-size: 1.1rem;
}

.proyecto-estado {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.estado-activo { background: rgba(0,212,170,0.15); color: var(--accent); }
.estado-pausado { background: rgba(255,165,2,0.15); color: var(--warning); }
.estado-completado { background: rgba(46,213,115,0.15); color: var(--success); }

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 1s ease;
}

.entregable-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-title {
    font-family: var(--font-title);
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

/* ========== TOAST ========== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.toast-success { background: var(--success); color: #0f0e17; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--secondary); color: white; }
.toast-warning { background: var(--warning); color: #0f0e17; }

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ========== CONFETTI ========== */
#confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ========== CONFIG ========== */
.config-section {
    margin-bottom: 30px;
}

.config-section-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.editable-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editable-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.editable-item input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 4px 8px;
}

.editable-item input:focus {
    outline: none;
    box-shadow: none;
}

/* ========== WEEK INFO BAR ========== */
.week-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.week-number {
    font-family: var(--font-title);
    color: var(--primary);
    font-size: 1.1rem;
}

.week-dates {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tab:hover { color: var(--text); }
.tab.active { background: var(--primary); color: white; }

/* ========== FORM GROUP ========== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-row > * { flex: 1; }

/* ========== POWER REVEAL ANIMATION ========== */
.power-reveal {
    text-align: center;
    padding: 40px;
}

.power-reveal-icon {
    font-size: 6rem;
    animation: powerPulse 1s ease-in-out infinite;
}

@keyframes powerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.power-reveal-text {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--secondary);
    margin-top: 20px;
}

.power-reveal-target {
    font-size: 1.5rem;
    color: var(--gold);
    margin-top: 10px;
    font-weight: 800;
}

/* ========== MENTIONS ========== */
.mention-card {
    background: linear-gradient(135deg, rgba(0,212,170,0.05), rgba(123,47,247,0.05));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    font-style: italic;
}

.mention-from {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: normal;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    #sidebar {
        width: 60px;
    }
    .nav-label, .sidebar-title { display: none; }
    .sidebar-header { padding: 10px; }
    #main-content { margin-left: 60px; padding: 15px; }
    .ladder-container { flex-wrap: wrap; }
    .card-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .tabs { flex-wrap: wrap; }
}

/* ========== ANIMATIONS ========== */
.fade-in {
    animation: fadeIn 0.4s ease;
}

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

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ========== WEEK SELECTOR ========== */
.week-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-selector button {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text);
    width: 32px; height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== MISC ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state-text { font-size: 1.1rem; }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.text-gold { color: var(--gold); }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ========== CODE INLINE ========== */
code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.85em;
    color: var(--accent);
}

/* ========== GITHUB STATUS ========== */
.github-status-bar a {
    color: var(--primary);
    text-decoration: none;
}
.github-status-bar a:hover {
    text-decoration: underline;
}

/* ========== GAME ANIMATIONS ========== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--primary-glow); }
    50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes growUp {
    from { height: 0 !important; }
}

@keyframes growWidth {
    from { width: 0 !important; }
}

.animate-slideDown { animation: slideDown 0.5s ease-out; }
.animate-slideIn { animation: slideInLeft 0.4s ease-out both; }
.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-pop { animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

/* Task item hover effect */
.mission-item {
    transition: all 0.2s ease;
}
.mission-item:hover {
    background: var(--bg-card-hover) !important;
    transform: translateX(4px);
}

/* Vote option animation */
.vote-option {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vote-option:hover {
    transform: scale(1.05);
}
.vote-option.selected {
    transform: scale(1.05);
}

/* Power card hover animation */
.power-card:hover .power-icon {
    animation: bounce 0.5s ease;
}

/* Ladder bar animation on load */
.ladder-bar {
    animation: growUp 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Badge shimmer effect */
.badge-gold {
    background: linear-gradient(90deg, rgba(255,215,0,0.15), rgba(255,215,0,0.3), rgba(255,215,0,0.15));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Number counter pulse */
.stat-card:hover .stat-value {
    transform: scale(1.1);
    color: var(--gold);
    transition: all 0.3s ease;
}

/* Card entrance stagger */
.card-grid > * {
    animation: fadeIn 0.4s ease-out both;
}
.card-grid > *:nth-child(1) { animation-delay: 0s; }
.card-grid > *:nth-child(2) { animation-delay: 0.1s; }
.card-grid > *:nth-child(3) { animation-delay: 0.2s; }
.card-grid > *:nth-child(4) { animation-delay: 0.3s; }
.card-grid > *:nth-child(5) { animation-delay: 0.4s; }
.card-grid > *:nth-child(6) { animation-delay: 0.5s; }

/* Progress bar animation */
.progress-bar {
    animation: growWidth 1s ease-out;
}

/* Mission card border glow on hover */
.mission-card {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.mission-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Percentage badge colors */
.pct-badge {
    min-width: 50px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
}
.pct-100 { background: rgba(46,213,115,0.2); color: var(--success); }
.pct-50 { background: rgba(255,165,2,0.2); color: var(--warning); }
.pct-low { background: rgba(255,71,87,0.2); color: var(--danger); }

/* Vote results bar */
.vote-result-bar {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    flex: 1;
}
.vote-result-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 4px;
    transition: width 0.8s ease;
    animation: growWidth 0.8s ease-out;
}
