:root {
    --primary: #2c3e50; 
    --accent: #34495e; 
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #2d3436;
    
    /* Status Colors */
    --safe: #00b894; 
    --warn: #fdcb6e; 
    --danger: #d63031;
    --muted: #b2bec3;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* Animations */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes glitch {
    0% { text-shadow: 2px 2px #ff00c1, -2px -2px #00fff9; clip-path: inset(10% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { text-shadow: 2px 2px #ff00c1, -2px -2px #00fff9; clip-path: inset(30% 0 10% 0); }
}

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

.glitch-effect {
    animation: glitch 0.3s infinite;
    color: var(--danger);
    font-weight: bold;
}

.shake-effect {
    animation: shake 0.5s;
}

/* Layout */
.game-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--bg);
    padding-bottom: 1rem;
}

/* Status Bars */
.status-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    justify-content: space-around;
    flex-wrap: wrap;
}

.metric {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    transition: color 0.3s;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tunneling Effect Overlay */
.tunnel-vision {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.8) 90%);
    opacity: 0;
    transition: opacity 1s;
    z-index: 1000;
}

/* Cards & Choices */
.card-stack {
    perspective: 1000px;
    position: relative;
    min-height: 200px;
}

.event-card {
    background: white;
    border: 1px solid #ddd;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease-out;
}

.choice-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 10px 0;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.choice-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary);
    transform: translateX(5px);
}

.choice-btn.crisis {
    border-color: var(--danger);
    color: var(--danger);
}

.choice-btn.crisis:hover {
    background: #fff0f0;
}

/* Inventory Styles */
#coping-sidebar button {
    transition: background 0.2s;
}

#coping-sidebar button:hover:not(:disabled) {
    background-color: #e2e6ea !important;
}

/* Charts & Visuals */
.chart-container {
    width: 100%;
    height: 200px;
    margin-top: 2rem;
    position: relative;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-label {
    font-size: 0.7rem;
    fill: #666;
}
