/* --- Global Reset & Basic Styling --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Variables for Cyberpunk Theme --- */
:root {
    --neon-blue: #08f7fe; /* Light blue */
    --neon-pink: #fe53bb; /* Bright pink */
    --neon-green: #09fbd3; /* Greenish-blue */
    --dark-bg: #0a0a0e; /* Very dark background */
    --accent-color: var(--neon-blue); /* Primary accent color */
    --secondary-accent: var(--neon-pink); /* Secondary accent color */
    --text-color: #e0e0e0; /* Light gray for readability */
    --border-color: rgba(8, 247, 254, 0.4); /* Semi-transparent neon blue for borders */
    --glow-intensity: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue);
    --hover-glow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

/* --- Global Body & Typography --- */
body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif; /* Keep your existing font */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll from background elements */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--accent-color);
    text-shadow: var(--glow-intensity);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

p {
    line-height: 1.6;
    color: var(--text-color);
}

a {
    color: var(--neon-green);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    color: var(--neon-blue);
    text-shadow: var(--glow-intensity);
}

/* --- Container Styling --- */
.container {
    background: rgba(15, 14, 23, 0.95); /* Semi-transparent dark container */
    border: 1px solid var(--border-color);
    box-shadow: var(--glow-intensity);
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    position: relative;
    z-index: 10; /* Ensure content is above background effects */
    border-radius: 8px; /* Slightly rounded edges for a techy feel */
    box-sizing: border-box;
}

/* --- Form Elements --- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="datetime-local"], /* Added for consistency */
textarea,
select {
    background: rgba(0, 0, 0, 0.7); /* Darker input background */
    border: 1px solid var(--secondary-accent);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    width: 100%; /* Full width */
    max-width: 100%; /* Ensure it doesn't exceed parent */
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(254, 83, 187, 0.5); /* Pink glow on input */
    transition: all 0.3s ease;
    -webkit-appearance: none; /* Remove default browser styling for better control */
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus, /* Added for consistency */
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: var(--glow-intensity);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Make calendar icon visible on dark background */
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* --- Buttons --- */
button,
.button, /* For anchor tags styled as buttons */
input[type="submit"] {
    background: var(--neon-blue);
    color: var(--dark-bg); /* Dark text on neon button */
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    box-shadow: 0 0 10px var(--neon-blue);
    display: inline-block; /* For buttons that are anchors */
    text-align: center;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    background: var(--neon-pink);
    box-shadow: var(--hover-glow);
    transform: translateY(-2px);
}

/* Specific button styles for admin actions */
.action-btn {
    background: var(--neon-pink); /* Different color for action buttons */
    box-shadow: 0 0 8px var(--neon-pink);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    margin: 5px; /* Space between buttons */
}

.action-btn:hover {
    background: var(--neon-blue);
    box-shadow: 0 0 12px var(--neon-blue);
}


.error-message {
    color: var(--neon-pink);
    background-color: rgba(254, 83, 187, 0.1);
    border: 1px solid var(--neon-pink);
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* --- CYBERPUNK BACKGROUND SYSTEM (Canvas Section related) --- */
.futuristic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Even lower than -1 to ensure content is always on top */
    pointer-events: none; /* Ensure background doesn't interfere with clicks */
    opacity: 0.7; /* General opacity for background elements */
}

/* Grid Pattern */
.bg-grid {
    background:
        linear-gradient(rgba(8, 247, 254, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 247, 254, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: grid-pulse 10s infinite alternate; /* Subtle pulsing animation */
}

@keyframes grid-pulse {
    0% { background-color: rgba(0,0,0,0); }
    100% { background-color: rgba(8, 247, 254, 0.01); } /* Very subtle glow */
}

/* Animated Particles (Requires JS to generate .particle elements) */
.bg-particles {
    position: absolute; /* particles will be inside this, or directly in body */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Ensure particles don't escape */
    z-index: -1; /* Higher than grid to be visible over it */
}

.particle {
    position: absolute;
    background: var(--neon-green); /* Green particles */
    border-radius: 50%;
    animation: float var(--animation-duration) infinite ease-in-out;
    opacity: 0; /* Start invisible */
    box-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green);
}

/* Keyframes for particle animation - these are already in your script.js but CSS version is also good */
@keyframes float {
    0% { transform: translateY(100vh) translateX(calc(var(--rand-x) * 1px)); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-20vh) translateX(calc(var(--rand-x) * 1px)); opacity: 0; }
}


/* Neon Cityscape Silhouette */
.bg-city {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px; /* Adjust height as needed */
    background: linear-gradient(to top, #000 0%, transparent 100%),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%230F0E17" fill-opacity="1" d="M0,192L48,170.7C96,149,192,107,288,112C384,117,480,171,576,192C672,213,768,203,864,192C960,181,1056,171,1152,149.3C1248,128,1344,96,1392,80L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path><path fill="%2308F7FE" fill-opacity="0.2" d="M0,160L48,144C96,128,192,96,288,106.7C384,117,480,171,576,197.3C672,224,768,224,864,208C960,192,1056,160,1152,149.3C1248,139,1344,149,1392,154.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat center bottom;
    background-size: cover;
    z-index: -1; /* Higher than grid but lower than content */
    animation: city-glow 8s infinite alternate; /* Subtle glow for the city */
}

@keyframes city-glow {
    0% { filter: drop-shadow(0 0 5px var(--neon-blue)); }
    100% { filter: drop-shadow(0 0 15px var(--neon-green)); }
}

/* Cyberpunk Cursor */
.cyber-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    z-index: 9999;
    mix-blend-mode: exclusion; /* Makes it look cool on different backgrounds */
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

.cyber-cursor.hover {
    width: 40px;
    height: 40px;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
}

/* FOR 404 PAGE - Specific Grid */
.cyberpunk-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(8, 247, 254, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(8, 247, 254, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: grid-scan 8s infinite linear;
}

@keyframes grid-scan {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Modal Basic Styling (copied from admin_links.php for global use) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: var(--dark-bg);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
    margin: 5% auto; /* 15% from the top and centered */
    padding: 30px;
    border-radius: 10px;
    width: 80%; /* Could be more responsive */
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--neon-green);
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
}

.modal-content input[type="url"],
.modal-content input[type="text"] {
    width: calc(100% - 20px); /* Adjust for padding */
    margin-bottom: 20px;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.close-button {
    color: var(--neon-pink);
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--neon-blue);
    text-decoration: none;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    button, .button, input[type="submit"] {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    .futuristic-bg {
        opacity: 0.5; /* Reduce intensity on smaller screens */
    }
    .bg-city {
        height: 200px; /* Smaller city silhouette */
    }
    .cyberpunk-grid {
        background-size: 30px 30px; /* Smaller grid cells */
    }
}
