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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

.game-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.simon-game {
    position: relative;
    width: 400px;
    height: 400px;
    background: #222;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

.simon-button {
    position: absolute;
    width: 48%;
    height: 48%;
    cursor: pointer;
    transition: all 0.1s;
    opacity: 0.8;
}

.simon-button:hover {
    opacity: 0.9;
}

.simon-button.active {
    opacity: 1 !important;
    transform: scale(0.95);
}

.red {
    background: #dc3545;
    top: 2%;
    left: 2%;
    border-radius: 100% 0 0 0;
}

.blue {
    background: #007bff;
    top: 2%;
    right: 2%;
    border-radius: 0 100% 0 0;
}

.green {
    background: #28a745;
    bottom: 2%;
    left: 2%;
    border-radius: 0 0 0 100%;
}

.yellow {
    background: #ffc107;
    bottom: 2%;
    right: 2%;
    border-radius: 0 0 100% 0;
}

.center-console {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: #333;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.score {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.start-btn {
    padding: 0.5rem 1.5rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.start-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.start-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

.info-panel {
    text-align: center;
    margin-bottom: 2rem;
}

.status {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.best-score {
    font-size: 1.1rem;
    opacity: 0.9;
}

.high-scores {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.high-scores h2 {
    margin-bottom: 1rem;
    text-align: center;
}

#highScoresList {
    list-style: none;
}

#highScoresList li {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
}

.game-over-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a5298;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-content input {
    width: 100%;
    padding: 0.5rem;
    margin: 1rem 0;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-content button {
    padding: 0.5rem 1.5rem;
    margin: 0.5rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#submitScore {
    background: #28a745;
    color: white;
}

#playAgain {
    background: #007bff;
    color: white;
}

footer {
    text-align: center;
    padding: 2rem;
    opacity: 0.8;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .simon-game {
        width: 300px;
        height: 300px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .center-console {
        width: 120px;
        height: 120px;
    }
    
    .score {
        font-size: 2rem;
    }
}