:root {
    --primary-color: #ef4444;
    /* Red */
    --secondary-color: #f87171;
    --accent-color: #fbbf24;
    --background-color: #fef2f2;
    --text-color: #991b1b;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#game-header {
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
    color: white;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
}

.stat-value {
    font-weight: bold;
    font-family: monospace;
    font-size: 1.2rem;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

#game-area {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    background-color: #fef2f2;
}

.hero-area {
    flex: 2;
    background: white;
    border: 2px solid #fecaca;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero {
    font-size: 5rem;
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
}

.hero:active {
    transform: scale(0.9);
}

.hero.target {
    filter: drop-shadow(0 0 10px #22c55e);
}

/* Use JS to change visual cues */

.event-log {
    flex: 1;
    background: #1e293b;
    color: #22c55e;
    border-radius: 10px;
    padding: 10px;
    font-family: monospace;
    display: flex;
    flex-direction: column;
}

.event-log h3 {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    border-bottom: 1px solid #475569;
    padding-bottom: 5px;
}

.log-content {
    flex: 1;
    overflow-y: auto;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column-reverse;
    /* Newest at bottom visually if not reversed? No, keep std and scroll */
}

.log-entry {
    margin-bottom: 2px;
}

.log-entry.success {
    color: #fbbf24;
}

.log-entry.error {
    color: #ef4444;
}

.mission-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 2px solid var(--primary-color);
}

.mission-text {
    font-size: 1.2rem;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 320px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
}

.btn-secondary {
    background-color: transparent;
    color: #64748b;
    border: 2px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
}