:root {
    --primary-color: #6366f1;
    /* Indigo */
    --secondary-color: #818cf8;
    --accent-color: #facc15;
    --background-color: #eef2ff;
    --text-color: #312e81;
    --container-bg: #ffffff;
}

* {
    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: var(--container-bg);
    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: 70px;
    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(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
}

.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;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background-image: radial-gradient(#e0e7ff 1px, transparent 1px);
    background-size: 20px 20px;
}

.magnifying-glass {
    font-size: 6rem;
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.1;
    transform: rotate(30deg);
}

.sequence-container {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 120px;
    align-items: center;
    justify-content: center;
    width: 90%;
}

.seq-item {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.seq-item.missing {
    background-color: #f1f5f9;
    border: 3px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 2rem;
}

.instruction {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: bold;
}

.options-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.option-btn {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: 12px;
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 var(--secondary-color);
}

.option-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 9px 0 var(--secondary-color);
}

.option-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--secondary-color);
}

/* Modal */
.hidden {
    display: none !important;
}

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

.toast {
    position: absolute;
    bottom: 30px;
    background-color: #22c55e;
    color: white;
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: fadeUp 0.3s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.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;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

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