/* Main CSS - Global styles and base layout */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', cursive;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

/* Animations */
@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff; }
    50% { text-shadow: 0 0 20px #0ff, 0 0 30px #0ff, 0 0 40px #0ff, 0 0 50px #0ff; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* CRT Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.crt-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scanline 8s linear infinite;
}

.crt-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

/* Container */
.container {
    text-align: center;
    background: rgba(10, 10, 30, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3),
                inset 0 0 50px rgba(0, 255, 255, 0.1);
    max-width: 100%;
    width: 100%;
    border: 2px solid #0ff;
    margin: 0 auto;
}

/* Typography */
h1 {
    color: #ff00ff;
    margin-bottom: 10px;
    font-size: 2em;
    animation: glow 2s ease-in-out infinite;
    letter-spacing: 3px;
    text-transform: uppercase;
}

h2 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
}

.subtitle {
    color: #0ff;
    font-size: 0.5em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #0ff;
}

/* Buttons */
button {
    padding: 12px 24px;
    font-size: 12px;
    font-family: 'Press Start 2P', cursive;
    border: 3px solid;
    cursor: pointer;
    transition: all 0.1s ease;
    color: #000;
    text-transform: uppercase;
    background: #0f0;
    border-color: #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    text-shadow: none;
}

button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    background: #555;
    border-color: #555;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

/* Button variants */
.btn-primary {
    background: #0f0;
    border-color: #0f0;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.btn-danger {
    background: #f00;
    border-color: #f00;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.btn-warning {
    background: #ff0;
    border-color: #ff0;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.btn-danger:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

/* Mobile-First Responsive Design */

/* Small mobile devices (320px and up) */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
        border-radius: 5px;
    }
    
    h1 { 
        font-size: 1em; 
        margin-bottom: 8px;
        letter-spacing: 1px;
    }
    
    .subtitle { 
        font-size: 0.35em; 
        margin-bottom: 10px;
    }
    
    button { 
        font-size: 8px; 
        padding: 8px 12px;
        margin: 2px;
    }
    
    .nav a {
        font-size: 8px;
        padding: 8px 12px;
        margin: 2px;
    }
}

/* Medium mobile devices (481px and up) */
@media (min-width: 481px) and (max-width: 768px) {
    h1 { font-size: 1.2em; }
    .subtitle { font-size: 0.4em; }
    button { font-size: 9px; padding: 10px 15px; }
}

/* Tablet and up (769px and up) */
@media (min-width: 769px) {
    .container {
        max-width: 900px;
        padding: 20px;
    }
    
    h1 { font-size: 2em; }
    .subtitle { font-size: 0.5em; }
    button { font-size: 12px; padding: 12px 24px; }
}
