/* --- Global Styles & Dynamic Background --- */
:root {
    --x: 50%;
    --y: 50%;
}

body {
    background-color: #111;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    text-align: center;
    overflow: hidden; /* Prevents scrollbars during animations */
    
    /* The Background Pattern */
    background-image: 
        radial-gradient(
            circle at var(--x) var(--y), 
            rgba(0, 255, 204, 0.15) 0%, 
            transparent 20%
        ),
        linear-gradient(#292828 1px, transparent 1px),
        linear-gradient(90deg, #292828 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px; /* Grid size */
    background-position: 0 0, -1px -1px, -1px -1px;
    transition: background 0.1s ease; /* Smooth movement */
}

/* --- Container --- */
.container {
    background-color: #2b2b2b;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 10;
    transition: transform 0.2s ease-out; /* For 3D tilt effect */
}

/* --- Typography --- */
h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

#status-area {
    min-height: 60px;
    margin: 20px 0;
    font-size: 1.1rem;
    color: #aaaaaa;
    line-height: 1.5;
}

.highlight {
    color: #ffcc00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.8);
}

/* --- Button Styling --- */
button {
    background-color: #00ffcc;
    color: #1a1a1a;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

button:hover {
    background-color: #00cca3;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: none;
    color: #888;
    box-shadow: none;
}

/* --- SPECIAL EFFECTS --- */

/* 1. Flash Overlay */
#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    transition: opacity 0.2s;
}

/* 2. Hyperspace Animation Class (Added via JS) */
.hyperspace-mode .container {
    animation: warpSpeed 4.5s forwards ease-in;
}

.hyperspace-mode #flash-overlay {
    animation: flashBang 4.5s forwards ease-in;
}

/* Animation Keyframes */
@keyframes warpSpeed {
    0% {
        transform: scale(1) translate(0, 0);
    }
    20% {
        transform: scale(0.9) translate(0, 5px); /* Pull back slightly */
    }
    40% {
        transform: translate(-5px, 5px); /* Shake */
    }
    60% {
        transform: translate(5px, -5px); /* Shake */
    }
    100% {
        transform: scale(10); /* Zoom into camera */
        opacity: 0;
        filter: blur(10px);
    }
}

@keyframes flashBang {
    0% { opacity: 0; }
    90% { opacity: 1; } /* Blinding white right before redirect */
    100% { opacity: 1; }
}

/* --- Footer Link Styling --- */
.footer-legal {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 20;
}

.footer-legal a {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-legal a:hover {
    color: #00ffcc;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
}

/* --- NEW: PRIVACY OVERLAY STYLES --- */
#privacy-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111; /* Same blank background */
    z-index: 9999; /* On top of everything */
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Allows scrolling if text is long */
    text-align: left;
}

/* This class is added by JS to show the overlay */
#privacy-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#btn-close-privacy {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    background: transparent;
    border: 1px solid #00ffcc;
    color: #00ffcc;
    box-shadow: none;
}

#btn-close-privacy:hover {
    background: #00ffcc;
    color: #111;
    transform: none;
}

.privacy-content {
    margin-top: 80px; /* Space for the button */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #ccc;
    font-family: sans-serif; /* Easier to read for legal text */
    line-height: 1.6;
}

.privacy-content h2 {
    color: #00ffcc;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

/* New Style for the link under the button */
.legal-agreement {
    margin-top: 20px;
    font-size: 0.75rem;
}

.legal-agreement a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.legal-agreement a:hover {
    color: #00ffcc;
    text-decoration: underline;
}

/* Ensure the overlay covers the whole screen properly */
#privacy-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    text-align: left;
}

#privacy-overlay.active {
    display: block;
}