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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    color: #e4e4e4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: #fff;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #16213e;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 18px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #533483 0%, #0f3460 100%);
    border-radius: 6px 6px 0 0;
}

.stat-card:hover {
    border-color: #533483;
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.stat-card.credit-score {
    background: #2d1b3d;
    border-color: #8b5a9f;
}

.stat-card.credit-score::before {
    background: linear-gradient(90deg, #8b5a9f 0%, #533483 100%);
}

.stat-card.savings {
    background: #1a2e3d;
    border-color: #4a90a4;
}

.stat-card.savings::before {
    background: linear-gradient(90deg, #4a90a4 0%, #2d5a6d 100%);
}

.pay-debt-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #2d5a6d;
    color: #fff;
    border: 1px solid #4a90a4;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.pay-debt-btn:hover {
    background: #4a90a4;
    border-color: #6bb3c7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.7;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-subtitle {
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
    }
}

.event-card {
    background: #16213e;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.event-type {
    background: #0f3460;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-day {
    color: #a0a0a0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-content h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #fff;
    font-weight: 600;
}

.event-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #c0c0c0;
    margin-bottom: 25px;
}

.event-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: #0f3460;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.option-btn:hover {
    background: #1a4a6e;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.option-btn:active {
    transform: translateX(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.option-btn.danger {
    background: #4a1a2e;
    border-color: #8b3a4f;
}

.option-btn.danger:hover {
    background: #5a2a3e;
}

.option-btn.success {
    background: #1a3a2e;
    border-color: #3a6a5e;
}

.option-btn.success:hover {
    background: #2a4a3e;
}

.transaction-log {
    background: #16213e;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.3);
    max-height: 500px;
    overflow-y: auto;
}

.transaction-log h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.log-entry {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #533483;
    background: rgba(15, 52, 96, 0.3);
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-entry.expense {
    border-left-color: #8b3a4f;
    background: rgba(74, 26, 46, 0.3);
}

.log-entry.income {
    border-left-color: #3a6a5e;
    background: rgba(26, 58, 46, 0.3);
}

.log-entry.interest {
    border-left-color: #8b7a3f;
    background: rgba(74, 66, 26, 0.3);
}

.log-entry .log-amount {
    font-weight: 700;
    margin-top: 5px;
    color: #fff;
}

.game-controls {
    text-align: center;
    padding: 20px;
}

.btn-primary {
    background: #533483;
    color: #fff;
    border: 2px solid #6b4a9f;
    padding: 14px 35px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #6b4a9f;
    border-color: #8b6abf;
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #2a1a3d;
    border-color: #3a2a4d;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.game-over-content {
    background: #16213e;
    border: 3px solid #0f3460;
    border-radius: 6px;
    padding: 40px;
    text-align: center;
    max-width: 550px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-stats {
    margin: 20px 0;
    font-size: 1rem;
    background: rgba(15, 52, 96, 0.3);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.final-stats p {
    margin: 12px 0;
    color: #c0c0c0;
}

.final-stats strong {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

#finalMessage {
    margin-top: 20px;
    padding: 15px;
    background: rgba(15, 52, 96, 0.5);
    border-radius: 4px;
    font-size: 0.95rem;
    color: #e4e4e4;
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.6;
}

/* Scrollbar styling */
.transaction-log::-webkit-scrollbar {
    width: 8px;
}

.transaction-log::-webkit-scrollbar-track {
    background: rgba(15, 52, 96, 0.5);
    border-radius: 4px;
}

.transaction-log::-webkit-scrollbar-thumb {
    background: #533483;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transaction-log::-webkit-scrollbar-thumb:hover {
    background: #6b4a9f;
}

/* Animation for stat updates */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-value.updated {
    animation: pulse 0.4s ease;
}

.achievements-panel {
    background: #16213e;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.achievements-panel h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

#achievementsList {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.achievement {
    background: rgba(15, 52, 96, 0.5);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0a0;
}

.achievement.unlocked {
    background: rgba(83, 52, 131, 0.4);
    color: #fff;
    border-color: #6b4a9f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement.locked {
    opacity: 0.5;
    background: rgba(15, 52, 96, 0.3);
}

.daily-goal {
    background: #2d1b3d;
    color: #fff;
    border: 2px solid #533483;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease;
}

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

.goal-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.goal-icon {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.goal-text {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.goal-reward {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.btn-secondary {
    background: rgba(15, 52, 96, 0.5);
    color: #fff;
    border: 2px solid #0f3460;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    background: rgba(15, 52, 96, 0.7);
    border-color: #533483;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #16213e;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: none;
    animation: slideInRight 0.4s ease;
    border: 2px solid #0f3460;
    color: #fff;
    max-width: 350px;
}

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

.notification.show {
    display: block;
}

.notification.success {
    border-left: 4px solid #3a6a5e;
    border-color: #3a6a5e;
}

.notification.error {
    border-left: 4px solid #8b3a4f;
    border-color: #8b3a4f;
}

.notification.achievement {
    border-left: 4px solid #8b7a3f;
    border-color: #8b7a3f;
    background: #2d1b3d;
}

.game-over-content.lose {
    border-color: #8b3a4f;
}

.game-over-content.win {
    border-color: #3a6a5e;
}

.achievement-badge {
    display: inline-block;
    background: rgba(83, 52, 131, 0.5);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 5px;
    border: 1px solid #533483;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
