/* ==========================================================================
   1. CUSTOM FONTS DECLARATION
   ========================================================================== */
@font-face {
    font-family: 'Pixelta';
    src: url('Pixelta.ttf') format('truetype');
}

@font-face {
    font-family: 'GrapeSoda';
    src: url('GrapeSoda.ttf') format('truetype');
}

@font-face {
    font-family: 'Dogica';
    src: url('dogica.ttf') format('truetype');
}

@font-face {
    font-family: 'DogicaPixel';
    src: url('dogicapixel.ttf') format('truetype');
}

/* ==========================================================================
   2. GLOBAL COLOR VARIABLES & BODY STYLES
   ========================================================================== */
:root {
    --neon-green: #adff42;
    --dark-bg: #000000;
    --card-bg: rgba(18, 18, 22, 0.92);
    --border-dashed: #2a2a35;
}

body {
    background-color: var(--dark-bg);
    background-image: url('Wide stars.gif');
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 100% auto;
    color: #7828E5;
    font-family: 'Dogica', monospace;
    letter-spacing: 1px !important;     /* Adds breathing room between individual characters */
    font-size: 0.75rem;
    line-height: 1.8;
    margin: 0;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   3. MAIN WRAPPER CONTAINER
   ========================================================================== */
.container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    position: relative;
}

/* ==========================================================================
   4. HEADER & LOGO
   ========================================================================== */
header {
    text-align: center;
    margin-bottom: 25px;
}

.site-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}

/* NAVIGATION BAR */
.nav-bar {
    border-top: 4px dotted var(--neon-green);
    border-bottom: 4px dotted var(--neon-green);
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

/* NAVIGATION BAR LINKS (FORCE CLEAR BOX SHADOWS & PADDING) */
.nav-bar a,
.nav-bar a:hover,
.nav-bar a:focus,
.nav-bar a:active {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.nav-bar a {
    color: #7828E5;
    font-family: 'GrapeSoda', sans-serif;
    font-size: 1.4rem;
    text-decoration: none !important; /* Removes text underline completely */
    letter-spacing: 2px;
    transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

/* NAVIGATION BAR HOVER (TEXT-ONLY GLOW & NO UNDERLINE) */
.nav-bar a:hover {
    color: var(--neon-green) !important;
    text-decoration: none !important; /* Prevents underline on hover */
    transform: scale(1.1);
    /* Multi-layer text-shadow casts glow directly onto text characters */
    text-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green), 0 0 15px var(--neon-green) !important;
}

/* Astronaut Style */

#astronaut {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 250px;
    height: auto;
    transition: transform 0.1s linear;
}

/* ==========================================================================
   5. POST CARDS & MEDIA
   ========================================================================== */
.post {
    background-color: var(--card-bg);
    border: 1px solid var(--border-dashed);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

/* Improve Readability for Post Body Text */
.post p {
    line-height: 1.8 !important;        /* Increases vertical space between text lines */
    letter-spacing: 1px !important;     /* Adds breathing room between individual characters */
    font-size: 0.75rem !important;      /* Sets ideal proportions for Dogica font */
    color: #7828E5 !important;          /* Custom body text color */
    margin-bottom: 15px;
}

.post-header-text {
    font-size: 0.75rem;
    color: #cccccc;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post h2 {
    font-family: 'GrapeSoda', sans-serif;
    color: #ffffff;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Responsive YouTube Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 6px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Post Metadata (Date & Tag Pill) */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #333;
    padding-top: 10px;
    margin-top: 15px;
    font-size: 0.65rem;
    color: #888888;
}

.tag-pill {
    background-color: var(--neon-green);
    color: #000000;
    font-family: 'DogicaPixel', sans-serif;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    letter-spacing: 1px;
}

/* ==========================================================================
   6. COMMENTS SECTION
   ========================================================================== */
.comments-section {
    margin-top: 15px;
    background: #08080a;
    padding: 12px;
    border-radius: 6px;
}

.comments-section h3 {
    font-size: 0.7rem;
    color: var(--neon-green);
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.comment-item {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1a1a22;
}

.comment-text {
    font-size: 0.65rem;
    color: #dddddd;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.comment-author {
    font-size: 0.55rem;
    color: #666666;
    display: block;
    text-align: right;
}

/* Styling for site links */
a {
    color: var(--neon-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   7. ALIEN MUSIC PLAYER WIDGET (BASE STYLES)
   ========================================================================== */
#music-player-container {
    
    width: 340px;
    height: 320px;
    z-index: 9990;
    overflow: visible !important;
    pointer-events: none;
}

.player-graphic {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Enable click interactions on floating track items & buttons */
.ship-btn,
.volume-container,
.floating-tracklist,
.track-item {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Button Hotspots Aligned Over Printed Icons */
.ship-btn {
    position: absolute;
    background: rgba(173, 255, 66, 0.0);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.ship-btn:hover {
    background: rgba(173, 255, 66, 0.35);
    box-shadow: 0 0 10px var(--neon-green);
}

.ship-btn:active {
    transform: scale(0.92);
}

.prev-pos { top: 28%; left: 22%; width: 28px; height: 28px; }
.play-pos { top: 27%; left: 31%; width: 32px; height: 32px; }
.next-pos { top: 25%; left: 42%; width: 28px; height: 28px; }

/* Volume Slider (Upper Right) */
.volume-container {
    position: absolute;
    top: 2%;
    right: 12%;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.85);
    padding: 3px 6px;
    border: 1px solid var(--neon-green);
    border-radius: 12px;
}

.volume-icon {
    font-size: 0.65rem;
    color: var(--neon-green);
}

#ship-volume-slider {
    width: 55px;
    accent-color: var(--neon-green);
    cursor: pointer;
}

/* Green Beam Text Wrapper */
.beam-text-wrapper {
    position: absolute;
    top: 180px;
    left: 80px;
    width: 250px;
    height: 22px;
    overflow: hidden;
    transform: rotate(11deg);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Marquee Text (#020065 Color) */
.beam-track-title {
    font-family: 'Pixelta', monospace;
    font-size: 0.75rem;
    color: #020065;
    font-weight: bold;
    white-space: nowrap;
    will-change: transform;
    animation: marquee-scroll 10s linear infinite;
    text-shadow: 0 0 1px rgba(2, 0, 101, 0.5);
}

@keyframes marquee-scroll {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* FLOATING TRACKLIST (Bright Green Neon Above UFO) */
.floating-tracklist {
    position: absolute;
    top: -130px !important;
    left: -40px;
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px 10px;
    justify-content: center;
    z-index: 99999 !important;
}

.track-item {
    font-family: 'DogicaPixel', sans-serif;
    font-size: 0.7rem;
    color: #adff42 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    text-shadow: 0 0 8px rgba(173, 255, 66, 0.9);
    animation: float-orbit 3s ease-in-out infinite alternate;
    transition: transform 0.2s, color 0.2s;
    background: rgba(0, 0, 0, 0.85);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px dashed #adff42;
    white-space: nowrap;
}

.track-item:hover {
    color: #ffffff !important;
    border-color: #ffffff;
    transform: scale(1.15) !important;
}

.track-item:nth-child(even) { animation-duration: 2.4s; animation-delay: 0.4s; }
.track-item:nth-child(3n)   { animation-duration: 3.1s; animation-delay: 0.2s; }

/* Orbit Animation */
@keyframes float-orbit {
    0%   { transform: translate(0px, 0px); }
    50%  { transform: translate(3px, -5px); }
    100% { transform: translate(-3px, 4px); }
}

/* ==========================================================================
   8. RESPONSIVE SHIP POSITIONING (WIDE VS SLIM SCREENS)
   ========================================================================== */

/* LARGE DESKTOP (>= 1200px): Ship floats cleanly to the left of the central column */
@media screen and (min-width: 1200px) {
    #music-player-container {
        position: fixed !important;
        top: 250px !important;
        bottom: auto !important;
        left: calc(50% - 660px) !important; /* Docks 660px left of screen center */
        margin: 0 !important;
    }
}

/* SLIM / TABLET / MOBILE (< 1199px): Ship un-fixes and stacks cleanly above the posts */
@media screen and (max-width: 1199px) {
    #music-player-container {
        position: relative !important;
        top: auto !important;
        bottom: -120px !important;
        left: auto !important;
        right: auto !important;
        margin: 0 auto 40px auto !important; /* Centers ship in main column */
        display: block !important;
        clear: both !important;
    }

    .floating-tracklist {
        top: -130px !important;
    }
}

/* ==========================================================================
   POST CONTENT EXPAND & FADE STYLES
   ========================================================================== */
.post-content-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

/* Collapsed height clamping */
.post-content-wrapper.collapsed {
    max-height: 120px !important;
}

.post-content-wrapper.collapsed .fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(18, 18, 22, 0) 0%, rgba(18, 18, 22, 1) 100%);
    pointer-events: none;
    display: block !important;
}

/* Expanded state shows full height */
.post-content-wrapper.expanded {
    max-height: 5000px !important;
}

.post-content-wrapper.expanded .fade-overlay {
    display: none !important;
}

/* EXPAND BUTTON STYLING */
.expand-btn {
    display: block;
    width: 100%;
    background: #08080a;
    color: var(--neon-green);
    border: 1px dashed var(--neon-green);
    font-family: 'DogicaPixel', sans-serif;
    font-size: 0.7rem;
    padding: 8px;
    margin: 10px 0 20px 0;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.expand-btn:hover {
    background: var(--neon-green);
    color: #000000;
}

/* ==========================================================================
   TEXT-TO-SPEECH TOOLBAR & SENTENCE HIGHLIGHT
   ========================================================================== */
.tts-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #08080a;
    border: 1px dashed var(--neon-green);
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.tts-btn {
    background: transparent;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    font-family: 'DogicaPixel', sans-serif;
    font-size: 0.65rem;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
}

.tts-btn:hover {
    background: var(--neon-green);
    color: #000000;
}

.tts-volume-label {
    font-size: 0.55rem;
    color: #888888;
    margin-left: auto;
}

.tts-volume-slider {
    width: 60px;
    accent-color: var(--neon-green);
    cursor: pointer;
}

/* Sentence-only highlighting */
.tts-sentence-active {
    background: rgba(173, 255, 66, 0.35) !important;
    color: #ffffff !important; /* Bright white text so it stands out clearly over purple */
    border-radius: 2px;
    text-shadow: 0 0 8px var(--neon-green);
    font-size: 0.75rem !important;
    line-height: 1.8 !important; /* Unitless multiplier instead of 1.8px */
    padding: 2px 4px;
}

/* ==========================================================================
   PAGINATION & SIDEBAR LAYOUT
   ========================================================================== */

/* LOAD MORE BUTTON */
#load-more-btn {
    display: block;
    width: 100%;
    max-width: 650px;
    margin: 20px auto 40px auto;
    background: #08080a;
    color: var(--neon-green);
    border: 1px dashed var(--neon-green);
    font-family: 'DogicaPixel', sans-serif;
    font-size: 0.8rem;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

#load-more-btn:hover {
    background: var(--neon-green);
    color: #000000;
}

/* MODULAR RIGHT SIDEBAR BASE STYLES */
#right-sidebar-container {
    width: 250px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-module {
    background: var(--card-bg);
    border: 1px dashed var(--neon-green);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.module-title {
    font-family: 'GrapeSoda', sans-serif;
    color: var(--neon-green);
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
    border-bottom: 2px dotted var(--neon-green);
    padding-bottom: 5px;
}

/* LINKBACK EMBED WIDGET STYLES */
.linkback-img {
    max-width: 70%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #333;
    margin-bottom: 8px;
    transition: transform 0.2s;
    
}

.linkback-img:hover {
    transform: scale(1.00);
}

.embed-instructions {
    font-size: 0.55rem;
    color: #aaaaaa;
    margin: 6px 0 4px 0;
}

.embed-code-box {
    width: 100%;
    height: 45px;
    background: #000000;
    color: var(--neon-green);
    border: 1px solid #333;
    font-family: monospace;
    font-size: 0.55rem;
    padding: 4px;
    resize: none;
    box-sizing: border-box;
    border-radius: 3px;
}

.copy-embed-btn {
    width: 100%;
    background: #08080a;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    font-family: 'DogicaPixel', sans-serif;
    font-size: 0.6rem;
    padding: 5px;
    margin-top: 5px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.copy-embed-btn:hover {
    background: var(--neon-green);
    color: #000000;
}

/* RESPONSIVE DOCKING: DESKTOP VS SLIM/TABLET/MOBILE */
@media screen and (min-width: 1200px) {
    #right-sidebar-container {
        position: fixed !important;
        top: 220px !important;
        right: calc(50% - 620px) !important;
    }
}

@media screen and (max-width: 1199px) {
    #right-sidebar-container {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin: 30px auto !important;
    }
}

/* --- Dead Pixel Society Reactions Widget Styles --- */
.post {
    position: relative; /* Needed to anchor popover to bottom left of post */
}

/* Footer Container for Reactions */
.post-reactions-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

/* Reaction Badges Container (Bottom-Left) */
.active-reactions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Individual Reaction Badge (Emoji/Emote + Count) */
.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.85rem;
    color: #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.reaction-badge:hover {
    border-color: #777;
    background: rgba(255, 255, 255, 0.1);
}

.reaction-badge.user-voted {
    border-color: #00ffcc; /* Neon active highlight fitting retro theme */
    background: rgba(0, 255, 204, 0.15);
    color: #00ffcc;
    font-weight: bold;
}

/* + Add Reaction Button */
.add-reaction-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    color: #ccc;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.add-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00ffcc;
    color: #fff;
}

/* Popover Emoji/Emote Selector Menu */
.emoji-picker-popover {
    position: absolute;
    bottom: 45px;
    left: 0;
    z-index: 100;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 260px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.emoji-picker-popover.hidden {
    display: none;
}

/* Popover Button Options */
.emoji-option {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background 0.1s;
}

.emoji-option:hover {
    transform: scale(2);
    background: rgba(255, 255, 255, 0.15);
}

/* Custom Emote Image Sizing & Alignment */
.reaction-emote-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}

/* Specific sizing inside the popover picker */
.emoji-option .reaction-emote-img {
    width: 26px;
    height: 26px;
}

/* ==========================================
   CUSTOM SPACE CURSORS
   ========================================== */

/* 1. Global Default Cursor: Ship Cursor */
html, body, p, div, span, article, header, main, footer {
    cursor: url('ShipCursorPointer.png'), auto !important;
}

/* 2. Hover Cursor: Planet Cursor on Interactive Elements */
a, 
button, 
input[type="range"], 
input[type="button"], 
input[type="submit"], 
textarea, 
.track-item, 
.tag-pill, 
.tts-btn, 
.expand-btn, 
.ship-btn, 
.copy-embed-btn {
    cursor: url('PlanetCursorPointer.png'), pointer !important;
}