:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --primary-color: #00ff88; /* Positive/Buy */
    --secondary-color: #ff3e3e; /* Negative/Sell */
    --accent-color: #888888; /* Neutral */
    --ui-glow: 0 0 15px rgba(0, 255, 136, 0.4);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    color: var(--text-color);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
}

header {
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.hud {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat {
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 2px;
    letter-spacing: 0.1em;
}

.value {
    font-size: 1.1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#current-price {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.positive { color: var(--primary-color); text-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
.negative { color: var(--secondary-color); text-shadow: 0 0 10px rgba(255, 62, 62, 0.3); }

canvas {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    background: #000;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.message {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 20, 0.8);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1.5rem;
    color: #aaa;
    line-height: 1.6;
    font-size: 1.1rem;
}

button {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--ui-glow);
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
}

button:active {
    transform: translateY(1px);
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 2.5rem 0;
}

.final-stats .stat {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.final-stats .value {
    font-size: 2rem;
}

#reveal-info {
    margin: 20px 0;
    padding: 25px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 8px;
}

#reveal-stock-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
}

#outcome-msg {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 20px;
    color: #fff;
}
