* {
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

h1, h2, h3 {
    text-shadow: var(--text-shadow-subtle);
}

p {
    text-shadow: var(--text-shadow-none);
}

.text-gray-600, .text-gray-700 {
    text-shadow: var(--text-shadow-none);
}

.text-blue-100, .text-blue-400 {
    text-shadow: var(--text-shadow-subtle);
}

.post-card footer .text-blue-400 {
    color: var(--footer-text);
}

.post-card footer {
    border-top: 1px solid var(--divider-strong) !important;
}

.theme-dark .post-card footer {
    border-top: 1px solid var(--divider-strong) !important;
}

.post-card.post-full header {
    border-bottom: 1px solid var(--divider-strong) !important;
}

.theme-dark .post-card.post-full header {
    border-bottom: 1px solid var(--divider-strong) !important;
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark p,
.theme-dark .text-gray-600,
.theme-dark .text-gray-700,
.theme-dark .text-blue-100,
.theme-dark .text-blue-400 {
    color: var(--color-light-text);
    text-shadow: var(--text-shadow-strong);
}

:root {
    /* UNDERWATER DISTORTION CONTROLS */
    --distortion-intensity: 10;  /* Higher = stronger warping (0-100 recommended) */
    --distortion-speed: 30s;      /* Animation duration (lower = faster) */

    /* DARK MODE BACKGROUND SWAY CONTROLS */
    --dark-sway-intensity: 10;  /* Higher = more dramatic sway (10-100 recommended) */

    /* Image sizing */
    --post-image-max-width: 90%;
    --post-image-max-height: 420px;

    /* Gallery transition controls */
    --gallery-transition-duration: 800ms;

    /* Live Feed Widget height control */
    --live-feed-height: 135px;

    /* Core palette (light) */
    --hue-primary: 205;
    --hue-accent: 195;
    --hue-green: 140;
    --text-primary: #2d3748;
    --text-muted: #4a5568;
    --text-accent: #1a365d;

    /* Panels / glass */
    --glass-panel-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.3) 2%,
        rgba(220, 240, 255, 0.25) 50%,
        rgba(200, 230, 255, 0.3) 100%);
    --glass-panel-border: 3px solid rgba(255, 255, 255, 0.7);
    --glass-panel-shadow: 0 10px 50px rgba(0, 80, 150, 0.3),
        inset 0 2px 6px rgba(255, 255, 255, 0.6),
        inset 0 -2px 6px rgba(0, 100, 200, 0.2);

    /* Header */
    --header-bg: linear-gradient(180deg,
        rgba(0, 120, 200, 0.65) 0%,
        rgba(0, 90, 170, 0.55) 45%,
        rgba(0, 70, 140, 0.6) 50%,
        rgba(0, 100, 180, 0.55) 100%);
    --header-shadow: 0 4px 30px rgba(0, 150, 255, 0.5),
        0 0 60px rgba(0, 150, 255, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 50, 100, 0.6);
    --header-border-top: 1px solid rgba(255, 255, 255, 0.3);
    --header-border-bottom: 2px solid rgba(0, 180, 255, 0.5);

    /* Cards */
    --card-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.4) 3%,
        rgba(240, 250, 255, 0.35) 50%,
        rgba(230, 245, 255, 0.45) 100%);
    --card-border: 2px solid rgba(255, 255, 255, 0.6);
    --card-shadow: 0 2px 8px rgba(0, 80, 150, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 100, 200, 0.15);
    --card-bg-hover: linear-gradient(180deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.55) 3%,
        rgba(245, 252, 255, 0.45) 50%,
        rgba(235, 248, 255, 0.6) 100%);
    --card-shadow-hover: 0 4px 12px rgba(0, 80, 150, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 100, 200, 0.15);

    /* Dark glass (archive) */
    --dark-glass-bg: linear-gradient(180deg,
        rgba(30, 80, 140, 0.55) 0%,
        rgba(20, 60, 120, 0.45) 50%,
        rgba(10, 50, 100, 0.55) 100%);
    --dark-glass-border: 2px solid rgba(100, 180, 255, 0.4);
    --dark-glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 50, 100, 0.4);

    /* Archive items */
    --archive-item-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.1) 100%);
    --archive-item-border: 1px solid rgba(255, 255, 255, 0.35);
    --archive-item-gloss: linear-gradient(180deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    --archive-item-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
    --archive-item-hover-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.15) 100%);
    --archive-item-hover-shadow: 0 2px 6px rgba(0, 150, 255, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.4);

    /* Buttons */
    --btn-primary-bg: linear-gradient(180deg,
        #4db8e8 0%,
        #3aa8d8 30%,
        #2a98c8 45%,
        #1a88b8 50%,
        #2a98c8 100%);
    --btn-primary-border: 1px solid #1578a8;
    --btn-primary-shadow: 0 3px 10px rgba(0, 100, 200, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(0, 80, 150, 0.3);
    --btn-primary-bg-hover: linear-gradient(180deg,
        #5dc8f8 0%,
        #4ab8e8 30%,
        #3aa8d8 45%,
        #2a98c8 50%,
        #3aa8d8 100%);
    --btn-primary-shadow-hover: 0 4px 12px rgba(0, 80, 150, 0.25),
        inset 0 2px 5px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 80, 150, 0.3);

    --btn-secondary-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.35) 30%,
        rgba(200, 230, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.35) 100%);
    --btn-secondary-border: 1px solid rgba(255, 255, 255, 0.7);
    --btn-secondary-shadow: 0 3px 12px rgba(0, 100, 200, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 100, 200, 0.2);
    --btn-secondary-bg-hover: linear-gradient(180deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.5) 30%,
        rgba(220, 245, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.5) 100%);
    --btn-secondary-shadow-hover: 0 4px 12px rgba(0, 80, 150, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 100, 200, 0.2);

    /* Dividers */
    --divider-gradient: linear-gradient(90deg,
        transparent 0%,
        rgba(120, 200, 255, 0.75) 45%,
        rgba(180, 240, 255, 0.85) 50%,
        rgba(120, 200, 255, 0.75) 55%,
        transparent 100%);
    --divider-shadow: 0 1px 4px rgba(80, 160, 220, 0.35);
    --section-divider-gradient: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 10%,
        rgba(100, 200, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.5) 90%,
        transparent 100%);
    --section-divider-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

    /* Scrollbars */
    --scrollbar-track: linear-gradient(90deg, #d0e8f5 0%, #e5f3fa 50%, #d0e8f5 100%);
    --scrollbar-thumb: linear-gradient(180deg,
        #6dc4e8 0%,
        #4aa8d4 50%,
        #3890bc 100%);
    --scrollbar-thumb-hover: linear-gradient(180deg,
        #7dd4f8 0%,
        #5ab8e4 50%,
        #48a0cc 100%);

    /* Lightbox */
    --lightbox-backdrop: radial-gradient(circle at 30% 30%, rgba(120, 200, 255, 0.15), transparent 35%),
        radial-gradient(circle at 70% 70%, rgba(120, 180, 220, 0.12), transparent 40%),
        rgba(0, 20, 50, 0.35);

    /* Body overlay */
    --body-overlay: radial-gradient(ellipse at 20% 80%, rgba(144, 238, 144, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(135, 206, 250, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    --body-overlay-dark: radial-gradient(ellipse at 20% 80%, rgba(60, 140, 120, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(80, 140, 200, 0.18) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(180, 200, 230, 0.1) 0%, transparent 60%);

    /* Shared dividers */
    --divider-strong: rgba(0, 100, 200, 0.5);

    /* Common text shadows */
    --text-shadow-subtle: 0 1px 1px rgba(0, 0, 0, 0.1);
    --text-shadow-none: none;
    --text-shadow-strong: 0 1px 2px rgba(0, 0, 0, 0.45);
    --text-shadow-medium: 0 1px 2px rgba(0, 0, 0, 0.2);
    --text-shadow-button: 0 1px 3px rgba(0, 50, 100, 0.4), 0 0 4px rgba(255, 255, 255, 0.3);

    /* Common gradients */
    --gradient-primary: linear-gradient(135deg, #0a4a7a 0%, #1a6a9a 50%, #2a8aba 100%);

    /* Common colors */
    --color-white: #ffffff;
    --color-light-text: #eef4ff;

    /* Common dimensions */
    --border-radius-primary: 8px;
}

.theme-dark {
    --text-primary: #dfe8f5;
    --text-muted: #b8c4d9;
    --text-accent: #e6f3ff;

    --glass-panel-bg: linear-gradient(180deg,
        rgba(20, 50, 80, 0.6) 0%,
        rgba(18, 45, 75, 0.55) 50%,
        rgba(12, 30, 55, 0.6) 100%);
    --glass-panel-border: 3px solid rgba(180, 220, 255, 0.4);
    --glass-panel-shadow: 0 10px 50px rgba(0, 20, 60, 0.55),
        inset 0 2px 6px rgba(255, 255, 255, 0.35),
        inset 0 -2px 6px rgba(0, 60, 140, 0.35);

    --header-bg: linear-gradient(180deg,
        rgba(10, 60, 120, 0.7) 0%,
        rgba(5, 45, 100, 0.65) 45%,
        rgba(5, 35, 80, 0.7) 50%,
        rgba(8, 55, 110, 0.65) 100%);
    --header-shadow: 0 4px 30px rgba(0, 120, 240, 0.45),
        0 0 60px rgba(0, 120, 240, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.35),
        inset 0 -2px 4px rgba(0, 30, 80, 0.6);
    --header-border-top: 1px solid rgba(220, 240, 255, 0.25);
    --header-border-bottom: 2px solid rgba(60, 170, 255, 0.4);

    --card-bg: linear-gradient(180deg,
        rgba(35, 55, 85, 0.75) 0%,
        rgba(30, 45, 75, 0.65) 50%,
        rgba(28, 40, 70, 0.7) 100%);
    --card-border: 2px solid rgba(200, 230, 255, 0.3);
    --card-shadow: 0 2px 10px rgba(0, 15, 45, 0.45),
        inset 0 2px 4px rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 60, 140, 0.25);
    --card-bg-hover: linear-gradient(180deg,
        rgba(45, 70, 105, 0.8) 0%,
        rgba(38, 55, 90, 0.7) 50%,
        rgba(35, 50, 85, 0.75) 100%);
    --card-shadow-hover: 0 4px 14px rgba(0, 20, 60, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 80, 180, 0.25);

    --dark-glass-bg: linear-gradient(180deg,
        rgba(14, 40, 70, 0.65) 0%,
        rgba(12, 35, 60, 0.55) 50%,
        rgba(10, 30, 55, 0.6) 100%);
    --dark-glass-border: 2px solid rgba(140, 200, 255, 0.35);
    --dark-glass-shadow: 0 2px 10px rgba(0, 10, 30, 0.45),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 40, 90, 0.4);

    --archive-item-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.08) 100%);
    --archive-item-border: 1px solid rgba(220, 235, 255, 0.2);
    --archive-item-gloss: linear-gradient(180deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%);
    --archive-item-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.18),
        0 1px 3px rgba(0, 0, 0, 0.35);
    --archive-item-hover-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.1) 100%);
    --archive-item-hover-shadow: 0 2px 6px rgba(60, 160, 255, 0.35),
        inset 0 1px 3px rgba(255, 255, 255, 0.25);

    --btn-primary-bg: linear-gradient(180deg,
        #2f7ab6 0%,
        #256aa4 30%,
        #1c5a92 45%,
        #144c82 50%,
        #1c5a92 100%);
    --btn-primary-border: 1px solid #0f3d68;
    --btn-primary-shadow: 0 3px 12px rgba(0, 40, 100, 0.55),
        inset 0 2px 4px rgba(255, 255, 255, 0.35),
        inset 0 -1px 2px rgba(0, 50, 100, 0.35);
    --btn-primary-bg-hover: linear-gradient(180deg,
        #3889c6 0%,
        #2f7ab6 30%,
        #256aa4 45%,
        #1c5a92 50%,
        #2f7ab6 100%);
    --btn-primary-shadow-hover: 0 4px 14px rgba(0, 20, 60, 0.6),
        inset 0 2px 5px rgba(255, 255, 255, 0.45),
        inset 0 -1px 2px rgba(0, 60, 130, 0.35);

    --btn-secondary-bg: linear-gradient(180deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(200, 230, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.2) 100%);
    --btn-secondary-border: 1px solid rgba(220, 235, 255, 0.35);
    --btn-secondary-shadow: 0 3px 12px rgba(0, 20, 60, 0.45),
        inset 0 2px 4px rgba(255, 255, 255, 0.35),
        inset 0 -1px 2px rgba(0, 60, 140, 0.25);
    --btn-secondary-bg-hover: linear-gradient(180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.3) 30%,
        rgba(220, 245, 255, 0.35) 50%,
        rgba(255, 255, 255, 0.3) 100%);
    --btn-secondary-shadow-hover: 0 4px 14px rgba(0, 20, 60, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 60, 140, 0.25);

    --divider-gradient: linear-gradient(90deg,
        transparent 0%,
        rgba(140, 210, 255, 0.8) 45%,
        rgba(190, 240, 255, 0.85) 50%,
        rgba(140, 210, 255, 0.8) 55%,
        transparent 100%);
    --divider-shadow: 0 1px 4px rgba(40, 100, 160, 0.45);
    --section-divider-gradient: linear-gradient(90deg,
        transparent 0%,
        rgba(220, 235, 255, 0.45) 10%,
        rgba(90, 160, 230, 0.55) 50%,
        rgba(220, 235, 255, 0.45) 90%,
        transparent 100%);
    --section-divider-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);

    --scrollbar-track: linear-gradient(90deg, #1f3044 0%, #2a3d55 50%, #1f3044 100%);
    --scrollbar-thumb: linear-gradient(180deg,
        #3a6a92 0%,
        #2f5678 50%,
        #234664 100%);
    --scrollbar-thumb-hover: linear-gradient(180deg,
        #4580b0 0%,
        #366894 50%,
        #2a5578 100%);

    --lightbox-backdrop: radial-gradient(circle at 30% 30%, rgba(60, 120, 180, 0.25), transparent 35%),
        radial-gradient(circle at 70% 70%, rgba(50, 90, 140, 0.2), transparent 40%),
        rgba(4, 8, 18, 0.7);

    --body-overlay: radial-gradient(ellipse at 20% 80%, rgba(60, 140, 120, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(70, 140, 200, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(200, 220, 255, 0.12) 0%, transparent 60%);
    --body-overlay-dark: radial-gradient(ellipse at 20% 80%, rgba(40, 80, 70, 0.22) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(60, 100, 150, 0.22) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(120, 150, 200, 0.14) 0%, transparent 60%);

    --divider-strong: rgba(100, 180, 255, 0.5);

    /* Common gradients (dark theme) */
    --gradient-primary: linear-gradient(135deg, #0a4a7a 0%, #1a6a9a 50%, #2a8aba 100%);

    /* Common colors (dark theme) */
    --color-white: #ffffff;
    --color-light-text: #eef4ff;

    /* Common dimensions (dark theme) */
    --border-radius-primary: 8px;
}

body {
    background: url('../Assets/Background4.jpg') center center fixed;
    background-size: cover;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding: 2rem;
    transition: background 0.6s ease;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../Assets/DarkBackground1.jpg') center center fixed;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    /* Pre-apply the scale so it doesn't animate when switching modes */
    transform: scale(1.07) translate(var(--dark-sway-x, 0px), var(--dark-sway-y, 0px));
    /* Separate transitions for different properties */
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.8s ease-out;
    /* Default filter state (no filter in light mode) */
    filter: brightness(1);
}

body.theme-dark::after {
    opacity: 1;
    /* Darken the dark mode background */
    filter: brightness(0.4);
}

:root {
    --footer-text: #4a5568;
}

.theme-dark {
    --footer-text: #dfe6f5;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--body-overlay);
    pointer-events: none;
    z-index: 1;
}

body.theme-dark::before {
    background: var(--body-overlay-dark);
}

#underwater-distortion-layer {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../Assets/Background4.jpg') center center fixed;
    background-size: cover;
    filter: url(#underwater-distortion);
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    will-change: filter;
    clip-path: polygon(0% 33%, 100% 18%, 100% 100%, 0% 100%);
}

body.theme-dark #underwater-distortion-layer {
    display: none;
}

.glass-panel {
    background: var(--glass-panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-panel-border);
    box-shadow: var(--glass-panel-shadow);
    position: relative;
}

.content-wrapper {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    min-height: 80vh;
    max-height: 90vh;
    border-radius: 20px;
    padding: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#main-content {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.page-container {
    background: transparent;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

#posts-container,
main.w-\[70\%\] {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 70%;
    min-height: 0;
    max-height: 100%;
    padding-right: 0.75rem;
    box-sizing: border-box;
}

aside.w-\[30\%\] {
    flex: 0 0 30%;
    align-self: stretch;
    position: sticky;
    top: 0;
    min-height: 0;
    height: auto;
    display: grid;
    grid-template-rows: 1fr auto auto auto;
    gap: 0.5rem;
    overflow: hidden;
}

aside.w-\[30\%\] > div {
    min-height: 0;
}

.header-glow {
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--header-shadow);
    border-bottom: var(--header-border-bottom);
    border-top: var(--header-border-top);
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
}

header p {
    text-shadow: var(--text-shadow-medium);
}

.content-wrapper > footer {
    font-family: 'Courier New', 'MS Sans Serif', monospace;
    font-size: 10px;
    line-height: 1.4;
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--header-shadow);
    border: none;
    border-bottom: var(--header-border-bottom);
    border-top: var(--header-border-top);
    border-radius: 0 0 15px 15px;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.content-wrapper > footer p {
    text-shadow: var(--text-shadow-none);
    color: #ffffff !important;
    font-size: 10px;
    letter-spacing: 0.5px;
    font-weight: normal;
}

.content-wrapper > footer .footer-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.content-wrapper > footer .footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.content-wrapper > footer .footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.content-wrapper > footer .badge-container {
    justify-content: center;
    margin: 0;
}

.card-container {
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    position: relative;
    transition: all 0.3s ease;
}

.card-container.clickable:hover {
    background: var(--card-bg-hover);
    box-shadow: var(--card-shadow-hover);
}

.post-card {
    border-radius: 4px;
}

.aero-glass-dark {
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: 6px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 auto;
}

.aero-glass-dark h2 {
    position: relative;
    z-index: 1;
}

.aero-glass-dark nav,
#archive-tree {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 2px;
}

.aero-glass-dark nav::-webkit-scrollbar,
#archive-tree::-webkit-scrollbar {
    display: none;
}

.widget-title {
    font-size: 16px;
    letter-spacing: 0.3px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.widget-title,
.archive-link,
.post-nav-title,
.post-title-gradient,
.stat-number,
.stat-label,
.music-player-volume-label {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--text-shadow-subtle);
}

.theme-dark .widget-title,
.theme-dark .archive-link,
.theme-dark .post-nav-title,
.theme-dark .post-title-gradient,
.theme-dark .stat-number,
.theme-dark .stat-label,
.theme-dark .music-player-volume-label {
    background: none;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Archive items - uses button-primary styling */
.archive-item {
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    border-radius: var(--border-radius-primary);
    transition: all 0.2s ease;
    box-shadow:
        0 2px 6px rgba(0, 100, 200, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.archive-item > * {
    position: relative;
    z-index: 2;
}

.bold-text,
.archive-month-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
    text-shadow: var(--text-shadow-medium);
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.theme-dark .bold-text,
.theme-dark .archive-month-text {
    color: var(--color-light-text);
}

.archive-item:hover {
    background: var(--btn-primary-bg-hover);
    /* Softer hover to avoid spill outside margins */
    box-shadow:
        0 4px 10px rgba(0, 120, 220, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.archive-link {
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.archive-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
        rgba(40, 130, 210, 0.2),
        rgba(18, 90, 170, 0.16));
    box-shadow:
        0 6px 18px rgba(0, 120, 220, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 70, 150, 0.18);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s ease;
    z-index: 1;
}

.theme-dark .archive-link {
    color: #ffffff;
}

.archive-link:hover {
    opacity: 0.9;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 6px rgba(100, 200, 255, 0.4);
}

.archive-link:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.theme-dark .archive-link:hover {
    opacity: 1;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(100, 200, 255, 0.5);
}

.theme-dark .archive-link::before {
    background: linear-gradient(135deg,
        rgba(80, 200, 255, 0.16),
        rgba(120, 220, 255, 0.1));
    box-shadow:
        0 6px 18px rgba(0, 120, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.widget-title,
.archive-link,
.post-nav-title,
.post-title-gradient,
.stat-number,
.stat-label,
.music-player-volume-label {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--text-shadow-subtle);
}

.theme-dark .widget-title,
.theme-dark .archive-link,
.theme-dark .post-nav-title,
.theme-dark .post-title-gradient,
.theme-dark .stat-number,
.theme-dark .stat-label,
.theme-dark .music-player-volume-label {
    background: none;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.button-primary {
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    box-shadow: var(--btn-primary-shadow);
    text-shadow: var(--text-shadow-button);
    border-radius: var(--border-radius-primary);
}

.button-primary:hover {
    background: var(--btn-primary-bg-hover);
    box-shadow: var(--btn-primary-shadow-hover);
}

.button-secondary {
    background: var(--btn-secondary-bg);
    border: var(--btn-secondary-border);
    box-shadow: var(--btn-secondary-shadow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-primary);
}

.button-secondary:hover {
    background: var(--btn-secondary-bg-hover);
    box-shadow: var(--btn-secondary-shadow-hover);
}

.section-divider {
    height: 2px;
    background: var(--section-divider-gradient);
    margin: 0.5rem 0;
    box-shadow: var(--section-divider-shadow);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(0, 100, 200, 0.2);
}

.section-divider.vertical-divider {
    width: 2px;
    height: auto;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 10%,
        rgba(100, 200, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.5) 90%,
        transparent 100%);
    margin: 0 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(0, 100, 200, 0.2);
}

/* Scrollbar styling - WebKit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 18px !important;
    height: 18px !important;
}

*::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #d0e8f5 0%, #e5f3fa 50%, #d0e8f5 100%) !important;
    border-radius: 10px !important;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        #6dc4e8 0%, 
        #4aa8d4 50%, 
        #3890bc 100%) !important;
    border-radius: 10px !important;
    border: 2px solid #d0e8f5 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        #7dd4f8 0%, 
        #5ab8e4 50%, 
        #48a0cc 100%) !important;
}

/* Scrollbar styling - Firefox */
* {
    scrollbar-width: thin !important;
    scrollbar-color: #6dc4e8 #d0e8f5 !important;
}

.theme-dark *::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #1f3044 0%, #2a3d55 50%, #1f3044 100%) !important;
}

.theme-dark *::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        #3a6a92 0%,
        #2f5678 50%,
        #234664 100%) !important;
    border: 2px solid #1f3044 !important;
}

.theme-dark *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
        #4580b0 0%,
        #366894 50%,
        #2a5578 100%) !important;
}

.theme-dark * {
    scrollbar-color: #3a6a92 #1f3044 !important;
}

/* Post navigation buttons align to card styling */
.post-navigation .post-nav-btn {
    background: var(--card-bg);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius-primary);
}

.post-navigation .post-nav-btn:hover {
    background: var(--card-bg-hover);
    box-shadow: var(--card-shadow-hover);
}


.blog-title-link {
    transition: all 0.3s ease;
    cursor: pointer;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(100, 200, 255, 0.3);
}

.blog-title-link:hover {
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(100, 200, 255, 0.5);
    transform: scale(1.02);
}

.font-semibold {
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Full post content styling */
.full-post-content p {
    margin-bottom: 2rem;
    line-height: 2;
    text-shadow: none;
    color: var(--text-primary);
}

.full-post-content p:last-child {
    margin-bottom: 0;
}

/* Full post layout */
.post-full {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 85vh;
    overflow-y: auto;
}

.post-full .full-post-content {
    flex: 1;
    padding-right: 0.35rem;
}

@media (max-width: 768px) {
    .post-full {
        max-height: 75vh;
    }
}

/* Post images */
.post-image {
    display: block;
    margin: 1.5rem auto;
    max-width: var(--post-image-max-width);
    max-height: var(--post-image-max-height);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(220, 240, 255, 0.35) 50%,
        rgba(200, 230, 255, 0.45) 100%);
    box-shadow:
        0 4px 14px rgba(0, 80, 150, 0.18),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 100, 200, 0.2);
    padding: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    cursor: zoom-in;
}

.post-image:hover {
    box-shadow:
        0 6px 18px rgba(0, 120, 200, 0.28),
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 100, 200, 0.25);
    transform: scale(1.01);
    filter: brightness(1.03);
}

.gallery-viewport img {
    cursor: zoom-in;
}

/* Inline image galleries */
.image-gallery {
    position: relative;
    margin: 1.5rem auto;
    max-width: var(--post-image-max-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05rem;
}

.gallery-viewport {
    flex: 1;
    position: relative;
    display: grid;
}

.gallery-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.gallery-nav {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.5) 0%, 
        rgba(255, 255, 255, 0.35) 50%, 
        rgba(220, 240, 255, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 100, 200, 0.25);
    border-radius: 9px;
    padding: 0.35rem 0.55rem;
    color: #0f2e56;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.gallery-nav:hover {
    box-shadow: 
        0 3px 12px rgba(0, 150, 255, 0.35),
        inset 0 1px 3px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 80, 150, 0.25);
    transform: translateY(-1px);
}

.gallery-indicator {
    font-size: 1rem;
    font-weight: 700;
    color: #1a365d;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.78) 0%,
        rgba(220, 240, 255, 0.7) 50%,
        rgba(200, 230, 255, 0.8) 100%);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.75), 0 2px 6px rgba(0, 80, 150, 0.2);
}

@media (max-width: 768px) {
    .image-gallery {
        max-width: 100%;
        gap: 0.4rem;
    }

    .gallery-nav {
        padding: 0.4rem 0.6rem;
    }

    .gallery-indicator {
        font-size: 0.8rem;
    }
}

/* Lightbox overlay */
#lightbox-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    will-change: opacity;
}

#lightbox-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(120, 200, 255, 0.15), transparent 35%),
                radial-gradient(circle at 70% 70%, rgba(120, 180, 220, 0.12), transparent 40%),
                rgba(0, 20, 50, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#lightbox-image {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(220, 240, 255, 0.3) 50%,
        rgba(200, 230, 255, 0.4) 100%);
    box-shadow:
        0 12px 30px rgba(0, 60, 120, 0.28),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 80, 150, 0.2);
    padding: 10px;
    cursor: zoom-out;
}

.lightbox-open {
    overflow: hidden;
}

/* Decorative divider */
.decorative-divider {
    height: 2px;
    background: var(--divider-gradient);
    margin: 0.6rem 0;
    box-shadow: var(--divider-shadow);
}

/* Badge container styling */
.badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge-item {
    display: inline-block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.badge-item:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 12px rgba(100, 200, 255, 0.4));
}

.badge-item img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* End of posts message - archaic pixelated text */
.end-of-posts {
    font-family: 'Courier New', 'MS Sans Serif', monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: none;
    font-weight: normal;
}



/* Calendar icon specific */
.icon-calendar {
    width: 24px;
    height: 24px;
    position: relative;
    top: .2px;
    left: 1px;
}

/* Calendar icon wrapper - matches view-more-btn styling */
.icon-wrapper-calendar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, 
        rgba(30, 80, 140, 0.55) 0%, 
        rgba(20, 60, 120, 0.45) 50%, 
        rgba(10, 50, 100, 0.55) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(100, 180, 255, 0.4);
    border-radius: 4px;
    padding: 2px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -1px 2px rgba(0, 50, 100, 0.3);
    position: relative;
}


/* Widget title icon - matches archive icon size */
.widget-title .icon-ico {
    width: 24px !important;
    height: 24px !important;
    display: inline-block;
    vertical-align: middle;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    margin-right: 6px;
    flex-shrink: 0;
    align-self: center;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .content-wrapper {
        padding: 1rem;
        min-height: auto;
        max-height: none;
    }

    .page-container {
        flex-direction: column !important;
    }

    #posts-container,
    main.w-\[70\%\] {
        width: 100% !important;
        flex: 1 1 auto !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        padding-right: 0.75rem !important;
    }

    aside.w-\[30\%\] {
        width: 100% !important;
        flex: 0 0 auto !important;
        position: relative !important;
        margin-top: 1rem;
        max-height: none !important;
        height: auto !important;
    }

    .section-divider.vertical-divider {
        display: none;
    }

    .post-card {
        padding: 1rem !important;
    }

    header {
        padding: 1rem !important;
    }

    .content-wrapper > footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .content-wrapper > footer .footer-left,
    .content-wrapper > footer .footer-center,
    .content-wrapper > footer .footer-right {
        justify-content: center;
        flex: none;
    }

    .content-wrapper > footer .badge-container {
        justify-content: center;
    }

    footer {
        padding: 1rem !important;
    }

    .badge-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .content-wrapper {
        padding: 0.75rem;
        border-radius: 15px;
    }

    .post-card {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
    }

.read-more-btn {
        font-size: 0.7rem !important;
        padding: 0.5rem 0.75rem !important;
    border-radius: var(--border-radius-primary);
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.1rem !important;
    }
}

/* Music Player Styles */
.music-player-container {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto; /* keep natural height/aspect */
    display: flex;
    flex-direction: column;
}


.music-player-track-display {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    border-radius: 8px;
    box-shadow: var(--btn-primary-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

/* Music player track name - now uses bold-text */
.music-player-track-name {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    position: relative;
    z-index: 2;
}

.music-player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0;
}

.music-player-content {
    position: relative;
    z-index: 1;
}

.music-player-visualizer {
    position: absolute;
    inset: -3px -8px -3px -3px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    filter: none; /* keep flat color in light mode */
    mix-blend-mode: normal;
    transform-origin: center bottom;
}

.theme-dark .music-player-visualizer {
    filter: drop-shadow(0 12px 16px rgba(0, 180, 255, 0.15));
    mix-blend-mode: screen;
}

.music-player-visualizer.active {
    opacity: 0.9;
    transform: translateY(0);
}

.music-player-visualizer.closing {
    opacity: 0;
    transform: translateY(18px);
}

.music-player-visualizer canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.music-player-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.music-player-btn {
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    box-shadow: var(--btn-primary-shadow);
    text-shadow: var(--text-shadow-button);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 14px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-primary);
}

.music-player-btn:hover {
    background: var(--btn-primary-bg-hover);
    box-shadow: var(--btn-primary-shadow-hover);
}

.music-player-btn.play-pause {
    min-width: 60px;
    font-size: 16px;
}

.music-player-volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.music-player-volume-label {
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    color: #ffffff;
}

.theme-dark .music-player-volume-label {
    color: #ffffff;
}

.music-player-volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    min-width: 60px;
}

.music-player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--btn-primary-bg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.music-player-volume-slider::-webkit-slider-thumb:hover {
    background: var(--btn-primary-bg-hover);
    transform: scale(1.1);
}

.music-player-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--btn-primary-bg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.music-player-volume-slider::-moz-range-thumb:hover {
    background: var(--btn-primary-bg-hover);
    transform: scale(1.1);
}

/* Footer Music Controls (Post View) */
#footer-music-controls-container {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.footer-music-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.footer-music-btn {
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    box-shadow: var(--btn-primary-shadow);
    text-shadow: var(--text-shadow-button);
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    font-size: 12px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px; /* Slightly smaller radius for footer */
}

.footer-music-btn:hover {
    background: var(--btn-primary-bg-hover);
    box-shadow: var(--btn-primary-shadow-hover);
}

.footer-music-btn.play-pause {
    min-width: 50px;
    font-size: 14px;
}

/* Dark theme adjustments for music player */
.theme-dark .music-player-track-display {
    background: rgba(0, 0, 0, 0.2);
}

.theme-dark .music-player-volume-slider {
    background: rgba(255, 255, 255, 0.15);
}

/* Image Gallery Widget Styles */
.image-gallery-widget {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto; /* keep natural height */
}


.gallery-coverflow {
    position: relative;
    height: 140px; /* default aspect */
    perspective: 800px;
    perspective-origin: center center;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 16px;
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    border-radius: 10px;
    box-shadow: 
        0 2px 8px rgba(0, 100, 200, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(0, 80, 150, 0.3);
}

.theme-dark .gallery-coverflow {
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    box-shadow: 
        0 2px 8px rgba(0, 40, 100, 0.35),
        inset 0 2px 4px rgba(255, 255, 255, 0.35),
        inset 0 -1px 2px rgba(0, 50, 100, 0.35);
}

.gallery-image-item {
    position: absolute;
    transition: transform var(--gallery-transition-duration) ease, opacity var(--gallery-transition-duration) ease;
    will-change: transform, opacity;
    cursor: default;
    opacity: 1;
    transform-style: preserve-3d;
}

.gallery-image-item.fading {
    opacity: 0;
}

.gallery-image-item img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(220, 240, 255, 0.35) 50%,
        rgba(200, 230, 255, 0.45) 100%);
    box-shadow:
        0 3px 10px rgba(0, 80, 150, 0.18),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 100, 200, 0.2);
    padding: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity var(--gallery-transition-duration) ease;
}

.gallery-image-item.center {
    z-index: 2;
    cursor: pointer;
}

.gallery-image-item.center img:hover {
    box-shadow:
        0 6px 18px rgba(0, 120, 200, 0.28),
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 100, 200, 0.25);
    transform: scale(1.01);
    filter: brightness(1.03);
}

.gallery-image-item.left {
    transform: translateX(-170px) translateZ(-100px) rotateY(0deg) scale(.8);
    opacity: 0.5;
}

.gallery-image-item.center {
    transform: translateX(0) translateZ(0) rotateY(0deg) scale(1.6);
}

.gallery-image-item.right {
    transform: translateX(170px) translateZ(-100px) rotateY(0deg) scale(.8);
    opacity: 0.5;
}

/* Live Feed Widget */
.live-feed-widget {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto; /* keep natural height */
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 0 20px rgba(100, 180, 255, 0.3),
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 -2px 8px rgba(255, 255, 255, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 30%),
        var(--card-bg);
}

.theme-dark .live-feed-widget {
    border: 2px solid rgba(180, 220, 255, 0.35);
    box-shadow: 
        0 0 20px rgba(80, 140, 200, 0.25),
        inset 0 2px 8px rgba(0, 0, 0, 0.45),
        inset 0 -2px 8px rgba(255, 255, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.live-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0 0.25rem;
}


.live-feed-nav {
    display: flex;
    gap: 0.25rem;
}

.live-feed-nav-arrow {
    width: 24px;
    height: 24px;
    /* More pronounced 3D effect */
    background: 
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.25) 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.15) 100%),
        var(--btn-primary-bg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 80, 150, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 50, 100, 0.4);
}

.live-feed-nav-arrow:hover {
    background: 
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.1) 100%),
        var(--btn-primary-bg-hover);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.35),
        inset 0 1px 3px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(0, 80, 150, 0.3);
    transform: translateY(-1px);
}

.live-feed-nav-arrow:active {
    /* Push down effect */
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.live-feed-content {
    height: var(--live-feed-height);
    position: relative;
    padding: 0.35rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    border-radius: 10px;
    box-shadow:
        0 2px 8px rgba(0, 100, 200, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(0, 80, 150, 0.3);
}

.theme-dark .live-feed-content {
    background: var(--btn-primary-bg);
    border: var(--btn-primary-border);
    box-shadow: 
        0 2px 8px rgba(0, 40, 100, 0.35),
        inset 0 2px 4px rgba(255, 255, 255, 0.35),
        inset 0 -1px 2px rgba(0, 50, 100, 0.35);
}

.reading-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    height: 100%;
}

.book-title {
    margin-bottom: 0.125rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.book-author {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 0.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.theme-dark .book-author {
    color: #a0aec0;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background:
        linear-gradient(180deg,
            rgba(0, 50, 100, 0.4) 0%,
            rgba(0, 30, 80, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.2rem;
    box-shadow:
        inset 0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 -1px 2px rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-dark .progress-bar-container {
    background: 
        linear-gradient(180deg,
            rgba(0, 40, 80, 0.5) 0%,
            rgba(0, 20, 60, 0.35) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.5),
        inset 0 -1px 2px rgba(255, 255, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-fill {
    height: 100%;
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.2) 30%,
            transparent 50%,
            rgba(0, 0, 0, 0.2) 100%),
        linear-gradient(90deg,
            #4db8e8 0%,
            #3aa8d8 50%,
            #2a98c8 100%);
    border-radius: 10px;
    transition: width 0.8s ease-out;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -2px 3px rgba(0, 80, 150, 0.4),
        0 0 10px rgba(77, 184, 232, 0.6);
}

.theme-dark .progress-bar-fill {
    background: 
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.15) 30%,
            transparent 50%,
            rgba(0, 0, 0, 0.25) 100%),
        linear-gradient(90deg, 
            #3aa8d8 0%, 
            #2a98c8 50%, 
            #1a88b8 100%);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 3px rgba(0, 60, 120, 0.5),
        0 0 12px rgba(58, 168, 216, 0.7);
}

.progress-percentage {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-dark .progress-percentage {
    color: #eef4ff;
}

.thought-content {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.thought-text {
    font-size: 14px;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-style: italic;
    max-width: 100%;
    word-wrap: break-word;
}

.theme-dark .thought-text {
    color: #eef4ff;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    align-items: flex-start;
}

.stats-grid-compact {
    gap: 0.4rem;
    margin-top: 0;
}

.stat-item {
    text-align: center;
    padding: 0.3rem 0.375rem;
    /* Use card background for lighter look */
    background: 
        /* Top highlight */
        linear-gradient(180deg, 
            rgba(255, 255, 255, 0.15) 0%, 
            transparent 30%),
        /* Base gradient */
        var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(0, 80, 150, 0.2);
    
    /* Add top glossy strip */
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 200, 255, 0.6) 50%,
        transparent);
    z-index: 1;
}

.theme-dark .stat-item {
    background: 
        linear-gradient(135deg,
            rgba(0, 40, 80, 0.35) 0%,
            rgba(0, 20, 60, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.45),
        inset 0 -1px 2px rgba(255, 255, 255, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.theme-dark .stat-item::before {
    background: linear-gradient(90deg,
        transparent,
        rgba(120, 200, 255, 0.5) 50%,
        transparent);
}

.stat-number {
    font-size: 16px;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 0.05rem;
    position: relative;
    z-index: 2;
}

.stat-label {
    font-size: 16px;
    letter-spacing: 0.3px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.27;
    position: relative;
    z-index: 2;
}

.status-indicator {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.status-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.3rem;
    position: relative;
    display: inline-block;
    border-radius: 50%;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-icon-online {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    box-shadow:
        0 2px 8px rgba(34, 197, 94, 0.4),
        0 0 12px rgba(34, 197, 94, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.theme-dark .status-icon-online {
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    box-shadow: 
        0 2px 8px rgba(34, 197, 94, 0.5),
        0 0 16px rgba(34, 197, 94, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.status-icon-away {
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    box-shadow: 
        0 2px 8px rgba(245, 158, 11, 0.4),
        0 0 12px rgba(245, 158, 11, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.theme-dark .status-icon-away {
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 
        0 2px 8px rgba(245, 158, 11, 0.5),
        0 0 16px rgba(245, 158, 11, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.status-icon-offline {
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
    box-shadow: 
        0 2px 8px rgba(239, 68, 68, 0.4),
        0 0 12px rgba(239, 68, 68, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.theme-dark .status-icon-offline {
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    box-shadow: 
        0 2px 8px rgba(239, 68, 68, 0.5),
        0 0 16px rgba(239, 68, 68, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.status-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
    text-shadow: var(--text-shadow-medium);
    margin-bottom: 0.1rem;
}

.theme-dark .status-text {
    color: var(--color-light-text);
}

.last-update {
    font-size: 12px;
    color: var(--color-white);
    text-shadow: var(--text-shadow-medium);
    line-height: 1.3;
}

.theme-dark .last-update {
    color: #a0aec0;
}

@media (max-width: 768px) {
    .live-feed-content {
        --live-feed-height: 140px;
        padding: 0.375rem;
    }

    .book-title {
        font-size: 13px;
    }

    .book-author {
        font-size: 11px;
    }

    .thought-text {
        font-size: 12px;
    }

    .stat-number {
        font-size: 16px;
    }

    .stat-label {
        font-size: 16px;
    }

    .status-icon {
        width: 20px;
        height: 20px;
    }

    .status-text {
        font-size: 14px;
    }

    .last-update {
        font-size: 10px;
    }
}


