:root {
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #eab308;
    --blue: #3b82f6;
    --primary: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    background-color: var(--bg-dark);
}

.simon-game-container {
    max-width: 500px;
    margin: 80px auto 20px auto;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    position: relative;
}

.simon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.simon-header h1 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--red) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.simon-game-icon-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.simon-back-btn {
    padding: 10px 20px;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.simon-back-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    transform: translateX(-5px);
}

.simon-game-info {
    display: flex;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    padding: 12px 20px;
    border-radius: 18px;
    margin-bottom: 24px;
    font-weight: 700;
    border: 1px solid var(--glass-border);
    font-size: 1.2rem;
}

.simon-screen {
    position: relative;
    padding: 10px;
}

.simon-board {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    background: #0f172a;
    padding: 15px;
    border-radius: 50%;
    border: 8px solid #334155;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.simon-btn {
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
    position: relative;
}

.simon-btn:hover:not(.active) {
    opacity: 0.6;
}

.simon-btn.green {
    background: var(--green);
    border-radius: 100% 0 0 0;
}

.simon-btn.red {
    background: var(--red);
    border-radius: 0 100% 0 0;
}

.simon-btn.yellow {
    background: var(--yellow);
    border-radius: 0 0 0 100%;
}

.simon-btn.blue {
    background: var(--blue);
    border-radius: 0 0 100% 0;
}

.simon-btn.active {
    opacity: 1;
    box-shadow: 0 0 50px currentColor;
    transform: scale(0.96);
    filter: brightness(1.2);
    z-index: 5;
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32%;
    height: 32%;
    background: #1e293b;
    border-radius: 50%;
    border: 8px solid #334155;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.5rem;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: var(--text-light);
}

/* Modal and Message */
.simon-modal,
.simon-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 24px;
    animation: fadeIn 0.3s ease-out;
}

.simon-modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    width: 85%;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.simon-input-group {
    margin-bottom: 25px;
    text-align: left;
}

.simon-input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.simon-input-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.simon-input-group input:focus {
    border-color: var(--primary);
}

.simon-btn-start {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.simon-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(139, 92, 246, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .simon-game-container {
        margin: 80px 10px 20px 10px;
        padding: 15px;
    }
}