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

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    height: 100vh;
    color: #fff;
    overflow: hidden;
}

.game-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.game-header {
    text-align: center;
    flex-shrink: 0;
}

.game-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #00f5ff, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 245, 255, 0.3);
    letter-spacing: 6px;
    margin-bottom: 20px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 25px;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.info-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.info-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* Control Section */
.control-section {
    text-align: center;
    flex-shrink: 0;
}

.status-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    padding: 12px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: inline-block;
    margin-bottom: 20px;
}

#status-message {
    font-size: 1rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.modern-btn {
    position: relative;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid;
    border-radius: 50px;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    z-index: -1;
}

.start-btn {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.start-btn::before {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.start-btn:hover {
    color: #fff;
    box-shadow: 0 0 30px rgba(78, 205, 196, 0.4);
    transform: translateY(-2px);
}

.start-btn:hover::before {
    left: 0;
}

.reset-btn {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.reset-btn::before {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.reset-btn:hover {
    color: #fff;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
}

.reset-btn:hover::before {
    left: 0;
}

.help-btn {
    border-color: #f39c12;
    color: #f39c12;
}

.help-btn::before {
    background: linear-gradient(45deg, #f39c12, #d68910);
}

.help-btn:hover {
    color: #fff;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.4);
    transform: translateY(-2px);
}

.help-btn:hover::before {
    left: 0;
}

.modern-btn:active {
    transform: translateY(0);
}

.modern-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Game Board */
.game-board {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.simon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.simon-button {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border: 3px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.button-inner {
    width: 100%;
    height: 100%;
    border-radius: 17px;
    position: relative;
    transition: all 0.2s ease;
}

.simon-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 2;
}

.green-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.3);
}

.red-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.yellow-btn {
    background: linear-gradient(135deg, #f39c12, #d68910);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
}

.blue-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.simon-button:hover:not(.disabled) {
    transform: translateY(-5px) scale(1.02);
    filter: brightness(1.1);
}

.simon-button:active:not(.disabled) {
    transform: translateY(-2px) scale(0.98);
}

.simon-button.active {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.5) saturate(1.3);
    z-index: 10;
}

.simon-button.active::before {
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.simon-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #00f5ff;
    font-size: 1.8rem;
    letter-spacing: 3px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.instruction-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-number {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.keyboard-hint {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.keyboard-hint h3 {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.key-mapping {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
}

.key {
    background: linear-gradient(45deg, #333, #555);
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #00f5ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 8px;
}

/* Special Effects */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 245, 255, 0.8);
    }
}

.pulse-effect {
    animation: pulseGlow 1s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    .game-header h1 {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .game-info {
        gap: 20px;
    }
    
    .info-card {
        padding: 12px 20px;
        min-width: 80px;
    }
    
    .info-value {
        font-size: 1.5rem;
    }
    
    .game-controls {
        gap: 15px;
    }
    
    .modern-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .simon-button {
        width: 130px;
        height: 130px;
    }
    
    .simon-grid {
        gap: 10px;
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .simon-button {
        width: 110px;
        height: 110px;
    }
    
    .key-mapping {
        flex-direction: column;
        align-items: center;
    }
}
