/* ==========================================================================
   KMA Lichting 1996 Reunion Website — Retro 1998 Stylesheet
   "Pixel" — Retro Web Designer
   ========================================================================== */

/* --- CSS Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000080;
    background-image: url('../img/backgrounds/stars.svg');
    background-repeat: repeat;
    color: #FFFF00;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 12pt;
    line-height: 1.5;
    min-height: 100vh;
}

/* --- Links --- */
a {
    color: #0000FF;
    text-decoration: underline;
    cursor: pointer;
}

a:visited {
    color: #FF00FF;
}

a:hover,
a:focus {
    color: #FF0000;
    text-decoration: underline;
}

a:active {
    color: #FF0000;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Times New Roman', Times, serif;
    color: #FFFFFF;
    text-shadow: 2px 2px 0px #000000, 3px 3px 4px rgba(0,0,0,0.5);
    margin-top: 0.5em;
    margin-bottom: 0.3em;
}

h1 {
    font-size: 28pt;
    text-align: center;
    color: #FFD700;
    text-shadow: 2px 2px 0px #FF6600, 4px 4px 6px rgba(0,0,0,0.6);
}

h2 {
    font-size: 20pt;
    color: #00FFFF;
    border-bottom: 2px solid #00FFFF;
    padding-bottom: 4px;
}

h3 {
    font-size: 16pt;
    color: #00FF00;
}

h4 {
    font-size: 14pt;
    color: #FFFF00;
}

/* --- Paragraphs & Text --- */
p {
    margin: 0.5em 0;
}

strong, b {
    color: #FFFFFF;
}

em, i {
    color: #FFD700;
}

small {
    font-size: 9pt;
}

hr {
    border: none;
    height: 2px;
    background: #C0C0C0;
    margin: 12px 0;
}

/* --- Rainbow HR --- */
.rainbow-hr {
    height: 4px;
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    border: none;
    margin: 12px 0;
}

/* --- Blink Effect --- */
.blink {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ==========================================================================
   LAYOUT — Two Column with Sidebar
   ========================================================================== */

/* --- Main Container --- */
.retro-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
    background-color: #000033;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #404040;
    border-right: 3px solid #404040;
    box-shadow: 4px 4px 0px #000000;
}

/* --- Header --- */
.retro-header {
    background-color: #000066;
    background-image: linear-gradient(to bottom, #000099, #000033);
    text-align: center;
    padding: 16px 12px;
    border-bottom: 3px solid #C0C0C0;
}

.retro-header h1 {
    margin: 0;
    padding: 8px 0;
}

.retro-header img {
    max-width: 100%;
    height: auto;
}

/* --- Navigation --- */
.retro-nav {
    background-color: #C0C0C0;
    padding: 6px 12px;
    text-align: center;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.retro-nav a {
    color: #000080;
    text-decoration: none;
    font-weight: bold;
    padding: 2px 6px;
}

.retro-nav a:visited {
    color: #000080;
}

.retro-nav a:hover {
    color: #FF0000;
    text-decoration: underline;
    background-color: #FFFFFF;
}

.retro-nav a + a::before {
    content: " | ";
    color: #808080;
    font-weight: normal;
}

.retro-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.retro-nav li {
    display: inline;
}

.retro-nav li + li::before {
    content: " | ";
    color: #808080;
    font-weight: normal;
}

.retro-nav li a + a::before {
    content: none;
}

/* --- Content Layout (Two-Column) --- */
.retro-content-wrapper {
    display: flex;
    flex-wrap: wrap;
}

.retro-content {
    flex: 7;
    min-width: 0;
    padding: 12px 16px;
    background-color: #000033;
    border-right: 2px solid #404040;
}

.retro-sidebar {
    flex: 3;
    min-width: 180px;
    max-width: 250px;
    padding: 8px;
    background-color: #333399;
    border-left: 2px solid #ffffff;
}

/* --- Sidebar Widgets --- */
.retro-sidebar-widget {
    background-color: #000066;
    margin-bottom: 10px;
    padding: 8px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.retro-sidebar-widget h3,
.retro-sidebar-widget h4 {
    font-size: 11pt;
    color: #FFD700;
    margin: 0 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #FFD700;
    text-shadow: 1px 1px 0px #000000;
}

.retro-sidebar-widget ul {
    list-style: disc;
    padding-left: 18px;
    margin: 4px 0;
}

.retro-sidebar-widget li {
    font-size: 10pt;
    margin-bottom: 3px;
}

.retro-sidebar-widget a {
    color: #00FFFF;
}

.retro-sidebar-widget a:hover {
    color: #FF0000;
}

/* --- Footer --- */
.retro-footer {
    background-color: #000066;
    text-align: center;
    padding: 10px 12px;
    font-size: 9pt;
    color: #C0C0C0;
    border-top: 3px solid #C0C0C0;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.retro-footer a {
    color: #00FFFF;
}

.retro-footer p {
    margin: 4px 0;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* --- Retro Button (Windows 95 Style) --- */
.retro-button {
    display: inline-block;
    padding: 4px 16px;
    background-color: #C0C0C0;
    color: #000000;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
    outline: 1px solid #000000;
    text-align: center;
    user-select: none;
}

.retro-button:hover {
    background-color: #D0D0D0;
    color: #000000;
    text-decoration: none;
}

.retro-button:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    padding: 5px 15px 3px 17px;
}

.retro-button:visited {
    color: #000000;
}

/* --- Ad Banners --- */
.ad-banner-top {
    text-align: center;
    padding: 6px 0;
    margin: 8px 0;
}

.ad-banner-top img {
    max-width: 468px;
    width: 100%;
    height: auto;
    border: 1px solid #808080;
    display: inline-block;
}

.ad-banner-side {
    text-align: center;
    padding: 4px 0;
    margin-bottom: 8px;
}

.ad-banner-side img {
    max-width: 120px;
    width: 100%;
    height: auto;
    border: 1px solid #808080;
    display: inline-block;
}

/* --- Hit Counter --- */
.hit-counter {
    display: inline-block;
    background-color: #000000;
    color: #00FF00;
    font-family: 'Courier New', monospace;
    font-size: 14pt;
    font-weight: bold;
    padding: 4px 12px;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    letter-spacing: 3px;
    text-shadow: 0 0 8px #00FF00;
    min-width: 120px;
    text-align: center;
}

/* --- Marquee Text --- */
.marquee-text {
    overflow: hidden;
    white-space: nowrap;
    background-color: #000066;
    color: #FFD700;
    padding: 4px 8px;
    font-weight: bold;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #ffffff;
}

.marquee-text span {
    display: inline-block;
    animation: marquee 15s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-200%); }
}

/* --- Guestbook / Guest Entries --- */
.guestbook-entry {
    background-color: #000066;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.guestbook-entry:nth-child(even) {
    background-color: #000099;
}

.guestbook-entry:nth-child(odd) {
    background-color: #000066;
}

.guestbook-entry .entry-name,
.guestbook-entry .guest-name {
    color: #00FF00;
    font-weight: bold;
    font-size: 13pt;
}

.guestbook-entry .entry-details,
.guestbook-entry .guest-details {
    color: #FFFF00;
    font-size: 10pt;
    margin: 4px 0;
}

.guestbook-entry .entry-fun-fact,
.guestbook-entry .guest-fun-fact {
    color: #FFFFFF;
    font-style: italic;
    font-size: 10pt;
}

.guestbook-entry .entry-date,
.guestbook-entry .guest-date {
    color: #808080;
    font-size: 8pt;
    text-align: right;
}

.guestbook-entry + .guestbook-entry::before {
    content: "";
    display: block;
    height: 0;
}

.guestbook-separator {
    text-align: center;
    color: #C0C0C0;
    font-size: 8pt;
    margin: 4px 0;
    letter-spacing: 6px;
}

/* --- Forms --- */
.retro-form {
    background-color: #000044;
    padding: 12px 16px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
    margin: 10px 0;
}

.retro-form label {
    display: block;
    color: #FFFF00;
    font-weight: bold;
    font-size: 10pt;
    margin-bottom: 2px;
    margin-top: 8px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.retro-form label:first-child {
    margin-top: 0;
}

.retro-form input[type="text"],
.retro-form input[type="email"],
.retro-form input[type="password"],
.retro-form input[type="url"],
.retro-form input[type="tel"],
.retro-form input[type="number"],
.retro-form input[type="date"],
.retro-form input[type="search"] {
    background-color: #FFFFFF;
    color: #000000;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    padding: 4px 6px;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    width: 100%;
    max-width: 400px;
    outline: none;
}

.retro-form input[type="text"]:focus,
.retro-form input[type="email"]:focus,
.retro-form input[type="password"]:focus,
.retro-form input[type="url"]:focus,
.retro-form input[type="tel"]:focus,
.retro-form input[type="number"]:focus,
.retro-form input[type="date"]:focus,
.retro-form input[type="search"]:focus {
    background-color: #FFFFEE;
    outline: 1px dotted #000080;
}

.retro-form select {
    background-color: #FFFFFF;
    color: #000000;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    padding: 3px 4px;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    max-width: 400px;
}

.retro-form textarea {
    background-color: #FFFFFF;
    color: #000000;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    padding: 4px 6px;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    width: 100%;
    max-width: 400px;
    min-height: 80px;
    resize: vertical;
    outline: none;
}

.retro-form textarea:focus {
    background-color: #FFFFEE;
    outline: 1px dotted #000080;
}

.retro-form input[type="submit"],
.retro-form button[type="submit"],
.retro-form .retro-button {
    margin-top: 10px;
}

.retro-form input[type="checkbox"],
.retro-form input[type="radio"] {
    margin-right: 6px;
    vertical-align: middle;
}

.retro-form .form-help {
    color: #C0C0C0;
    font-size: 8pt;
    margin-top: 2px;
}

.retro-form .form-group {
    margin-bottom: 8px;
}

.retro-form .form-error {
    color: #FF0000;
    font-size: 9pt;
    margin-top: 2px;
}

/* --- Tables --- */
.retro-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #000044;
    margin: 10px 0;
}

.retro-table th {
    background-color: #000080;
    color: #FFD700;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    font-weight: bold;
    padding: 6px 8px;
    text-align: left;
    border: 2px solid #C0C0C0;
}

.retro-table td {
    color: #FFFFFF;
    font-size: 10pt;
    padding: 6px 8px;
    border: 1px solid #808080;
}

.retro-table tr:nth-child(even) td {
    background-color: #000066;
}

.retro-table tr:nth-child(odd) td {
    background-color: #000044;
}

.retro-table tr:hover td {
    background-color: #000099;
}

/* --- Photo Gallery --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 0;
}

.photo-thumb {
    background-color: #000066;
    padding: 4px;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #404040;
    border-right: 3px solid #404040;
    text-align: center;
    cursor: pointer;
    transition: none;
}

.photo-thumb:hover {
    border-color: #FFD700;
    box-shadow: 0 0 8px #FFD700, 0 0 16px #FF6600;
}

.photo-thumb img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: auto;
}

.photo-thumb .photo-caption {
    color: #C0C0C0;
    font-size: 8pt;
    margin-top: 4px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive photo grid */
@media (max-width: 700px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Jukebox --- */
.jukebox-entry {
    background-color: #000066;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.jukebox-entry .song-title {
    color: #FFD700;
    font-weight: bold;
    font-size: 12pt;
}

.jukebox-entry .song-artist {
    color: #00FFFF;
    font-size: 10pt;
}

.jukebox-entry .song-description {
    color: #C0C0C0;
    font-size: 9pt;
    margin-top: 4px;
}

.jukebox-entry audio {
    width: 100%;
    margin-top: 6px;
}

/* --- Links Page --- */
.link-entry {
    background-color: #000066;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.link-entry a {
    color: #00FFFF;
    font-weight: bold;
    font-size: 11pt;
}

.link-entry a:hover {
    color: #FF0000;
}

.link-entry .link-description {
    color: #C0C0C0;
    font-size: 9pt;
    margin-top: 2px;
}

.link-entry .link-url {
    color: #808080;
    font-size: 8pt;
    font-family: 'Courier New', monospace;
}

/* --- Flash Messages --- */
.flash-message {
    padding: 8px 14px;
    margin: 8px 0;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    font-weight: bold;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.flash-success {
    background-color: #006600;
    color: #00FF00;
    border-color: #00FF00;
}

.flash-error {
    background-color: #660000;
    color: #FF6666;
    border-color: #FF0000;
}

.flash-message.flash-info {
    background-color: #000066;
    color: #00FFFF;
}

/* ==========================================================================
   SPECIAL ELEMENTS
   ========================================================================== */

/* --- Countdown Timer --- */
.countdown-timer {
    background-color: #000000;
    color: #FFD700;
    font-family: 'Courier New', monospace;
    font-size: 14pt;
    font-weight: bold;
    text-align: center;
    padding: 10px 16px;
    margin: 10px 0;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    text-shadow: 0 0 8px #FFD700;
}

/* --- Badge Row --- */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 6px 0;
}

.badge-row img {
    width: 88px;
    height: 31px;
    border: 1px solid #808080;
    image-rendering: auto;
}

/* --- Under Construction --- */
.under-construction {
    text-align: center;
    padding: 12px;
    margin: 10px 0;
}

.under-construction img {
    max-width: 200px;
    height: auto;
}

/* --- Fake Status Bar --- */
.fake-statusbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #C0C0C0;
    color: #000000;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 9pt;
    padding: 2px 8px;
    border-top: 2px solid #ffffff;
    z-index: 9000;
    display: flex;
    align-items: center;
    height: 22px;
}

.fake-statusbar .status-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-top: 1px solid #404040;
    border-left: 1px solid #404040;
    border-bottom: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
    padding: 0 4px;
    height: 16px;
    line-height: 16px;
}

/* --- Lightbox Overlay --- */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 80vh;
    border: 4px solid #C0C0C0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #FFFFFF;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    background: none;
    border: none;
    text-shadow: 2px 2px 4px #000000;
    z-index: 10001;
}

.lightbox-close:hover {
    color: #FF0000;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #FFFFFF;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #C0C0C0;
    padding: 10px 18px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    user-select: none;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 128, 0.7);
    color: #FFD700;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    color: #FFFF00;
    font-size: 11pt;
    margin-top: 10px;
    text-align: center;
    text-shadow: 1px 1px 2px #000000;
}

/* --- Sparkle Canvas --- */
#sparkle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8999;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-yellow { color: #FFFF00; }
.text-green { color: #00FF00; }
.text-cyan { color: #00FFFF; }
.text-white { color: #FFFFFF; }
.text-gold { color: #FFD700; }
.text-red { color: #FF0000; }
.text-silver { color: #C0C0C0; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

.raised-border {
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.sunken-border {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

.pad-8 { padding: 8px; }
.pad-12 { padding: 12px; }

/* ==========================================================================
   PAGE-SPECIFIC STYLES
   ========================================================================== */

/* --- Home / Welcome --- */
.welcome-banner {
    text-align: center;
    padding: 16px;
}

.welcome-banner img {
    max-width: 100%;
    height: auto;
}

/* --- Profile / Detail Pages --- */
.profile-card {
    background-color: #000066;
    padding: 12px;
    margin-bottom: 10px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
    display: flex;
    gap: 12px;
}

.profile-card .profile-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #C0C0C0;
}

.profile-card .profile-info {
    flex: 1;
}

.profile-card .profile-info h3 {
    margin-top: 0;
    color: #00FF00;
}

/* --- Login Page --- */
.login-box {
    max-width: 350px;
    margin: 40px auto;
    background-color: #000066;
    padding: 20px;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #404040;
    border-right: 3px solid #404040;
}

.login-box h2 {
    text-align: center;
    border-bottom: none;
}

/* --- Pagination --- */
.pagination {
    text-align: center;
    padding: 10px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
}

.pagination a {
    background-color: #C0C0C0;
    color: #000080;
    text-decoration: none;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
}

.pagination a:hover {
    background-color: #FFFFFF;
}

.pagination .current {
    background-color: #000080;
    color: #FFFFFF;
    font-weight: bold;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

/* ==========================================================================
   RESPONSIVE (GRACEFUL DEGRADATION)
   ========================================================================== */

/* --- Mobile menu toggle button (hidden on desktop) --- */
.mobile-menu-toggle {
    display: none;
    background-color: #C0C0C0;
    color: #000080;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 10pt;
    font-weight: bold;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #404040;
    border-right: 2px solid #404040;
    padding: 6px 14px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.mobile-menu-toggle:active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

/* --- Tablet (max 768px) --- */
@media (max-width: 768px) {
    .retro-content-wrapper {
        flex-direction: column;
    }

    .retro-content {
        border-right: none;
        border-bottom: 2px solid #404040;
        padding: 10px 12px;
    }

    .retro-sidebar {
        max-width: 100%;
        border-left: none;
        border-top: 2px solid #ffffff;
    }

    .retro-container {
        margin: 0;
        box-shadow: none;
    }

    h1 { font-size: 20pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    /* Tables: horizontal scroll */
    .retro-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Profile card: stack */
    .profile-card {
        flex-direction: column;
    }

    .profile-card .profile-photo {
        width: 80px;
        height: 80px;
        align-self: center;
    }
}

/* --- Mobile (max 480px) --- */
@media (max-width: 480px) {
    body {
        font-size: 11pt;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }

    /* Nav: vertical collapsible */
    .retro-nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
    }

    .retro-nav ul.nav-open {
        display: flex;
    }

    .retro-nav li {
        display: block;
        border-bottom: 1px solid #A0A0A0;
    }

    .retro-nav li:last-child {
        border-bottom: none;
    }

    .retro-nav li + li::before {
        content: none;
    }

    .retro-nav a + a::before {
        content: none;
    }

    .retro-nav li a {
        display: block;
        padding: 8px 12px;
        text-align: left;
    }

    /* Header: compact */
    .retro-header {
        padding: 10px 8px;
    }

    .retro-header h1 {
        font-size: 16pt;
    }

    .retro-header p {
        font-size: 9pt !important;
    }

    /* Marquee: hide on small mobile */
    .marquee-text {
        display: none;
    }

    /* Fake statusbar: hide on mobile */
    .fake-statusbar {
        display: none;
    }

    /* No bottom padding needed for statusbar */
    body {
        padding-bottom: 0;
    }

    /* Sparkle canvas: hide to save battery/performance */
    #sparkle-canvas {
        display: none;
    }

    /* Forms: full width inputs */
    .retro-form input[type="text"],
    .retro-form input[type="email"],
    .retro-form input[type="password"],
    .retro-form input[type="url"],
    .retro-form input[type="tel"],
    .retro-form input[type="number"],
    .retro-form input[type="date"],
    .retro-form input[type="search"],
    .retro-form select,
    .retro-form textarea {
        max-width: 100%;
        width: 100%;
    }

    /* Chat window: shorter for mobile */
    .chat-window {
        height: 250px !important;
    }

    /* Chat header: wrap */
    .chat-header {
        flex-direction: column;
        gap: 4px;
        font-size: 9pt;
    }

    /* Buttons: larger tap targets */
    .retro-button {
        padding: 8px 16px;
        font-size: 11pt;
        min-height: 40px;
    }

    /* Flash messages: tighter */
    .flash-message {
        font-size: 9pt;
        padding: 6px 10px;
    }

    /* Photo grid: single column on very small screens */
    .photo-grid {
        grid-template-columns: 1fr;
    }

    /* Guestbook entries: tighter */
    .guestbook-entry {
        padding: 8px 10px;
    }

    /* Jukebox entries: tighter */
    .jukebox-entry {
        padding: 8px 10px;
    }

    /* Link entries: tighter */
    .link-entry {
        padding: 6px 10px;
    }

    /* Sidebar widgets: reduce padding */
    .retro-sidebar-widget {
        padding: 6px;
        margin-bottom: 6px;
    }

    /* Badge row: hide on mobile */
    .badge-row {
        display: none;
    }

    /* Hit counter: smaller */
    .hit-counter {
        font-size: 11pt;
        padding: 3px 8px;
        letter-spacing: 2px;
    }

    /* Footer: tighter */
    .retro-footer {
        padding: 8px;
        font-size: 8pt;
    }

    /* Login box: full width */
    .login-box {
        max-width: 100%;
        margin: 20px 8px;
        padding: 14px;
    }

    /* Countdown timer: smaller text */
    .countdown-timer {
        font-size: 11pt;
        padding: 8px 10px;
    }

    /* Profile hero adjustments */
    .profile-hero {
        padding: 14px 10px;
    }

    .profile-hero h1 {
        font-size: 18pt !important;
    }

    .profile-meta {
        gap: 4px;
    }

    .profile-meta-badge {
        font-size: 8pt;
        padding: 2px 6px;
    }

    /* Lightbox: full screen on mobile */
    .lightbox-overlay img {
        max-width: 98vw;
        max-height: 70vh;
        border-width: 2px;
    }

    .lightbox-nav {
        font-size: 28px;
        padding: 6px 12px;
    }

    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
}

/* --- Print styles (for the one person who prints a webpage) --- */
@media print {
    body {
        background: white;
        color: black;
    }

    .retro-nav,
    .retro-sidebar,
    .ad-banner-top,
    .ad-banner-side,
    .hit-counter,
    .marquee-text,
    .fake-statusbar,
    .badge-row,
    #sparkle-canvas {
        display: none !important;
    }

    .retro-container {
        border: none;
        box-shadow: none;
        max-width: 100%;
    }

    .retro-content {
        border: none;
    }

    a {
        color: #000080;
    }
}
