:root {
    --primary: #bb86fc;
    --secondary: #6d78ff;
    --accent: #78ff6d;
    --neutral: #ffde6d;
    --dark: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #2a2a2a;
    --text-color: #e0e0e0;
    --text-light: #a0a0a0;
    --text-white: #ffffff;
    --button-0-color: #ff5252;
    --button-1-color: #4caf50;
    --button-2-color: #2196f3;
    --button-3-color: #ffeb3b;
    --border-radius: 12px;
    --shadow-light: 0 3px 10px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

body.dark-theme {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Game Page Header */
.game-page-header {
    background-color: #1f1f1f;
    padding: 0.8rem 0;
    border-bottom: 1px solid #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-color);
}

/* Main Game Content Area */
.game-content {
    padding: 2rem 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(187, 134, 252, 0.3);
    background: linear-gradient(90deg, var(--primary), #9d70d8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* The Game Container */
#game-container {
    width: 100%;
    max-width: 800px;
    min-height: 500px;
    background-color: var(--bg-card);
    border: 2px solid #444;
    border-radius: 8px;
    margin: 0 auto 2rem auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
}

/* Game Instructions Area */
.game-instructions {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    max-width: 700px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

.game-instructions h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.game-instructions p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Footer Styles */
.site-footer {
    background-color: #1f1f1f;
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

.site-footer p {
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .game-title {
        font-size: 1.8rem;
    }
    #game-container {
        min-height: 400px;
    }
    .game-instructions {
        width: 95%;
        padding: 0.8rem 1rem;
    }
    .game-instructions h2 {
        font-size: 1.2rem;
    }
    .game-instructions p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.6rem;
    }
    #game-container {
        min-height: 300px;
        border-width: 1px;
    }
    .back-link {
        font-size: 0.9rem;
    }
}

/* ================= Game-specific styles below ================= */

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    width: 100%;
}

#game-area {
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#start-screen, #game-over-screen {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(18, 18, 18, 0.9);
}

#start-screen h2, #game-over-screen h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

button {
    background: linear-gradient(90deg, var(--primary), #9d70d8);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(187, 134, 252, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(187, 134, 252, 0.4);
}

button:active {
    transform: translateY(1px);
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    width: 300px;
    height: 300px;
    margin: 0 auto 20px;
}

.pattern-button {
    border-radius: 15px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid transparent;
}

.pattern-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pattern-button:hover::after {
    opacity: 1;
}

.pattern-button.active {
    transform: scale(0.95);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    border: 3px solid white;
    position: relative;
    z-index: 10;
}

#button-0 {
    background-color: var(--button-0-color);
}

#button-1 {
    background-color: var(--button-1-color);
}

#button-2 {
    background-color: var(--button-2-color);
}

#button-3 {
    background-color: var(--button-3-color);
}

#status-message {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 15px;
    min-height: 30px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.hidden {
    display: none !important;
}

@keyframes correct-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px var(--button-1-color); }
    100% { transform: scale(1); }
}

.correct-animation {
    animation: correct-animation 0.5s;
}

@keyframes incorrect-animation {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.incorrect-animation {
    animation: incorrect-animation 0.5s;
}

@media screen and (max-width: 600px) {
    .game-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .pattern-grid {
        width: 250px;
        height: 250px;
        gap: 10px;
    }

    .game-title {
        font-size: 1.8rem;
    }
} 