/* Custom Dreamcast-inspired styles */

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

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

/* CRT Effect */
.crt-effect {
    position: relative;
}

.crt-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Console 3D Effect */
.console-3d {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.console-3d:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(2deg);
}

/* Game Case Hover Effect */
.game-case {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-case::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 191, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.game-case:hover::before {
    animation: shimmer 0.6s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

/* Loading Bar Animation */
.loading-bar {
    animation: load 3s linear;
}

@keyframes load {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Typewriter Effect */
.typewriter-text p {
    animation: typewriter 0.5s steps(40) forwards;
    opacity: 0;
    border-right: 2px solid #00ff00;
}

.typewriter-text p:nth-child(1) { animation-delay: 0.1s; }
.typewriter-text p:nth-child(2) { animation-delay: 0.3s; }
.typewriter-text p:nth-child(3) { animation-delay: 0.5s; }
.typewriter-text p:nth-child(4) { animation-delay: 0.7s; }
.typewriter-text p:nth-child(5) { animation-delay: 0.9s; }
.typewriter-text p:nth-child(6) { animation-delay: 1.1s; }
.typewriter-text p:nth-child(7) { animation-delay: 1.3s; }
.typewriter-text p:nth-child(8) { animation-delay: 1.5s; }
.typewriter-text p:nth-child(9) { animation-delay: 1.7s; }
.typewriter-text p:nth-child(10) { animation-delay: 1.9s; }

@keyframes typewriter {
    from { opacity: 0; }
    to { opacity: 1; border-right: none; }
}

/* Power Button Glow */
.power-button {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    transition: all 0.3s ease;
}

.power-button:hover {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
}

.power-button:disabled {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    background-color: #16a34a;
}

/* VMU Screen Glow */
.vmu-screen {
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Terminal Window */
.terminal-window {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    position: relative;
}

.terminal-window::before {
    content: '● ● ●';
    position: absolute;
    top: 10px;
    left: 15px;
    color: #ff6b6b;
    font-size: 12px;
}

/* Retro Counter */
.retro-counter {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* VMU Card Rarity Effects */
.vmu-card {
    transition: all 0.3s ease;
    position: relative;
}

.vmu-card:hover {
    transform: translateY(-5px);
}

.vmu-card[class*="border-yellow"] {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.vmu-card[class*="border-purple"] {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* Timeline Animation */
.timeline-item {
    transform: translateX(-20px);
    opacity: 0;
    animation: slideIn 0.6s forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }

@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dreamcast Logo Pulse */
.dreamcast-logo img {
    animation: logoPulse 2s infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Guestbook Entry Animation */
.entry {
    animation: fadeInUp 0.5s ease forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .console-3d {
        transform: none !important;
    }
    
    .game-case {
        transform: none !important;
    }
    
    .vmu-device {
        width: 100% !important;
        max-width: 300px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a202c;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}