/* Custom Nokia N97 Styles */
.nokia-phone {
    width: 320px;
    background: linear-gradient(145deg, #4a5568, #2d3748);
    border: 2px solid #1a202c;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.nokia-screen {
    background: #000;
    border: 3px solid #1a202c;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(59, 130, 246, 0.1);
}

.keyboard-container {
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyboard {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyboard.hidden {
    transform: translateY(100%);
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
}

.keyboard.visible {
    max-height: 200px;
}

.keyboard-open {
    margin-top: 10px;
}

/* App-specific animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.app-enter {
    animation: slideIn 0.3s ease-out;
}

/* Nokia-style button effects */
button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Status bar styling */
.status-bar {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Retro glow effects */
.nokia-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
    border-radius: inherit;
}

/* Snake game styling */
.snake-pixel {
    background: #00ff00;
    border: 1px solid #00cc00;
}

.food-pixel {
    background: #ff0000;
    border: 1px solid #cc0000;
    border-radius: 50%;
}

/* Music player visualizer */
@keyframes pulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.music-bar {
    animation: pulse 1s ease-in-out infinite;
}

.music-bar:nth-child(2) { animation-delay: 0.1s; }
.music-bar:nth-child(3) { animation-delay: 0.2s; }
.music-bar:nth-child(4) { animation-delay: 0.3s; }

/* Responsive design */
@media (max-width: 480px) {
    .nokia-phone {
        width: 280px;
        margin: 0 10px;
    }
    
    .nokia-screen {
        height: 320px;
    }
}

/* Loading animation for boot sequence */
@keyframes loadingPulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.loading-dot {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Authentic Nokia styling touches */
.nokia-button {
    background: linear-gradient(145deg, #e2e8f0, #cbd5e0);
    border: 1px solid #a0aec0;
    color: #2d3748;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.nokia-button:active {
    background: linear-gradient(145deg, #cbd5e0, #a0aec0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* T9 predictive text styling */
.t9-suggestion {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    color: #60a5fa;
}

/* Classic Nokia menu transitions */
.menu-transition {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}