/* PlayStation 1 Authentic Styling */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

* {
    font-family: 'JetBrains Mono', monospace;
}

.ps1-background {
    background: linear-gradient(135deg, #4A0E4E 0%, #2D1B69 50%, #1A0A2E 100%);
    position: relative;
    overflow: hidden;
}

.playstation-logo {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    background: linear-gradient(45deg, #ffffff, #ccccff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.1), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

.memory-card {
    background: linear-gradient(145deg, #666666, #444444);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: perspective(1000px) rotateX(5deg);
    transition: transform 0.3s ease;
}

.memory-card:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
}

.save-slot {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #555555, #333333);
    border: 1px solid #888888;
    transition: all 0.2s ease;
}

.save-slot:hover {
    background: linear-gradient(145deg, #666666, #444444);
    box-shadow: 0 0 10px rgba(106, 90, 205, 0.5);
}

.scan-lines::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* PlayStation button styles */
button:focus {
    outline: 2px solid #6A5ACD;
    outline-offset: 2px;
}

/* Glow effects */
.memory-card {
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(106, 90, 205, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Text glitch effect for retro feel */
.playstation-logo {
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 30px rgba(106, 90, 205, 0.8), 0 0 40px rgba(106, 90, 205, 0.6); }
}

/* Responsive design */
@media (max-width: 768px) {
    .memory-card {
        transform: none;
    }
    
    .memory-card:hover {
        transform: scale(1.02);
    }
    
    .particles::before {
        background-size: 100px 50px;
    }
}

/* Custom scrollbar for save slots */
.save-slot::-webkit-scrollbar {
    width: 4px;
}

.save-slot::-webkit-scrollbar-track {
    background: #333;
}

.save-slot::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 2px;
}

.save-slot::-webkit-scrollbar-thumb:hover {
    background: #888;
}