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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

a { color: #4fc3f7; text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* Top bar */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #16213e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid #0f3460;
}

#topbar .logo {
    font-size: 20px;
    font-weight: bold;
    color: #e94560;
    letter-spacing: 2px;
}

#topbar .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

#topbar .score-display {
    color: #ffd700;
    font-weight: bold;
}

#topbar .nav-links {
    display: flex;
    gap: 12px;
}

#topbar .nav-links a {
    color: #a0a0c0;
    font-size: 13px;
}

#topbar button {
    background: #0f3460;
    color: #e0e0e0;
    border: 1px solid #4fc3f7;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

#topbar button:hover {
    background: #1a4080;
}

/* Status bar */
#statusbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: #16213e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    color: #808090;
    z-index: 100;
    border-top: 1px solid #0f3460;
}

#statusbar .completion-bar {
    width: 120px;
    height: 8px;
    background: #0f3460;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

#statusbar .completion-fill {
    height: 100%;
    background: #4fc3f7;
    transition: width 0.3s ease;
}

/* Canvas container */
#game-container {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 32px;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#game-canvas.panning {
    cursor: grabbing;
}

/* Tooltip */
#tooltip {
    position: fixed;
    background: #16213e;
    border: 1px solid #4fc3f7;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    max-width: 300px;
    pointer-events: none;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#tooltip .clue-direction {
    color: #4fc3f7;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

#tooltip .clue-text {
    color: #e0e0e0;
    line-height: 1.3;
    margin-bottom: 6px;
}

#tooltip .clue-text:last-child {
    margin-bottom: 0;
}

/* Auth modal overlay */
#auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

#auth-modal {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 32px;
    width: 360px;
    max-width: 90vw;
}

#auth-modal h2 {
    color: #e94560;
    margin-bottom: 20px;
    text-align: center;
}

#auth-modal .form-group {
    margin-bottom: 14px;
}

#auth-modal label {
    display: block;
    font-size: 13px;
    color: #a0a0c0;
    margin-bottom: 4px;
}

#auth-modal input, #auth-modal select {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}

#auth-modal input:focus, #auth-modal select:focus {
    outline: none;
    border-color: #4fc3f7;
}

#auth-modal .btn-primary {
    width: 100%;
    padding: 10px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
}

#auth-modal .btn-primary:hover {
    background: #d63050;
}

#auth-modal .toggle-auth {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
}

#auth-modal .error-msg {
    color: #e94560;
    font-size: 13px;
    text-align: center;
    margin-top: 8px;
}

/* Point popup animation */
.point-popup {
    position: fixed;
    color: #ffd700;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    z-index: 150;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-40px); }
}

/* Wrong guess popup */
.wrong-popup {
    position: fixed;
    color: #e94560;
    font-weight: bold;
    font-size: 14px;
    pointer-events: none;
    z-index: 150;
    animation: shakeAndFade 0.6s ease-out forwards;
}

@keyframes shakeAndFade {
    0% { opacity: 1; transform: translateX(0); }
    15% { transform: translateX(-4px); }
    30% { transform: translateX(4px); }
    45% { transform: translateX(-2px); }
    60% { transform: translateX(2px); opacity: 0.7; }
    100% { opacity: 0; transform: translateX(0) translateY(-20px); }
}
