/* =========================================
   NIGHTHAWK'S DEN - MASTER STYLESHEET
   WARNING: DO NOT STEAL MY CODE!
   ========================================= */

/* The Arcade Cabinet Vibe */
body {
    background-color: #000000;
    /* Bulletproof Pure CSS Starry Background (No external images needed!) */
    background-image: 
      radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
      radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
      radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 4px);
    background-size: 100px 100px, 60px 60px, 40px 40px;
    background-position: 0 0, 30px 30px, 15px 15px;
    
    color: #00ffcc;
    font-family: "Courier New", Courier, monospace;
    margin: 0;
    padding: 0;
    /* Custom Pixel Cursors Using inline SVGs (no files needed!) */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="%23fff" stroke="%23000" stroke-width="1" d="M0 0l11 11-4 1 3 4-2 1-3-4-3 3z"/></svg>'), auto; 
}

/* Custom Pointer pixel cursor */
a, button, .retro-btn, #coin-slot {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="20"><path fill="%23fff" stroke="%23000" stroke-width="1" d="M5 0h2v2h2v2h2v2h2v5h-2v2h-2v2H7v2H5v-2H3v-2H1v-2H0V8h2V6h2V4h1V0z"/></svg>'), pointer;
}

/* CRT Scanline Overlay Effect (Pure CSS!) */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 9999;
    pointer-events: none; /* Lets you click right through it */
}

#wrapper {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.8);
    border-left: 4px solid #ff00ff;
    border-right: 4px solid #00ffff;
    padding: 20px;
    box-shadow: 0 0 20px #ff00ff, 0 0 20px #00ffff;
}

/* Neon Text Utilities */
.neon-pink { color: #ff00ff; text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff; }
.neon-blue { color: #00ffff; text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff; }
.neon-green { color: #39ff14; text-shadow: 0 0 5px #39ff14, 0 0 10px #39ff14; }

h1 {
    text-align: center;
    font-size: 3em;
    margin-bottom: 5px;
    letter-spacing: 5px;
}

.retro-marquee {
    /* The Container */
    width: 100%;
    overflow: hidden; /* Hides the text when it scrolls off screen */
    white-space: nowrap; /* Forces text to stay on one line */
    
    /* The Retro Look */
    background-color: #000033;
    color: #ffff00;
    font-size: 1.2em;
    font-weight: bold;
    border: 2px dashed #00ffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px #000000;
    box-sizing: border-box; /* Ensures padding doesn't break layout */
}

.marquee-content {
    display: inline-block;
    padding-left: 100%; /* Start the text off the right side of the screen */
    
    /* The Animation Engine */
    animation: scroll-left 20s linear infinite;
}

/* The Animation Keyframes */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Flame Divider Using Retro GIFs */
/* Note: Ensure you uploaded flames.gif to your /img/ folder! */
.flames-divider {
    height: 30px;
    background-image: url('/img/flames.gif'); 
    background-repeat: repeat-x;
    margin: 10px 0;
}

/* Classic Table Layout Structure */
.layout-table {
    width: 100%;
}

#sidebar {
    width: 25%;
    vertical-align: top;
    padding-right: 20px;
}

#main-content {
    width: 75%;
    vertical-align: top;
    border-left: 2px solid #ff00ff;
    padding-left: 20px;
}

/* Navigation Menu */
.nav-box {
    border: 2px solid #00ffff;
    background-color: #001122;
    padding: 10px;
    margin-bottom: 20px;
}

.nav-box h3 {
    margin-top: 0;
    color: #ff00ff;
    border-bottom: 1px solid #00ffff;
    padding-bottom: 5px;
}

.nav-box ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.nav-box li {
    margin-bottom: 10px;
}

a {
    color: #00ffff;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #000000;
    background-color: #39ff14; /* Highlight text when hovered */
    text-decoration: underline;
}

/* High Score Table */
.highscore-table {
    width: 100%;
    border-collapse: collapse;
    border: 3px double #00ffff;
    background-color: #111111;
    text-align: center;
    font-family: "Courier New", Courier, monospace;
}

.highscore-table th {
    background-color: #ff00ff;
    color: #ffffff;
    padding: 10px;
}

.highscore-table td {
    padding: 10px;
    border: 1px solid #333333;
}

/* Simulated Audio Player */
.music-player {
    border: 2px solid #39ff14;
    padding: 10px;
    background-color: #002200;
    text-align: center;
}

/* Make media buttons look clickable */
.fake-audio-controls span {
    cursor: pointer;
    color: #ffffff;
    font-size: 1.2em;
}

.fake-audio-controls span:hover {
    color: #39ff14;
    text-shadow: 0 0 10px #39ff14;
}

/* Resurrecting the BLINK tag! */
.blink {
    animation: blinker 0.8s step-start infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Status Box */
.status-box {
    text-align: center;
    border: 2px dashed #ff0000;
    padding: 10px;
    background: #220000;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.9em;
    color: #aaaaaa;
}

/* =========================================
   DHTML & JS ENHANCEMENTS 
   ========================================= */

/* Make the coin slot look clickable */
#coin-slot {
    cursor: pointer;
    transition: background 0.1s;
}

#coin-slot:active {
    background: #ff0000; /* Flashes red when clicked */
}

/* Odometer Hit Counter Styling */
.hit-counter {
    display: inline-block;
    background-color: #000000;
    color: #ff0000;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: 5px;
    padding: 5px 10px;
    border: 3px inset #555555; /* The classic 3D border */
    text-shadow: 0 0 5px #ff0000;
}

/* Arcade Screen Flash Effect triggered by JS */
.coin-flash {
    animation: flashScreen 0.15s ease-out;
}

@keyframes flashScreen {
    0% { background-color: #ffffff; box-shadow: inset 0 0 100px #ffffff; }
    100% { background-color: #000000; box-shadow: none; }
}

/* The Flying Pixel Coin Animation (for the JS coin.js) */
.falling-coin {
    position: fixed;
    /* Styles for the Emoji Coin */
    font-size: 32px;
    z-index: 10000;
    pointer-events: none;
    animation: coinJump 0.6s ease-out forwards;
}

@keyframes coinJump {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-60px) scale(1.2); opacity: 1; }
    100% { transform: translateY(20px) scale(1); opacity: 0; }
}

/* Retro Select Dropdown (for the Music Player) */
.retro-select {
    background-color: #000033;
    color: #00ffff;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.1em;
    font-weight: bold;
    border: 2px solid #ff00ff;
    padding: 5px;
    width: 80%;
    margin-bottom: 10px;
    cursor: pointer;
}

.retro-select:focus {
    outline: none;
    box-shadow: 0 0 10px #00ffff;
}

/* =========================================
   GUESTBOOK UI ENHANCEMENTS
   ========================================= */

.retro-form {
    background-color: #001122;
    border: 2px solid #00ffff;
    padding: 15px;
    font-family: "Courier New", Courier, monospace;
}

.retro-form label {
    color: #39ff14;
    font-weight: bold;
}

.retro-form input, .retro-form textarea {
    background-color: #000000;
    color: #ff00ff;
    border: 1px inset #555555;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.1em;
    width: 90%;
    padding: 5px;
    margin-top: 5px;
}

.retro-form input:focus, .retro-form textarea:focus {
    outline: none;
    border: 1px solid #39ff14;
    box-shadow: 0 0 5px #39ff14;
}

.retro-btn {
    background-color: #000000;
    color: #00ffff;
    border: 2px outset #00ffff;
    padding: 10px 15px;
    font-size: 1.1em;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.retro-btn:hover {
    background-color: #00ffff;
    color: #000000;
}

.retro-btn:active {
    border-style: inset;
}

/* Individual Guestbook Post Styling */
.gb-post {
    border: 1px solid #333333;
    margin-bottom: 15px;
    background-color: rgba(0, 0, 0, 0.5);
}

.gb-header {
    background-color: #111111;
    border-bottom: 1px solid #ff00ff;
    padding: 5px 10px;
    font-weight: bold;
}

.gb-body {
    padding: 10px;
    color: #cccccc;
}

/* =========================================
   IMAGE RESIZING FIX
   (Stops GIFs from being Godzilla-sized)
   ========================================= */

/* Target images inside the sidebar and main content area */
#sidebar img, 
#main-content img {
    max-width: 100%;  /* Never wider than the parent container */
    height: auto;     /* Maintain aspect ratio (don't squish them) */
    display: inline-block; /* Behave nicely with text */
}

/* Specific fix for the Center tag to ensure images center properly */
center img {
    max-width: 100%;
    height: auto;
}

/* Optional: Add a cool border to content images for style */
#main-content img {
    border: 2px solid #333;
    box-shadow: 4px 4px 0px #000; /* Retro drop shadow */
}

/* Fix for the Netscape/Mario buttons if they are still too big */
#sidebar img {
    margin-bottom: 15px; /* Add breathing room between stacked images */
}