:root {
    --tile-size: 55px;
    --color-off: #ecf0f1;
    --color-on: #e74c3c;
    --accent: #f1c40f;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 15px;
}

.stats-bar {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1.1rem;
    border: 1px solid #444;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.8rem;
    color: #bdc3c7;
    margin-bottom: 5px;
}

.game-area {
    display: flex;
    gap: 50px;
    margin-top: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.grid {
    display: grid;
    gap: 6px;
    background: #34495e;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.tile {
    width: var(--tile-size);
    height: var(--tile-size);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tile:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.tile:active {
    transform: scale(0.95);
}

.tile.is-on {
    background-color: var(--color-on);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.tile.is-off {
    background-color: var(--color-off);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}

.target-grid {
    display: grid;
    gap: 3px;
    background: #34495e;
    padding: 8px;
    border-radius: 6px;
    pointer-events: none;
}

.target-tile {
    width: 22px;
    height: 22px;
    border-radius: 3px;
}

.target-tile.is-on {
    background-color: var(--color-on);
}

.target-tile.is-off {
    background-color: var(--color-off);
}

.message-box {
    height: 40px;
    margin-top: 20px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.iteration-dots {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #555;
}

.dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}