:root {
    /* Shadow Theme (Default) */
    --bg-color: #050505;
    --panel-bg: rgba(20, 20, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-glow: 0 0 20px rgba(0, 150, 255, 0.4);

    --hp-color: #ff4d4d;
    --xp-color: #4da6ff;
    --rank-color: #ffd700;

    --easy-color: #4dff88;
    --medium-color: #ffcc00;
    --hard-color: #ff4d4d;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light {
    --bg-color: #f0f2f5;
    --panel-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #1a1a1a;
    --text-secondary: #5f6368;
    --accent-glow: 0 0 15px rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

/* Background Glow Effect */
.glow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 100, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--accent-glow);
}

.clock {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.date-weather {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.aura-title {
    text-align: center;
}

.aura-title h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 8px;
    background: linear-gradient(90deg, #fff, #4da6ff, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--xp-color);
}

.icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

.sun {
    display: none;
}

.theme-light .sun {
    display: block;
}

.theme-light .moon {
    display: none;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
}

.player-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rank-badge {
    width: 80px;
    height: 80px;
    background: var(--bg-color);
    border: 2px solid var(--rank-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--rank-color);
    box-shadow: 0 0 15px var(--rank-color);
    margin-bottom: 1rem;
}

.player-level {
    font-weight: 600;
    color: var(--xp-color);
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Bars */
.status-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}

.progress-container {
    width: 100%;
}

.label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.bar-bg {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.hp {
    background: linear-gradient(90deg, #ff4d4d, #ff8080);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
}

.xp {
    background: linear-gradient(90deg, #4da6ff, #80c1ff);
    box-shadow: 0 0 10px rgba(77, 166, 255, 0.4);
}

/* Mission Board */
.mission-board {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
}

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

.section-header h3 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

.primary-btn {
    background: var(--xp-color);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    transition: var(--transition);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 166, 255, 0.4);
}

.mission-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mission-item {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: slideIn 0.5s ease backwards;
}

.mission-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(10px);
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.difficulty-tag {
    font-size: 0.6rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 5px;
    margin-right: 1.5rem;
    text-transform: uppercase;
}

.easy {
    border: 1px solid var(--easy-color);
    color: var(--easy-color);
}

.medium {
    border: 1px solid var(--medium-color);
    color: var(--medium-color);
}

.hard {
    border: 1px solid var(--hard-color);
    color: var(--hard-color);
}

.mission-content {
    flex-grow: 1;
}

.mission-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.mission-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.check-btn {
    background: transparent;
    border: 1px solid var(--xp-color);
    color: var(--xp-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.check-btn:hover {
    background: var(--xp-color);
    color: #fff;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--accent-glow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

.form-group select option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.secondary-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
}

/* Notifications */
.notification-overlay {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--panel-bg);
    border: 1px solid var(--xp-color);
    padding: 1.5rem;
    border-radius: 15px;
    transform: translateY(200%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}

.notification-overlay.active {
    transform: translateY(0);
}

.notif-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--xp-color);
}

/* Failure/Regret Effect */
.mission-item.completed {
    opacity: 0.6;
    border-color: var(--xp-color);
    background: rgba(77, 166, 255, 0.05);
}

.mission-item.completed .mission-content h4 {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.mission-item.completed .difficulty-tag {
    filter: grayscale(1);
    opacity: 0.5;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.aura-loss {
    background-color: rgba(255, 0, 0, 0.1) !important;
    animation: shake 0.5s ease-in-out;
}

.level-up {
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 5px var(--xp-color);
    }

    50% {
        box-shadow: 0 0 20px var(--xp-color);
    }

    100% {
        box-shadow: 0 0 5px var(--xp-color);
    }
}

/* Responsive Grid */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .time-weather {
        order: 2;
    }

    .aura-title {
        order: 1;
    }

    .controls {
        order: 3;
    }
}