/* =========================================
   ☆ THE MASTER CONTROL PANEL ☆
   Change these variables to update your WHOLE site.
   ========================================= */
:root {
    /* --- 1. COLORS --- */
    --star-primary: #C0C0C0;  /* Silver */
    --star-accent:  #BC9345;  /* Gold */
    
    /* The Gradient Colors (Deep Ocean) */
    --ocean-top:    #02020a;
    --ocean-mid:    #00111f;
    --ocean-bot:    #001e2e;

    /* --- 2. FONTS --- */
    --font-body:    'RainyHearts', 'Courier New', monospace;
    --font-heading: 'GallaeciaForte', cursive;

    /* --- 3. BORDERS --- */
    --crisp-border: 2px dashed var(--star-primary);
}

/* =========================================
   ☆ FONT FILES ☆
   ========================================= */
@font-face { font-family: 'GallaeciaForte'; src: url('GallaeciaForte.ttf') format('truetype'); }
@font-face { font-family: 'RainyHearts'; src: url('rainyhearts.ttf') format('truetype'); }

/* =========================================
   ☆ GLOBAL STYLES ☆
   ========================================= */
* { cursor: none !important; } /* Hide system cursor */

body {
    background-color: var(--ocean-top);
    background-image: linear-gradient(to bottom, var(--ocean-top), var(--ocean-mid), var(--ocean-bot));
    background-attachment: fixed; 

    font-family: var(--font-body);
    font-size: 16px;
    color: var(--star-primary);
    text-align: center;
    margin: 0;
    padding: 20px;
    padding-bottom: 80px; /* Extra space for footer */
    -webkit-font-smoothing: none;
}

/* The Background Canvas */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    pointer-events: none;
}

img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* =========================================
   ☆ UI ELEMENTS ☆
   ========================================= */
h1, h2, h3, .site-nav a, .diary-date, .gallery-header {
    font-family: var(--font-heading);
    font-weight: normal; 
    letter-spacing: 1px;
}

/* --- CUSTOM H1 GLOW (Deep Indigo/Purple Bloom) --- */
h1 { 
    font-size: 36px; 
    margin: 10px 0; 
    color: var(--star-primary); 
    text-shadow: 
        0 0 5px #7b68ee,   /* Bright Purple Glow */
        0 0 20px #4b0082;  /* Deep Indigo Bloom */
}

h2 { 
    font-size: 28px; 
    border-bottom: 1px dotted var(--star-primary); 
    padding-bottom: 5px; 
}

/* Navigation Bar */
.site-nav {
    margin-bottom: 20px;
    padding: 8px 0;
    border-top: var(--crisp-border);
    border-bottom: var(--crisp-border);
    background-color: rgba(0, 0, 0, 0.5);
}
.site-nav a {
    color: var(--star-primary);
    text-decoration: none;
    margin: 0 15px;
    font-size: 20px;
    transition: color 0.2s, text-shadow 0.2s;
}
.site-nav a:hover {
    color: var(--star-accent);
    text-shadow: 0 0 8px var(--star-accent);
}

/* =========================================
   ☆ LAYOUT BOXES ☆
   ========================================= */
.content-box, .sidebar-box, .diary-entry {
    background-color: rgba(0, 0, 0, 0.6);
    border: 3px solid var(--star-primary);
    box-shadow: 5px 5px 0 var(--star-accent);
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
}

/* Transparent Box (for Blog/Guestbook) */
.glass-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Two-Column Layout Wrapper */
.page-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 30px auto;
}
.content-box { flex: 1; }
.sidebar-box { width: 160px; text-align: center; }

/* Mobile Response */
@media (max-width: 768px) {
    .page-layout { flex-direction: column; align-items: center; }
    .content-box, .sidebar-box { width: 90%; max-width: 500px; }
}

/* =========================================
   ☆ PAGE SPECIFIC STYLES ☆
   ========================================= */

/* --- DIARY (Blog) --- */
.diary-entry {
    border: 1px solid rgba(170, 255, 255, 0.3);
    animation: fadeIn 0.5s ease forwards;
}
.diary-date {
    font-size: 22px;
    color: var(--star-accent);
    border-bottom: 1px dashed rgba(170, 255, 255, 0.3);
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}
.timestamp {
    font-family: 'RainyHearts', monospace; 
    font-size: 14px; opacity: 0.7; margin-top: 5px;
}
.mood-tag {
    font-size: 12px; color: var(--star-primary); margin-top: 15px; font-style: italic;
}

/* --- STICKER OBSERVATORY (Links) --- */
.gallery-header {
    font-size: 24px; color: var(--star-accent); text-align: left;
    margin-top: 40px; margin-bottom: 15px; padding-bottom: 10px;
    border-bottom: 2px dashed var(--star-primary);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.sticker-grid {
    display: flex; flex-wrap: wrap; gap: 15px;
    margin-bottom: 40px; animation: fadeIn 0.8s ease forwards;
}
.sticker-item {
    position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, 0.05);
}
.sticker-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 15px var(--star-accent); z-index: 10;
}
.sticker-item img { display: block; max-width: 100%; height: auto; }

/* --- INTRO PAGE (Star Gate) --- */
.star-gate {
    width: 200px; height: 200px;
    border: 4px dashed var(--star-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 40px;
    animation: slowSpin 20s linear infinite;
    box-shadow: 0 0 30px rgba(188, 147, 69, 0.1);
}
.gate-center {
    font-size: 80px; color: var(--star-accent);
    animation: reverseSpin 20s linear infinite; 
    text-shadow: 0 0 20px var(--star-accent);
}
.enter-link {
    font-size: 36px; color: var(--star-primary);
    text-decoration: none; border-bottom: 2px solid transparent;
    transition: all 0.3s ease; letter-spacing: 4px; cursor: pointer;
}
.enter-link:hover {
    color: var(--star-accent);
    text-shadow: 0 0 10px var(--star-accent);
    border-bottom: 2px solid var(--star-accent);
    letter-spacing: 8px;
}

/* =========================================
   ☆ SYSTEM FOOTER & MUSIC ☆
   ========================================= */
.system-footer {
    position: fixed; bottom: 0; left: 0;
    width: 100%; height: 50px; 
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid var(--star-primary);
    /* Z-INDEX 200: High enough to be seen, but below the cursor (10000) */
    z-index: 200; 
    display: none; /* Hidden until active */
    align-items: center; justify-content: space-between;
    padding: 0 20px; box-sizing: border-box;
}
body.active-site .system-footer { display: flex; }

.music-btn {
    background: transparent;
    border: 1px solid var(--star-accent);
    color: var(--star-accent);
    font-family: var(--font-body);
    padding: 5px 10px; cursor: pointer;
    font-size: 12px; text-transform: uppercase;
    transition: all 0.2s; min-width: 80px;
}
.music-btn:hover { background: var(--star-accent); color: #000; box-shadow: 0 0 15px var(--star-accent); }

/* Volume Slider */
.volume-control { display: flex; align-items: center; gap: 10px; margin-left: 15px; }
.volume-slider {
    -webkit-appearance: none; width: 80px; height: 4px;
    background: var(--star-primary); border-radius: 2px; outline: none; opacity: 0.7;
}
.volume-slider:hover { opacity: 1; }
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 12px; height: 12px;
    border-radius: 50%; background: var(--star-accent); cursor: pointer;
    box-shadow: 0 0 5px var(--star-accent);
}
.volume-slider::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%; background: var(--star-accent);
    cursor: pointer; border: none; box-shadow: 0 0 5px var(--star-accent);
}

/* --- FOOTER BANNERS & HOVER EFFECTS --- */
.footer-banners {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 0 10px; 
}

.footer-banners img {
    height: 31px; /* Standard button height */
    width: auto;
    image-rendering: pixelated;
    opacity: 0.8;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
}

.footer-banners img:hover {
    opacity: 1;
    transform: scale(1.5); /* Zoom effect */
    z-index: 100; 
    margin: 0 10px; 
    box-shadow: 0 0 10px var(--star-accent); 
}

/* =========================================
   ☆ ANIMATIONS ☆
   ========================================= */
#glowingCursor {
    position: fixed; top: 0; left: 0; pointer-events: none; 
    z-index: 10000; /* TOP LAYER */
    margin: 0; /* NO MARGINS - Allows JS to handle exact centering */
    font-family: sans-serif; font-size: 24px; line-height: 1;
    color: var(--star-primary);
    text-shadow: 0 0 5px var(--star-primary), 0 0 10px var(--star-accent);
    transition: opacity 0.2s ease; will-change: transform;
}

.sparkle-drip-particle {
    position: fixed; pointer-events: none;
    color: var(--star-accent); font-size: 12px;
    text-shadow: 0 0 3px var(--star-primary);
    z-index: 9998; animation: dripFade 0.8s forwards;
}

@keyframes dripFade { 0% { opacity: 0.8; transform: translateY(0); } 100% { opacity: 0; transform: translateY(20px); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slowSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes reverseSpin { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes pulseBtn { 0% { box-shadow: 0 0 2px var(--star-accent); } 50% { box-shadow: 0 0 10px var(--star-accent); } 100% { box-shadow: 0 0 2px var(--star-accent); } }

/* Lists & Misc */
.star-list { list-style: none; padding-left: 0; }
.star-list li { margin-bottom: 5px; }
.star-list li::before { content: "★ "; color: var(--star-accent); margin-right: 5px; }
.webring-tag { margin-top: 20px; border: 1px solid var(--star-blue); padding: 5px; display: inline-block; color: var(--star-purple); }
.site-footer { padding-top: 15px; border-top: var(--crisp-border); font-size: 12px; color: #555577; }
.counter { margin-top: 5px; padding: 3px 8px; background-color: #222233; display: inline-block; border: 1px solid #555577; }

/* Scrollbars */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #050510; border-left: 1px solid var(--star-primary); }
::-webkit-scrollbar-thumb { background-color: var(--star-accent); border: 2px solid #050510; }
::-webkit-scrollbar-thumb:hover { background-color: var(--star-primary); }
::selection { background: var(--star-accent); color: #000; }