/* =========================================================
   Retro Nature Guestbook Stylesheet - Dark Mode Only, Enhanced Visibility
   ---------------------------------------------------------
   Purpose: Organized styling for index.php guestbook
   Sections: Custom Properties, Base Layout, Typography,
             Components, Guestbook, Portals, Subdomains,
             Media, Animations,
             Responsive
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- Custom Properties - Dark Mode Locked ---------- */
:root {
    --font-body: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    --font-pixel: 'JetBrains Mono', 'Source Code Pro', 'Consolas', 'Courier New', monospace;
    /* Enhanced Retro-Futuristic Color Palette - Deeper voids, smoother cyans */
    --color-bg: #001122; /* Darker base for cosmic depth */
    --color-surface: rgba(0, 17, 34, 0.4); /* Reduced opacity ~50% from 0.7 for more bg visibility, keeps dark vibe */
    --color-text-primary: #00ffcc; /* Softer cyan glow */
    --color-text-secondary: #b3e5fc;
    --color-text-muted: #81d4fa;
    --color-border-primary: #00ffcc;
    --color-border-strong: #00cc99;
    --color-accent-cyan: #00ffcc;
    --color-accent-magenta: #ff69b4; /* Retro pink for pops */
    --color-accent-yellow: #ffd700;
    --color-alert-bg: #ff6b6b;
    --color-alert-text: #2b1b12;
    --guestbook-bg: rgba(0, 17, 34, 0.4); /* Matching reduced opacity */
    --box-shadow-glow: 0 0 30px rgba(0, 255, 204, 0.5); /* Smoother, wider glow */
    --health-bg: rgba(0, 34, 51, 0.4); /* Reduced for consistency */
    --health-card-border: #00cc99;
    --health-card-surface: rgba(0, 51, 68, 0.4);
    --health-accent-forest: #00b894;
    --health-accent-water: #00cec9;
    --health-accent-light: #b2e6ff;
    --stats-bg: rgba(0, 17, 34, 0.4); /* Reduced */
    /* Smoother Background Layers */
    --bg-layer-1: linear-gradient(180deg, #001122 0%, #000d1a 45%, #000811 100%);
    --bg-layer-2: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 204, 0.03) 0px,
        rgba(0, 255, 204, 0.03) 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 4px
    );
    --bg-size-1: cover;
    --bg-size-2: 100% 16px;
    --bg-animation: retro-smooth-shift 25s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate; /* Smooth bezier */
    --portal-card-bg: rgba(0, 17, 34, 0.4); /* Reduced opacity */
    --portal-card-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    --portal-card-shadow-hover: 0 12px 24px rgba(0, 255, 204, 0.4); /* Enhanced hover glow */
    --category-card-bg: rgba(0, 34, 51, 0.4); /* Reduced */
    --category-card-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    --category-card-shadow-hover: 0 14px 28px rgba(0, 255, 204, 0.3);
}

/* ---------- Base Layout ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    margin: 0;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(0, 17, 34, 0.85); /* Increased opacity for better readability over image */
    color: var(--color-text-secondary);
    border: 1px solid rgba(0, 255, 204, 0.2); /* Subtle border */
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 204, 0.2); /* Enhanced shadow */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    backdrop-filter: blur(10px); /* Subtle blur effect for glass morphism */
}

section {
    margin-bottom: 30px;
    border: none;
    padding: 15px;
}

article {
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 2px solid var(--color-border-primary); /* Smooth accent line */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; /* Soft edges */
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
    margin: 0;
    font-weight: bold;
}

h1 {
    font-family: var(--font-pixel);
    font-size: 2.2em;
    color: var(--color-text-primary);
    text-align: center;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 255, 204, 0.9), 2px 2px rgba(0, 17, 34, 0.8), 0 0 30px rgba(0, 255, 204, 0.7); /* Enhanced glow */
    letter-spacing: 3px;
    text-transform: uppercase;
    font-feature-settings: "liga" 1, "calt" 1;
}

h2 {
    font-family: var(--font-pixel);
    font-size: 1.6em;
    color: var(--color-text-primary);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.8), 1px 1px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--color-border-primary);
    padding-bottom: 5px;
    margin-bottom: 15px;
    letter-spacing: 2px;
    font-feature-settings: "liga" 1;
}

h3 {
    font-family: var(--font-pixel);
    font-size: 1.3em;
    color: var(--color-text-primary);
    font-weight: 500;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.7), 1px 1px rgba(0, 0, 0, 0.3);
    letter-spacing: 1.5px;
    font-feature-settings: "liga" 1;
}

a {
    color: var(--color-border-primary);
    text-decoration: none; /* Smooth no underline */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: var(--font-pixel);
    letter-spacing: 0.5px;
    position: relative; /* For hover underline glow */
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-cyan);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

code, pre, .code-style {
    font-family: var(--font-pixel);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border-primary);
    padding: 2px 4px;
    border-radius: 4px; /* Smooth */
    letter-spacing: 1px;
    font-feature-settings: "liga" 1;
    box-shadow: inset 0 0 5px rgba(0, 255, 204, 0.2);
}

a:hover {
    color: var(--color-border-strong);
    background-color: transparent;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.5); /* Glow on hover */
}

/* ---------- Header & Meta ---------- */
header {
    text-align: center;
    border-bottom: 1px solid rgba(0, 255, 204, 0.4);
    padding-bottom: 15px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

/* Updated Construction Notice - Simple text with rotating emoji, no box */
.construction-notice {
    background: none; /* Kill the bg box */
    color: var(--color-accent-yellow); /* Retro yellow for alert */
    font-weight: bold;
    font-size: 1em;
    padding: 0; /* No padding for inline feel */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 15px;
    border: none; /* No border */
    animation: none; /* Drop blink, too harsh */
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.8); /* Subtle glow */
}

.construction-notice::before {
    content: '🔄'; /* Rotating emoji */
    animation: rotate 3s linear infinite; /* Smooth spin */
    font-size: 1.2em;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Page-specific backgrounds - Kept but smoothed animations */
.health-page, .void-page, .minecraft-page, .art-studio-page, .gaming-room-page, .beach-page, .charts-page {
    background-image: none;
    animation: none;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.5s ease; /* Smooth page loads */
}

[class*="-background"] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

[class*="-background"] .layer {
    position: absolute;
    inset: 0;
    background-repeat: repeat-x;
    image-rendering: pixelated;
    transform: translateZ(0);
    transition: opacity 0.5s ease; /* Smooth layer fades */
}

/* Health layers - Enhanced smooth parallax */
.layer-sky { background: linear-gradient(180deg, #87ceeb 0%, #98fb98 100%); } /* Softer sky */
.layer-sun { background-image: radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.95) 0 45px, rgba(255, 255, 255, 0) 240px); animation: sun-glow 8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate; }
.layer-clouds { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="320" height="140" viewBox="0 0 320 140"><rect fill="none" width="320" height="140"/><path fill="%23d2e6f9" d="M30 80c-8 0-15-6-15-14s7-14 15-14c1 0 2 0 3 .1C35 43 45 34 57 34c8 0 15 4 20 10 3-2 7-3 10-3 10 0 19 7 21 17 11 0 20 9 20 20 0 2 0 4-1 6H30zM210 60c-7 0-13-5-13-12s6-12 13-12c1 0 2 0 2 .1 1-9 10-16 20-16 7 0 13 3 17 8 3-1 5-2 8-2 8 0 15 6 17 14 9 0 16 7 16 16 0 2 0 3-.1 5H210z"/></svg>'); background-size: 420px 160px; opacity: 0.85; animation: clouds-drift 120s cubic-bezier(0.25, 0.1, 0.25, 1) infinite; } /* Smoother drift */
.layer-mountains { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="512" height="240" viewBox="0 0 512 240"><rect fill="none" width="512" height="240"/><path fill="%23b7d3e7" d="M0 170L60 120l40 40 70-80 50 60 60-90 80 110 60-80 90 100v60H0z"/><path fill="%23d9ebfb" d="M40 150l40-30 50 50 60-90 30 25 30-45 70 100 50-60 80 80 70-60v120H40z"/></svg>'); background-size: 640px 240px; background-position: center bottom; animation: parallax-mountains 150s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; }
.layer-mountain-shadows { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="512" height="220" viewBox="0 0 512 220"><rect fill="none" width="512" height="220"/><path fill="%2383a6c1" d="M0 170l70-45 50 40 60-70 40 40 70-85 70 95 60-70 92 88v57H0z" opacity="0.55"/></svg>'); background-size: 620px 220px; background-position: center bottom; animation: parallax-mountain-shadows 130s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; opacity: 0.8; }
.layer-distant-forest { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="320" height="180" viewBox="0 0 320 180"><rect fill="none" width="320" height="180"/><path fill="%23527c53" d="M0 150l20-30 15 10 18-25 20 25 25-35 20 25 18-30 35 40 22-30 18 28 24-34 34 46 26-32 25 32V180H0z"/></svg>'); background-size: 420px 200px; background-position: center bottom; animation: parallax-distant-forest 90s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; opacity: 0.85; }
.layer-near-forest { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200" viewBox="0 0 320 200"><rect fill="none" width="320" height="200"/><path fill="%23366336" d="M0 170l14-25 20 15 18-28 26 33 28-42 24 28 30-38 32 46 20-32 22 38 26-44 36 50 24-28 30 32V200H0z"/></svg>'); background-size: 420px 220px; background-position: center bottom; animation: parallax-near-forest 50s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; opacity: 0.9; }
.layer-lake { background-image: linear-gradient(180deg, rgba(78, 138, 156, 0.82) 0%, rgba(70, 144, 166, 0.9) 40%, rgba(62, 117, 136, 0.95) 100%), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200" viewBox="0 0 320 200"><rect fill="none" width="320" height="200"/><path fill="%234e8a9c" d="M0 80c40 12 80 18 120 18s80-6 120-18 80-18 120-18v140H0V80z" opacity="0.65"/></svg>'); background-size: 100% 100%, 520px 220px; background-position: center bottom; animation: parallax-lake 40s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; opacity: 0.95; }
.layer-farming-terraces { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200" viewBox="0 0 320 200"><rect fill="none" width="320" height="200"/><rect fill="%236b8e23" x="20" y="120" width="60" height="15" rx="7"/><rect fill="%23228b22" x="90" y="105" width="70" height="17" rx="8"/><rect fill="%236b8e23" x="170" y="115" width="80" height="14" rx="6"/><rect fill="%23228b22" x="260" y="125" width="50" height="16" rx="8"/></svg>'); background-size: 480px 300px; background-position: center bottom; animation: terraces-shift 110s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; opacity: 0.9; }
.layer-crops { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><rect fill="none" width="160" height="160"/><line x1="40" y1="60" x2="40" y2="90" stroke="%23ffd700" stroke-width="2"/><line x1="20" y1="55" x2="20" y2="85" stroke="%23ffb347" stroke-width="2"/><line x1="60" y1="65" x2="60" y2="95" stroke="%23daa520" stroke-width="2"/><line x1="80" y1="70" x2="80" y2="100" stroke="%23ffd700" stroke-width="2"/><line x1="100" y1="60" x2="100" y2="90" stroke="%23ffb347" stroke-width="2"/><line x1="120" y1="65" x2="120" y2="95" stroke="%23daa520" stroke-width="2"/><line x1="140" y1="70" x2="140" y2="100" stroke="%23ffd700" stroke-width="2"/></svg>'); background-size: 320px 240px; background-position: center bottom; animation: crops-wave 70s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate; opacity: 0.8; }
.layer-village { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><rect fill="none" width="160" height="160"/><rect fill="%238b4513" x="40" y="80" width="30" height="40" rx="15"/><rect fill="%23cd853f" x="50" y="90" width="10" height="20"/><rect fill="%238b4513" x="90" y="75" width="25" height="45" rx="12"/><rect fill="%23cd853f" x="97" y="85" width="8" height="25"/><rect fill="%238b4513" x="120" y="95" width="30" height="25" rx="12"/><rect fill="%23cd853f" x="130" y="100" width="10" height="15"/></svg>'); background-size: 240px 240px; background-position: center bottom; animation: village-quiet 200s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate; opacity: 0.7; }
.layer-smoke { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="160" viewBox="0 0 80 160"><rect fill="black" width="80" height="160"/><circle fill="%23cccccc" cx="40" cy="120" r="8" opacity="0.6"/><circle fill="%23888888" cx="45" cy="110" r="6" opacity="0.5"/><circle fill="%23888cccc" cx="35" cy="100" r="5" opacity="0.7"/><circle fill="%23666666" cx="42" cy="90" r="4" opacity="0.4"/></svg>'); background-size: 120px 240px; background-position: center bottom; animation: smoke-rise 20s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite alternate; opacity: 0.6; }

/* Simplified background - Just custom image */
.layer-cosmic-space,
.layer-stars,
.layer-nebula,
.layer-void-particles,
.layer-cosmic-drift {
    display: none; /* Hide all animated layers */
}

/* Custom image - Simplified with opacity to match theme */
.layer-custom-image { 
    background-image: url('88.png'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    opacity: 0.25; /* Reduced opacity to blend with theme */
    filter: brightness(0.7) contrast(1.1); /* Darken and enhance contrast */
}

/* Portal and Category Components - Enhanced hovers, lower opacity */
.portal-grid { display: flex; flex-direction: column; gap: 20px; }
.portal-card { width: 100%; display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(200px, 1fr); grid-template-areas: "title categories" "description categories" "button categories"; align-items: start; gap: 10px 28px; background-color: var(--portal-card-bg); border: 1px solid rgba(0, 255, 204, 0.2); /* Fainter border */ border-radius: 10px; padding: 20px; box-shadow: 0 0 15px rgba(0, 255, 204, 0.2); /* Softer */ transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.portal-card:hover { background-color: rgba(0, 17, 34, 0.95); border-color: var(--color-border-primary); box-shadow: var(--portal-card-shadow-hover), inset 0 0 20px rgba(0, 255, 204, 0.1); transform: translateY(-3px); } /* Smooth lift + inner glow */
.portal-card h3 { grid-area: title; margin: 0; color: var(--color-text-primary); text-shadow: 0 0 10px rgba(0, 255, 204, 0.7); }
.portal-card p { grid-area: description; margin: 0; }
.portal-categories { grid-area: categories; padding-left: 18px; margin: 0; color: var(--color-text-secondary); }
.portal-categories li + li { margin-top: 8px; }
.portal-button { 
    grid-area: button; 
    align-self: start; 
    justify-self: start; /* Prevent stretching */
    width: fit-content; /* Make button only as wide as text */
    background-color: var(--color-border-primary); 
    color: #000000 !important; /* Force black text for all devices */
    padding: 6px 14px; /* Compact padding */
    border: 1px solid var(--color-border-strong); 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 0.9em; 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    border-radius: 4px; 
    box-shadow: 0 2px 6px rgba(0, 255, 204, 0.2); 
    display: inline-block; /* Ensure it behaves like inline element */
}
.portal-button:hover { 
    background-color: var(--color-accent-cyan); 
    color: #000000 !important; /* Force black text on hover */
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0, 255, 204, 0.4); 
}
.category-button { 
    display: inline-block; 
    width: fit-content; /* Compact size */
    background-color: var(--color-accent-cyan); 
    color: #000000 !important; /* Force black text for all devices */
    padding: 6px 14px; /* Match portal-button padding */
    border: 1px solid var(--color-border-strong); 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 0.9em; /* Match portal-button size */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    border-radius: 4px; /* Match portal-button */
    box-shadow: 0 2px 6px rgba(0, 255, 204, 0.2); 
}
.category-button:hover { 
    background-color: var(--color-border-primary); 
    color: #000000 !important; /* Force black text on hover */
    transform: translateY(-2px); /* Match portal-button */
    box-shadow: 0 4px 12px rgba(0, 255, 204, 0.4); 
}
.return-home { margin-top: 20px; }

/* Guestbook - Smooth scroll and entries, darker bg */
.guestbook-entries { 
    border: 1px dashed var(--color-border-primary); 
    padding: 10px; 
    margin-bottom: 20px; 
    max-height: 300px; 
    overflow-y: auto; 
    background-color: rgba(0, 0, 0, 0.4); 
    border-radius: 6px; 
    transition: box-shadow 0.3s ease; 
    scrollbar-width: thin; 
    scrollbar-color: var(--color-border-primary) rgba(0, 0, 0, 0.3);
}
.guestbook-entries::-webkit-scrollbar {
    width: 8px;
}
.guestbook-entries::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}
.guestbook-entries::-webkit-scrollbar-thumb {
    background: var(--color-border-primary);
    border-radius: 4px;
}
.guestbook-entries::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-strong);
}
.guestbook-entries:hover { 
    box-shadow: inset 0 0 10px rgba(0, 255, 204, 0.2); 
}
.guestbook-entry { 
    border-bottom: 1px solid rgba(0, 255, 204, 0.2); 
    padding-bottom: 8px; 
    margin-bottom: 8px; 
    transition: all 0.3s ease; 
}
.guestbook-entry:hover { 
    opacity: 0.9; 
    transform: translateX(2px);
}
.guestbook-entry:last-child { 
    border-bottom: none; 
}
.guestbook-form { 
    border-top: 2px solid var(--color-border-primary); 
    padding: 15px; 
    background-color: rgba(0, 0, 0, 0.3); 
    border-radius: 6px;
    margin-top: 15px;
}
.guestbook-form label { 
    display: block; 
    margin-bottom: 8px; 
    color: var(--color-text-primary); 
    font-weight: 500;
}
.guestbook-form input, .guestbook-form textarea { 
    width: 100%; 
    padding: 10px; 
    margin-bottom: 15px; 
    border: 1px solid var(--color-border-primary); 
    background-color: rgba(0, 0, 0, 0.5); 
    color: var(--color-text-primary); 
    font-family: inherit; 
    border-radius: 4px; 
    transition: all 0.3s ease; 
}
.guestbook-form input:focus, .guestbook-form textarea:focus { 
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.4); 
    outline: none; 
    border-color: var(--color-accent-cyan);
    background-color: rgba(0, 0, 0, 0.6);
}
.guestbook-form textarea { 
    min-height: 100px; 
    resize: vertical; 
}
.guestbook-form button { 
    background-color: var(--color-border-primary); 
    color: #000000 !important; /* Force black text for all devices */
    padding: 10px 20px; 
    border: 1px solid var(--color-border-strong); 
    cursor: pointer; 
    font-family: inherit; 
    font-weight: bold; 
    font-size: 1em; 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    border-radius: 5px; 
    box-shadow: 0 2px 6px rgba(0, 255, 204, 0.2); 
}
.guestbook-form button:hover { 
    background-color: var(--color-accent-cyan); 
    color: #000000 !important; /* Force black text on hover */
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0, 255, 204, 0.4); 
}
.guestbook-form button:active {
    transform: translateY(0);
}

/* Footer and Misc */
footer { 
    text-align: center; 
    border-top: 1px solid rgba(0, 255, 204, 0.4); 
    padding-top: 15px; 
    margin-top: 20px; 
    font-size: 0.9em; 
    transition: border-color 0.3s ease; 
}
.disclaimer { 
    font-style: italic; 
    color: var(--color-text-muted); 
    font-size: 0.85em;
}
.stats { 
    font-size: 0.9em; 
    background-color: var(--stats-bg); 
    padding: 8px; 
    border: 1px solid var(--color-border-primary); 
    display: inline-block; 
    color: var(--color-text-secondary); 
    margin-top: 10px; 
    border-radius: 4px; 
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2); 
}
.terminal-prompt { 
    font-family: var(--font-pixel); 
    font-weight: 500; 
    letter-spacing: 1px; 
    line-height: 1.4; 
    border-left: 3px solid var(--color-border-primary); 
    padding: 8px 12px; 
    margin: 15px auto; 
    background: rgba(0, 0, 0, 0.4); 
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4); 
    border-radius: 4px; 
    transition: box-shadow 0.3s ease; 
}
.terminal-prompt:hover { 
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6); 
}
.status-online { 
    color: #00ffcc; 
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.9); 
    font-weight: bold; 
}
.nav-mode { 
    color: #00cc99; 
    text-shadow: 0 0 8px rgba(0, 204, 153, 0.9); 
    font-weight: bold; 
}
.notice-card {
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid var(--color-alert-bg);
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: var(--color-text-secondary);
}
.notice-card strong {
    color: var(--color-alert-bg);
    font-size: 1.1em;
}

/* Skip to Content Link - Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent-cyan);
    color: var(--color-bg);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    z-index: 100;
    border-radius: 0 0 4px 0;
}
.skip-to-content:focus {
    top: 0;
}

/* Screen Reader Only - Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Improved Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-accent-cyan);
    outline-offset: 2px;
}

/* Category Grid Enhancement */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.category-card {
    background-color: var(--category-card-bg);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--category-card-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.category-card:hover {
    background-color: rgba(0, 17, 34, 0.95);
    border-color: var(--color-border-primary);
    box-shadow: var(--category-card-shadow-hover);
    transform: translateY(-3px);
}
.category-card h3 {
    margin-bottom: 10px;
}
.category-card p {
    margin-bottom: 15px;
    line-height: 1.5;
}
.subdomain-hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}
.subdomain-nav {
    margin-top: 15px;
}

/* Animations - All smoothed with cubic-bezier */
@keyframes retro-smooth-shift { from { background-position: center top, 0 0; } to { background-position: center 25px, 0 10px; } }
@keyframes twinkle-smooth { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes nebula-drift { 0% { background-position: center, left center, right center; } 100% { background-position: center, right center, left center; } }
@keyframes particles-flow { 0% { background-position: 0 0; } 100% { background-position: -400px -300px; } }
@keyframes cosmic-drift { 0% { background-position: center, left center, right center; } 100% { background-position: center, right center, left center; } }
@keyframes image-drift { 0% { background-position: center center; } 100% { background-position: calc(50% + 15px) calc(50% + 8px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ---------- Music Player ---------- */
.music-player {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 320px;
    background: rgba(0, 17, 34, 0.95);
    border: 2px solid var(--color-accent-cyan);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 255, 204, 0.3);
    backdrop-filter: blur(10px);
    z-index: 998;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.music-player.minimized .player-body {
    display: none;
}

.music-player.minimized {
    width: 200px;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.2);
    background: rgba(0, 255, 204, 0.05);
    border-radius: 10px 10px 0 0;
}

.player-title {
    color: var(--color-accent-cyan);
    font-weight: bold;
    font-size: 0.9em;
}

.player-toggle {
    background: none;
    border: none;
    color: var(--color-accent-cyan);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.player-toggle:hover {
    transform: scale(1.2);
}

.player-body {
    padding: 15px;
}

.now-playing {
    margin-bottom: 15px;
}

.track-info {
    text-align: center;
}

.track-name {
    color: var(--color-text-primary);
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    color: var(--color-text-muted);
    font-size: 0.85em;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.control-btn {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid var(--color-accent-cyan);
    color: var(--color-accent-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--color-accent-cyan);
    color: var(--color-bg);
    transform: scale(1.1);
}

.play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.4em;
}

.progress-container {
    margin-bottom: 12px;
}

.progress-bar {
    height: 6px;
    background: rgba(0, 255, 204, 0.2);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 5px;
}

.progress {
    height: 100%;
    background: var(--color-accent-cyan);
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: var(--color-text-muted);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 255, 204, 0.05);
    border-radius: 6px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 255, 204, 0.2);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--color-accent-cyan);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--color-accent-cyan);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#volume-percent {
    font-size: 0.8em;
    color: var(--color-text-muted);
    min-width: 35px;
}

.playlist {
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid rgba(0, 255, 204, 0.2);
    padding-top: 10px;
}

.playlist-title {
    color: var(--color-text-primary);
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 8px;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.playlist-item {
    padding: 8px 10px;
    background: rgba(0, 255, 204, 0.05);
    border: 1px solid rgba(0, 255, 204, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

.playlist-item:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: var(--color-accent-cyan);
}

.playlist-item.active {
    background: rgba(0, 255, 204, 0.2);
    border-color: var(--color-accent-cyan);
    color: var(--color-accent-cyan);
}

.playlist-item-name {
    color: var(--color-text-primary);
    font-weight: 500;
}

.playlist-item-duration {
    color: var(--color-text-muted);
    font-size: 0.9em;
    margin-left: 5px;
}

/* Playlist scrollbar */
.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 255, 204, 0.1);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb {
    background: var(--color-accent-cyan);
    border-radius: 3px;
}

/* General button text color override for consistency across all devices */
button,
.portal-button,
.category-button,
.return-home,
.checkout-btn,
.add-to-cart-btn,
.affiliate-button,
.blog-read-more,
a.portal-button,
a.category-button,
a.return-home {
    color: #000000 !important; /* Force black/dark text for all buttons on all devices */
    text-shadow: none !important; /* Remove any text shadows that might affect readability */
}

/* Specific override for button links on mobile */
a.portal-button,
a.category-button,
a.return-home,
a.portal-button:hover,
a.category-button:hover,
a.return-home:hover,
a.portal-button:visited,
a.category-button:visited,
a.return-home:visited,
a.portal-button:active,
a.category-button:active,
a.return-home:active {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Remove link underline animation for buttons */
.portal-button::after,
.category-button::after,
.return-home::after {
    display: none !important;
}

/* Responsive - Unchanged, as it's solid */
@media (max-width: 600px) { 
    body { padding: 10px; } 
    .container { padding: 15px; } 
    h1 { font-size: 1.5em; } 
    .category-grid { grid-template-columns: 1fr; }
    .music-player {
        left: 10px;
        bottom: 70px;
        width: calc(100% - 20px);
        max-width: 320px;
    }
    
    /* Force black text on all buttons for mobile devices */
    button,
    .portal-button,
    .category-button,
    .return-home,
    a.portal-button,
    a.category-button,
    a.return-home {
        color: #000000 !important;
        text-shadow: none !important;
    }
}
@media (max-width: 800px) { .portal-card { grid-template-columns: 1fr; grid-template-areas: "title" "description" "categories" "button"; gap: 12px; } .portal-card h3, .portal-card p, .portal-categories { margin: 0; } .portal-button { justify-self: start; } }