/* ============================================
   DREAMTIME SCIENCE - Main Stylesheet
   Dreamy, calming, cosmic design system
   ============================================ */

/* --- 1. CSS Variables & Theme --- */
:root {
    --bg-primary: #050510;
    --bg-secondary: #0a0a1e;
    --bg-tertiary: #0e0c24;
    --bg-card: rgba(14, 12, 36, 0.6);
    --bg-card-hover: rgba(20, 16, 50, 0.8);
    --bg-glass: rgba(10, 8, 30, 0.65);
    --bg-glass-strong: rgba(10, 8, 30, 0.85);

    --accent-purple: #7c5cbf;
    --accent-purple-light: #a78bfa;
    --accent-blue: #4a7dbd;
    --accent-blue-light: #7db4e8;
    --accent-teal: #5eead4;
    --accent-lavender: #c4b5fd;
    --accent-gold: #c9a96e;

    --text-primary: #e8e2f4;
    --text-secondary: #a099b8;
    --text-muted: #6b6580;
    --text-heading: #f0ecf8;

    --glass-border: rgba(124, 92, 191, 0.15);
    --glass-border-hover: rgba(124, 92, 191, 0.3);
    --glass-shadow: rgba(94, 234, 212, 0.05);

    --gradient-aurora: linear-gradient(135deg, #7c5cbf 0%, #4a7dbd 50%, #5eead4 100%);
    --gradient-aurora-subtle: linear-gradient(135deg, rgba(124, 92, 191, 0.3) 0%, rgba(74, 125, 189, 0.2) 50%, rgba(94, 234, 212, 0.1) 100%);
    --gradient-hero: linear-gradient(180deg, #0a0520 0%, #050510 40%, #050a18 100%);
    --gradient-section-alt: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    --gradient-text: linear-gradient(135deg, var(--accent-purple-light), var(--accent-blue-light), var(--accent-teal));

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-purple: 0 0 30px rgba(124, 92, 191, 0.15);
    --shadow-glow-teal: 0 0 30px rgba(94, 234, 212, 0.1);

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-glacial: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --container-max: 1200px;
    --container-narrow: 800px;
    --container-text: 680px;
}


/* --- 2. Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-purple-light);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--accent-teal);
}

::selection {
    background: rgba(124, 92, 191, 0.3);
    color: var(--text-primary);
}


/* --- 3. Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--accent-purple-light);
}

.text-glow {
    text-shadow: 0 0 40px rgba(124, 92, 191, 0.3), 0 0 80px rgba(124, 92, 191, 0.1);
}


/* --- 4. Layout & Utilities --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--text {
    max-width: var(--container-text);
}

.section {
    padding: 100px 0;
    position: relative;
    background-color: var(--bg-primary);
}

.section--alt {
    background: var(--gradient-section-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 12px;
}

.divider {
    width: 80px;
    height: 2px;
    background: var(--gradient-aurora);
    margin: 0 auto;
    border-radius: 2px;
    opacity: 0.5;
}

.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;
}


/* --- 5. Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-base);
}

.nav.scrolled {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-base);
    white-space: nowrap;
}

.nav-brand:hover {
    color: var(--accent-purple-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-aurora);
    transition: width var(--transition-base);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 6px 0;
    transition: all var(--transition-base);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}


/* --- 6. Hero Section --- */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gradient-hero);
    background-size: cover;
    background-position: center;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(124, 92, 191, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(74, 125, 189, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(94, 234, 212, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.hero-title .text-gradient {
    display: inline;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    font-weight: 400;
    color: var(--accent-lavender);
    margin-bottom: 24px;
    opacity: 0.85;
}

.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}


/* --- 7. Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--gradient-aurora);
    color: #0a0a14;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(124, 92, 191, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 92, 191, 0.4);
    color: #0a0a14;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-purple);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-purple-light);
    border: 1px solid var(--accent-purple);
    padding: 12px 24px;
}

.btn-outline:hover {
    background: rgba(124, 92, 191, 0.1);
    border-color: var(--accent-purple-light);
    color: var(--accent-purple-light);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}


/* --- 8. Platform Cards --- */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.platform-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.platform-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    transform: translateY(-4px);
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(124, 92, 191, 0.1);
}

.platform-icon svg {
    width: 24px;
    height: 24px;
}

.platform-icon--yt { background: rgba(255, 0, 0, 0.1); }
.platform-icon--yt svg { fill: #ff4444; }

.platform-icon--tt { background: rgba(0, 242, 234, 0.1); }
.platform-icon--tt svg { fill: #00f2ea; }

.platform-icon--ig { background: rgba(225, 48, 108, 0.1); }
.platform-icon--ig svg { fill: #e1306c; }

.platform-icon--pod { background: rgba(94, 234, 212, 0.1); }
.platform-icon--pod svg { fill: var(--accent-teal); }

.platform-info {
    flex: 1;
    min-width: 0;
}

.platform-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.platform-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.platform-arrow {
    color: var(--text-muted);
    transition: transform var(--transition-base), color var(--transition-base);
    flex-shrink: 0;
}

.platform-card:hover .platform-arrow {
    transform: translateX(4px);
    color: var(--accent-purple-light);
}


/* --- 9. About / How It Works --- */
.section--about {
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.about-text p + p {
    margin-top: 16px;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius-lg);
    opacity: 0.85;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    grid-column: 1 / -1;
    margin-top: 20px;
}

.step-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    overflow: hidden;
}

.step-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.step-card .tilt-shine {
    display: none;
}

.step-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.step-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.step-number {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #c9a96e;
    -webkit-text-fill-color: #c9a96e;
    background: rgba(10, 6, 25, 0.8);
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #c9a96e;
    backdrop-filter: blur(8px);
    line-height: 1;
    flex-shrink: 0;
    text-shadow: 0 0 8px rgba(201, 169, 110, 0.4);
    padding-bottom: 3px;
}

.step-content {
    padding: 24px;
    text-align: center;
}

.step-content h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #c9a96e;
    -webkit-text-fill-color: #c9a96e;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.7;
}

.step-content a {
    color: var(--accent-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.step-content a:hover {
    color: var(--text-primary);
}


/* --- 10. Stats Bar --- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding: 48px 0;
    text-align: center;
}

.stat-item {
    padding: 24px 16px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}


/* --- 11. Topics Grid --- */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.topic-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    overflow: hidden;
}

.topic-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    transform: translateY(-4px);
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.topic-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.topic-card-content {
    padding: 16px 20px 20px;
    text-align: center;
}

.topic-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.topic-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}


/* --- 12. Articles / Blog Cards --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-top: 2px solid rgba(201, 169, 110, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.article-card .tilt-shine {
    display: none;
}

.article-header {
    padding: 32px 28px 0;
    flex: 1;
}

.article-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 12px;
    padding: 4px 10px;
    background: rgba(94, 234, 212, 0.08);
    border-radius: var(--radius-sm);
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #c9a96e;
    -webkit-text-fill-color: #c9a96e;
    line-height: 1.4;
}

.article-card h3 a {
    color: inherit;
    -webkit-text-fill-color: inherit;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

.article-footer {
    padding: 20px 28px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: #c9a96e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition-base);
}

.article-link:hover {
    gap: 8px;
    color: var(--text-primary);
}


/* --- 13. Products / Resources Grid --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    position: relative;
}

.product-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    transform: translateY(-4px);
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-gold);
    background: rgba(201, 169, 110, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(201, 169, 110, 0.2);
}

.product-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(124, 92, 191, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-price {
    display: block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-teal);
    margin-bottom: 12px;
}

.product-rating {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.product-rating .stars {
    color: var(--accent-gold);
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.product-card .btn {
    width: 100%;
    justify-content: center;
}


/* --- 14. Newsletter Signup --- */
.newsletter-section {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(124, 92, 191, 0.08) 0%, transparent 60%),
        var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.newsletter-content {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.newsletter-content h2 {
    margin-bottom: 12px;
}

.newsletter-content > p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-base);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.1);
}

.newsletter-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}


/* --- 15. Featured Video --- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
}

.video-container::before {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center, rgba(124, 92, 191, 0.1) 0%, transparent 70%),
        var(--bg-tertiary);
    cursor: pointer;
    transition: background var(--transition-base);
}

.video-placeholder:hover {
    background:
        radial-gradient(ellipse at center, rgba(124, 92, 191, 0.15) 0%, transparent 70%),
        var(--bg-card-hover);
}

.video-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-aurora);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 0 40px rgba(124, 92, 191, 0.4);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.video-placeholder:hover .video-play-btn {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(124, 92, 191, 0.5);
}

.video-play-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
    margin-left: 3px;
}

.video-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}


/* --- 16. Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-nav h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.footer-nav a:hover {
    color: var(--accent-purple-light);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    border-color: var(--glass-border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill var(--transition-base);
}

.footer-social a:hover svg {
    fill: var(--accent-purple-light);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-bottom a {
    color: var(--text-secondary);
}

.footer-bottom a:hover {
    color: var(--accent-purple-light);
}

.footer-legal {
    display: flex;
    gap: 24px;
}


/* --- 17. Lenis Smooth Scroll --- */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}


/* --- 18. Page Backgrounds --- */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.page-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(200, 200, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(200, 200, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(200, 200, 255, 0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, rgba(200, 200, 255, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(200, 200, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 85%, rgba(200, 200, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 75%, rgba(200, 200, 255, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 15%, rgba(200, 200, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 55%, rgba(200, 200, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 55% 35%, rgba(124, 92, 191, 0.2) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 75% 70%, rgba(94, 234, 212, 0.15) 0%, transparent 100%);
    background-color: var(--bg-primary);
    animation: drift 80s ease-in-out infinite alternate;
}

.page-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 40% 40%, rgba(124, 92, 191, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 65% 60%, rgba(74, 125, 189, 0.04) 0%, transparent 40%);
    animation: nebula 90s ease-in-out infinite alternate;
}

@keyframes drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

@keyframes nebula {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(2deg) scale(1.03); }
}

.page-bg .hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}


/* --- 19. Legal Pages --- */
.legal-page {
    padding: 120px 0 80px;
}

.legal-page .container {
    max-width: var(--container-text);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    transition: color var(--transition-base);
}

.legal-back:hover {
    color: var(--accent-purple-light);
}

.legal-page h1 {
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 40px;
}

.legal-page h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 36px 0 12px;
}

.legal-page p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.legal-page a {
    color: var(--accent-purple-light);
}


/* --- 20. Blog Page Specific --- */
.blog-hero {
    padding: 140px 0 60px;
    text-align: center;
}

.blog-hero h1 {
    margin-bottom: 16px;
}

.blog-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.blog-content {
    padding: 40px 0 100px;
}

.blog-article {
    max-width: var(--container-text);
    margin: 0 auto 80px;
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
}

.tips-section-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 20px;
    display: block;
}

.article-hero-img-wrap {
    max-width: var(--container-text);
    margin: 0 auto 32px;
    padding: 0 20px;
}

.article-hero-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

.blog-article h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #c9a96e;
    -webkit-text-fill-color: #c9a96e;
}

.blog-article h3 {
    font-size: 1.15rem;
    margin: 28px 0 10px;
    color: var(--text-primary);
}

.blog-article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.blog-article p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.blog-article ul, .blog-article ol {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.blog-article li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.blog-article li strong {
    color: var(--text-primary);
}

.blog-article strong {
    color: var(--text-primary);
}


/* --- Related Articles --- */
.related-articles {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--glass-border);
}

.related-articles h2 {
    font-size: 1.4rem;
    margin-bottom: 32px;
    color: var(--text-primary);
}


/* --- 21. Resources Page Specific --- */
.resource-category {
    margin-bottom: 64px;
}

.resource-category h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.affiliate-disclosure {
    max-width: var(--container-text);
    margin: 0 auto 48px;
    padding: 20px 24px;
    background: rgba(201, 169, 110, 0.05);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* --- Resources: Anchor Nav --- */
.resource-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 48px;
    max-width: var(--container-text);
}

.resource-anchor-nav a {
    padding: 8px 16px;
    background: rgba(10, 8, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.resource-anchor-nav a:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

/* --- Resources: Premium Badge --- */
.product-badge--premium {
    background: linear-gradient(135deg, #8b6914, #c9a96e) !important;
    color: #0a0a14 !important;
}

/* --- Resources: Tools Cross-Promo --- */
.resource-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-tool-card {
    display: block;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.resource-tool-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.resource-tool-card .tool-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.resource-tool-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.resource-tool-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Resources: Playlists --- */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.playlist-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.playlist-card:hover {
    border-color: #c9a96e;
    outline: 1px solid rgba(201, 169, 110, 0.3);
    outline-offset: 3px;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 12px rgba(201, 169, 110, 0.35)) drop-shadow(0 0 30px rgba(201, 169, 110, 0.15));
}

.playlist-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.playlist-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.playlist-info {
    padding: 20px 24px;
}

.playlist-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.playlist-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.playlist-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.playlist-count {
    font-size: 0.8rem;
    color: var(--accent-teal);
    font-weight: 500;
}

.playlist-link {
    font-size: 0.85rem;
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.playlist-link:hover {
    color: var(--accent-teal);
}

.playlists-cta {
    text-align: center;
    margin-top: 32px;
}

/* --- Homepage: Gallery Strip --- */
.gallery-section {
    padding-bottom: 48px;
}

.gallery-strip {
    overflow: hidden;
    width: 100%;
    margin-top: 24px;
}

.gallery-track {
    display: flex;
    justify-content: center;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.gallery-item img {
    display: block;
    width: 320px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* --- Homepage: Featured caption --- */
.featured-caption {
    text-align: center;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* --- Homepage: Section CTA --- */
.section-cta {
    text-align: center;
    margin-top: 48px;
}


/* --- 22. Responsive Design --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        max-width: 300px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        width: 260px;
        height: 146px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-glass-strong);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: block;
    }

    .hero-content {
        padding: 100px 20px 60px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .playlists-grid {
        grid-template-columns: 1fr;
    }

    .resource-tools-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .blog-article {
        padding: 28px 20px;
    }

    .section-header {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .topics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }

    .marquee-band {
        padding: 14px 0;
    }

    .marquee-text {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
        gap: 24px;
    }
}


/* ============================================
   PREMIUM INTERACTIONS
   ============================================ */

/* --- Custom Cursor --- */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.5) 0%, rgba(167, 139, 250, 0) 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    mix-blend-mode: screen;
    will-change: transform;
    opacity: 0;
}

.cursor-glow.visible {
    opacity: 1;
}

.cursor-glow.hovering {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.3) 0%, rgba(167, 139, 250, 0.1) 40%, transparent 70%);
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-lavender);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.15s ease;
}

.cursor-dot.visible {
    opacity: 1;
}

.cursor-dot.hovering {
    transform: translate(-50%, -50%) scale(0);
}

@media (hover: none), (max-width: 768px) {
    .cursor-glow, .cursor-dot { display: none !important; }
}


/* --- Marquee Text Band --- */
.marquee-band {
    overflow: hidden;
    padding: 20px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-primary);
    position: relative;
}

.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.marquee-text {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    color: rgba(201, 169, 110, 0.28);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    user-select: none;
}

.marquee-text span {
    flex-shrink: 0;
}

.marquee-separator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.3);
    flex-shrink: 0;
}


/* --- 3D Card Tilt --- */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-card .tilt-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(
        circle at var(--shine-x, 50%) var(--shine-y, 50%),
        rgba(167, 139, 250, 0.08) 0%,
        transparent 60%
    );
}

.tilt-card:hover .tilt-shine {
    opacity: 1;
}


/* --- Magnetic Button Effect --- */
.btn-magnetic {
    position: relative;
    overflow: visible;
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle, rgba(124, 92, 191, 0.15) 0%, transparent 70%);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.btn-magnetic:hover::before {
    opacity: 1;
}


/* --- Floating Decorations --- */
.float-decor {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
    will-change: transform;
}

.float-decor svg {
    width: 100%;
    height: 100%;
}

.float-decor--moon {
    width: 120px;
    height: 120px;
    right: 8%;
    top: 20%;
}

.float-decor--constellation {
    width: 180px;
    height: 180px;
    left: 5%;
    top: 60%;
}

.float-decor--orbit {
    width: 200px;
    height: 200px;
    right: 10%;
    bottom: 15%;
}


/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--gradient-aurora);
    z-index: 1001;
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
}


/* --- Enhanced Hero --- */
.hero-title {
    font-size: clamp(3.2rem, 8vw, 6rem) !important;
    letter-spacing: -0.02em;
    line-height: 1.05 !important;
}

.hero-tagline {
    font-size: clamp(1.2rem, 2.8vw, 1.7rem) !important;
}

.hero-description {
    font-size: clamp(1.05rem, 2vw, 1.2rem) !important;
    max-width: 540px !important;
}


/* --- Ambient Floating Decorations --- */
.ambient-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-shape {
    position: absolute;
    will-change: transform;
}

/* Crescent moons */
.ambient-moon--1 {
    width: 100px;
    height: 100px;
    top: 15%;
    right: 8%;
    animation: ambient-drift-1 45s ease-in-out infinite alternate, ambient-twinkle 8s ease-in-out infinite;
}

.ambient-moon--2 {
    width: 60px;
    height: 60px;
    top: 55%;
    left: 5%;
    animation: ambient-drift-2 55s ease-in-out infinite alternate, ambient-twinkle 12s ease-in-out infinite 3s;
}

.ambient-moon--3 {
    width: 130px;
    height: 130px;
    top: 78%;
    right: 15%;
    animation: ambient-drift-3 60s ease-in-out infinite alternate, ambient-twinkle 10s ease-in-out infinite 6s;
}

/* Star clusters */
.ambient-stars--1 {
    width: 200px;
    height: 200px;
    top: 30%;
    left: 3%;
    animation: ambient-drift-2 50s ease-in-out infinite alternate;
}

.ambient-stars--2 {
    width: 160px;
    height: 160px;
    top: 65%;
    right: 4%;
    animation: ambient-drift-1 40s ease-in-out infinite alternate-reverse;
}

/* Nebula orbs (CSS radial gradients) */
.ambient-nebula {
    border-radius: 50%;
}

.ambient-nebula--1 {
    width: 300px;
    height: 300px;
    top: 20%;
    left: -5%;
    background: radial-gradient(circle, rgba(124,92,191,0.06) 0%, rgba(124,92,191,0.02) 40%, transparent 70%);
    animation: ambient-drift-3 70s ease-in-out infinite alternate, ambient-pulse 15s ease-in-out infinite;
}

.ambient-nebula--2 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: -3%;
    background: radial-gradient(circle, rgba(94,234,212,0.04) 0%, rgba(74,125,189,0.02) 40%, transparent 70%);
    animation: ambient-drift-1 65s ease-in-out infinite alternate, ambient-pulse 18s ease-in-out infinite 5s;
}

.ambient-nebula--3 {
    width: 350px;
    height: 350px;
    top: 75%;
    left: 10%;
    background: radial-gradient(circle, rgba(125,180,232,0.05) 0%, rgba(124,92,191,0.02) 40%, transparent 70%);
    animation: ambient-drift-2 80s ease-in-out infinite alternate, ambient-pulse 20s ease-in-out infinite 10s;
}

/* Constellation lines */
.ambient-constellation--1 {
    width: 280px;
    height: 210px;
    top: 40%;
    right: 2%;
    animation: ambient-drift-1 55s ease-in-out infinite alternate;
    opacity: 0.7;
}

.ambient-constellation--2 {
    width: 240px;
    height: 160px;
    top: 85%;
    left: 8%;
    animation: ambient-drift-3 50s ease-in-out infinite alternate;
    opacity: 0.7;
}

/* Orbit rings */
.ambient-orbit--1 {
    width: 220px;
    height: 220px;
    top: 25%;
    left: 12%;
    animation: ambient-orbit-spin 90s linear infinite, ambient-twinkle 12s ease-in-out infinite;
}

.ambient-orbit--2 {
    width: 180px;
    height: 180px;
    top: 60%;
    right: 10%;
    animation: ambient-orbit-spin 120s linear infinite reverse, ambient-twinkle 15s ease-in-out infinite 4s;
}

/* Sparkle canvas */
.sparkle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Ambient animations */
@keyframes ambient-drift-1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -20px) rotate(2deg); }
    66% { transform: translate(-10px, 10px) rotate(-1deg); }
    100% { transform: translate(20px, -15px) rotate(3deg); }
}

@keyframes ambient-drift-2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, 15px) rotate(-2deg); }
    66% { transform: translate(10px, -10px) rotate(1.5deg); }
    100% { transform: translate(-15px, 20px) rotate(-3deg); }
}

@keyframes ambient-drift-3 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(12px, -18px); }
    100% { transform: translate(-8px, 12px); }
}

@keyframes ambient-twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes ambient-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes ambient-orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hide ambient layer on small screens for performance */
@media (max-width: 768px) {
    .ambient-layer {
        display: none;
    }
    .sparkle-canvas {
        display: none;
    }
}


/* On sub-pages with starfield, keep sections transparent for starfield visibility */
.page-bg ~ * .section {
    background-color: transparent;
}


/* --- 25. Episode Pages --- */
.episode-hero {
    padding: 140px 0 48px;
    text-align: center;
    position: relative;
}

.episode-hero .section-label {
    color: var(--accent-gold);
    border-color: rgba(201, 169, 110, 0.3);
}

.episode-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-heading);
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.episode-hero .episode-topic {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.episode-meta-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.episode-meta-bar span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.episode-category-badge {
    color: var(--accent-gold);
    border: 1px solid rgba(201, 169, 110, 0.3);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

/* Episode video preview card */
.episode-video-preview {
    max-width: var(--container-text);
    margin: 0 auto 40px;
    padding: 0 24px;
}

.episode-video-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: rgba(201, 169, 110, 0.04);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.episode-video-card:hover {
    border-color: rgba(201, 169, 110, 0.3);
    background: rgba(201, 169, 110, 0.07);
}

.episode-video-thumb {
    flex-shrink: 0;
    width: 140px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.episode-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-video-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.episode-video-info {
    flex: 1;
    min-width: 0;
}

.episode-video-info .label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.episode-video-info .title {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.episode-video-info .duration {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Episode table of contents */
.episode-toc {
    max-width: var(--container-text);
    margin: 0 auto 48px;
    padding: 0 24px;
}

.episode-toc-inner {
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.episode-toc h3 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.episode-toc ol {
    list-style: none;
    counter-reset: episode-toc;
    padding: 0;
    margin: 0;
}

.episode-toc li {
    counter-increment: episode-toc;
    padding: 6px 0;
}

.episode-toc li::before {
    content: counter(episode-toc, upper-roman) ".";
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 8px;
}

.episode-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.episode-toc a:hover {
    color: var(--accent-gold);
}

/* Episode body content */
.episode-body {
    max-width: var(--container-text);
    margin: 0 auto;
    padding: 0 24px 80px;
}

.episode-section {
    margin-bottom: 56px;
}

.episode-section h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.45rem;
    color: var(--accent-gold);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
}

.episode-section p {
    font-size: 1.02rem;
    line-height: 1.95;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.episode-section .section-intro {
    font-style: italic;
    color: var(--text-muted);
    border-left: 2px solid var(--accent-gold);
    padding-left: 16px;
    margin-bottom: 28px;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* Episode section images */
.episode-img {
    position: relative;
    margin: 40px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.episode-img img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.episode-img::before,
.episode-img::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1;
    pointer-events: none;
}

.episode-img::before {
    top: 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, transparent 100%);
}

.episode-img::after {
    bottom: 0;
    background: linear-gradient(0deg, var(--bg-primary) 0%, transparent 100%);
}

/* Episode prev/next navigation */
.episode-nav {
    margin: 56px 0 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 32px;
}

.episode-nav-links {
    display: flex;
    gap: 16px;
}

.episode-nav-link,
.episode-nav-spacer {
    flex: 1;
}

.episode-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.25s, background 0.25s;
}

.episode-nav-link:hover {
    border-color: rgba(201, 169, 110, 0.35);
    background: rgba(201, 169, 110, 0.04);
}

.episode-nav-next {
    text-align: right;
}

.episode-nav-dir {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    font-weight: 500;
}

.episode-nav-title {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-nav-browse {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 32px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color 0.25s, color 0.25s;
}

.episode-nav-browse:hover {
    border-color: rgba(201, 169, 110, 0.35);
    color: var(--accent-gold);
}

/* Related episodes */
.related-episodes {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--glass-border);
}

.related-episodes h2 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--accent-gold);
}

.related-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-episode-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.related-episode-card:hover {
    border-color: rgba(201, 169, 110, 0.25);
    transform: translateY(-2px);
}

.related-episode-thumb {
    flex-shrink: 0;
    width: 100px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.related-episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-episode-info h4 {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
}

.related-episode-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Episode index page - topic filter cards */
.episode-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 72px;
}

.episode-topic-card {
    padding: 28px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.episode-topic-card:hover {
    border-color: rgba(201, 169, 110, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(201, 169, 110, 0.08);
}

.episode-topic-card .topic-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    filter: grayscale(20%);
}

.episode-topic-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.episode-topic-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.episode-topic-card .topic-count {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    opacity: 0.7;
}

/* Episode index - category sections */
.episode-category-section {
    margin-bottom: 72px;
    scroll-margin-top: 100px;
}

.episode-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
}

.episode-category-header .cat-icon {
    font-size: 1.6rem;
    filter: grayscale(20%);
}

.episode-category-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin: 0;
}

.episode-category-header .count {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Episode index - card grid */
.episode-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.episode-index-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.episode-index-card:hover {
    border-color: rgba(201, 169, 110, 0.25);
    transform: translateY(-3px);
}

.episode-index-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.episode-index-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-index-thumb::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(10, 10, 20, 0.7));
    pointer-events: none;
}

.episode-index-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.episode-index-info h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 8px;
}

.episode-index-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}

@media (max-width: 600px) {
    .episode-video-card {
        flex-direction: column;
        text-align: center;
    }

    .episode-video-thumb {
        width: 100%;
        max-width: 280px;
    }

    .episode-topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 48px;
    }

    .episode-topic-card {
        padding: 20px 14px;
    }

    .episode-index-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .episode-index-info h3 {
        font-size: 0.88rem;
    }

    .related-episodes-grid {
        grid-template-columns: 1fr;
    }

    .episode-nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .episode-nav-next {
        text-align: left;
    }
}


/* ============================================
   26. Sleep Tools
   ============================================ */

/* --- Tools Hub Page --- */
.tools-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.tools-hub-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    text-decoration: none;
}

.tools-hub-card:hover {
    border-color: rgba(201, 169, 110, 0.25);
    box-shadow: 0 0 30px rgba(201, 169, 110, 0.12);
    transform: translateY(-4px);
}

.tools-hub-card .tool-icon {
    width: 56px;
    height: 56px;
    background: rgba(201, 169, 110, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.tools-hub-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.tools-hub-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.tools-hub-card .tool-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 0.02em;
}

.tools-category-section {
    margin-bottom: 56px;
}

.tools-category-section h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
}

/* --- Tool Page Layout --- */
.tool-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.tool-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.tool-breadcrumb a:hover {
    color: var(--accent-gold);
}

.tool-breadcrumb .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.tool-page-hero {
    padding: 140px 0 48px;
    text-align: center;
}

.tool-page-hero .section-label {
    color: var(--accent-gold);
    border-color: rgba(201, 169, 110, 0.3);
}

.tool-page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.tool-page-hero .tool-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.tool-page-hero .tool-anchor-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #c9a96e, #d4b87a, #c9a96e);
    color: #0a0a14;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.25);
}

.tool-page-hero .tool-anchor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 169, 110, 0.35);
}

/* --- Interactive Tool Section --- */
.tool-interactive-section {
    max-width: 640px;
    margin: 0 auto 64px;
    padding: 0 24px;
}

/* --- Shared Tool Components --- */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 48px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(201, 169, 110, 0.4), transparent),
        radial-gradient(1px 1px at 28% 68%, rgba(255, 255, 255, 0.18), transparent),
        radial-gradient(1px 1px at 48% 22%, rgba(201, 169, 110, 0.3), transparent),
        radial-gradient(1px 1px at 65% 78%, rgba(255, 255, 255, 0.14), transparent),
        radial-gradient(1px 1px at 82% 42%, rgba(201, 169, 110, 0.25), transparent),
        radial-gradient(1px 1px at 18% 88%, rgba(255, 255, 255, 0.16), transparent),
        radial-gradient(1px 1px at 92% 12%, rgba(201, 169, 110, 0.35), transparent),
        radial-gradient(1px 1px at 38% 45%, rgba(255, 255, 255, 0.12), transparent),
        radial-gradient(1px 1px at 72% 8%, rgba(201, 169, 110, 0.2), transparent),
        radial-gradient(1px 1px at 55% 92%, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0.6;
    pointer-events: none;
}

.tool-card:hover {
    border-color: rgba(201, 169, 110, 0.25);
    box-shadow: 0 0 30px rgba(201, 169, 110, 0.12);
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: rgba(201, 169, 110, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.tool-card h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-heading);
}

.tool-card > p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-group input[type="time"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="text"],
.form-group select {
    background: rgba(10, 8, 30, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    background: linear-gradient(135deg, #c9a96e, #d4b87a, #c9a96e);
    color: #0a0a14;
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.25);
    margin-top: 8px;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 169, 110, 0.35);
}

.tool-result {
    margin-top: 24px;
    padding: 24px;
    background: rgba(201, 169, 110, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: var(--radius-md);
    display: none;
}

.tool-result.visible {
    display: block;
    animation: fadeInResult 0.6s cubic-bezier(0.16, 1, 0.3, 1), resultGlow 2s ease-in-out;
}

@keyframes fadeInResult {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes resultGlow {
    0% { box-shadow: 0 0 0 rgba(201, 169, 110, 0); }
    40% { box-shadow: 0 0 30px rgba(201, 169, 110, 0.15), 0 0 60px rgba(201, 169, 110, 0.05); }
    100% { box-shadow: none; }
}

.tool-result h3 {
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-weight: 600;
}

/* --- Sleep Cycle Calculator Results --- */
.result-times {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.result-time {
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.result-time .time-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-heading);
    display: block;
}

.result-time .time-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.result-time.recommended {
    border-color: var(--accent-gold);
    background: rgba(201, 169, 110, 0.12);
}

.result-time.recommended .time-label {
    color: var(--accent-gold);
}

.result-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.result-note a {
    color: var(--accent-gold);
}

/* --- Chronotype Quiz --- */
.quiz-question {
    display: none;
}

.quiz-question.active,
.quiz-question--active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quiz-question--entering {
    display: block;
    opacity: 0;
    transform: translateY(12px);
}

.quiz-question--exiting {
    display: block;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quiz-option--selected {
    border-color: var(--accent-gold) !important;
    background: rgba(201, 169, 110, 0.15) !important;
    color: var(--accent-gold) !important;
}

.quiz-question p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.quiz-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.quiz-progress-dot {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(201, 169, 110, 0.15);
    transition: background var(--transition-fast);
}

.quiz-progress-dot.filled {
    background: var(--accent-gold);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

.quiz-option:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
    background: rgba(201, 169, 110, 0.08);
}

.chronotype-result {
    text-align: center;
}

.chronotype-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.chronotype-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.chronotype-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto 16px;
}

.chronotype-times {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.chronotype-times div {
    text-align: center;
}

.chronotype-times .ct-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chronotype-times .ct-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.chrono-tips {
    margin-top: 24px;
    text-align: left;
}

.chrono-tips h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.chrono-tips ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chrono-tips li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}

.chrono-tips li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
}

.chrono-episode {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(201, 169, 110, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
}

.chrono-episode span {
    color: var(--text-muted);
}

.chrono-episode a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
}

.chrono-episode a:hover {
    text-decoration: underline;
}

.quiz-restart {
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-restart:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

/* --- Sleep Debt Calculator --- */
.debt-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.debt-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.debt-day label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.debt-day input {
    width: 100%;
    text-align: center;
    background: rgba(10, 8, 30, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.debt-day input::-webkit-outer-spin-button,
.debt-day input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.debt-day input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.debt-meter {
    margin: 16px 0;
}

.debt-bar-bg {
    height: 8px;
    background: rgba(201, 169, 110, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.debt-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--accent-gold);
}

.debt-bar-fill.warning {
    background: #e8a84d;
}

.debt-bar-fill.danger {
    background: #e85d75;
}

.debt-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.debt-stat {
    text-align: center;
}

.debt-stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-heading);
}

.debt-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.debt-chart-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.debt-chart-container canvas {
    max-width: 100%;
    height: auto;
}

.debt-recovery {
    margin-top: 16px;
}

.debt-recovery h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.debt-recovery p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.debt-history-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(10, 8, 30, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(201, 169, 110, 0.08);
}

.debt-trend-better strong {
    color: var(--accent-gold);
}

.debt-trend-worse strong {
    color: #e85d75;
}

.debt-target-note {
    display: block;
    font-size: 0.78rem;
    color: #e8a84d;
    margin-top: 6px;
    line-height: 1.4;
}

.debt-target-note a {
    color: var(--accent-gold);
}

/* --- Caffeine Half-Life Counter --- */
.caffeine-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.caffeine-preset {
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.caffeine-preset:hover,
.caffeine-preset.active {
    border-color: var(--accent-gold);
    color: var(--text-primary);
    background: rgba(201, 169, 110, 0.08);
}

.caffeine-timeline {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    margin: 16px 0 8px;
    padding: 0 4px;
}

.caffeine-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    min-height: 2px;
}

.caffeine-bar.high { background: var(--accent-gold); }
.caffeine-bar.medium { background: rgba(201, 169, 110, 0.65); }
.caffeine-bar.low { background: rgba(201, 169, 110, 0.5); }
.caffeine-bar.clear { background: rgba(201, 169, 110, 0.2); }

.caffeine-time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.caffeine-threshold {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(201, 169, 110, 0.06);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-gold);
}

.caffeine-threshold strong {
    color: var(--accent-gold);
}

/* --- Tool Navigation (hub page) --- */
.tools-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.tools-nav a {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tools-nav a:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

/* --- Nap Calculator --- */
.nap-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.nap-type-btn {
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.nap-type-btn:hover,
.nap-type-btn.active {
    border-color: var(--accent-gold);
    color: var(--text-primary);
    background: rgba(201, 169, 110, 0.08);
}

.nap-type-btn .nap-duration {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.nap-result-card {
    text-align: center;
    padding: 20px;
}

.nap-result-card .nap-window {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.nap-result-card .nap-latest {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

/* --- Sleep By Age Calculator --- */
.age-result-bar {
    position: relative;
    height: 24px;
    background: rgba(201, 169, 110, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0 8px;
}

.age-result-bar .age-bar-fill {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #c9a96e, #d4b87a, #c9a96e);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.age-range-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.85rem;
}

.age-range-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-bottom: 1px solid var(--glass-border);
}

.age-range-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(201, 169, 110, 0.06);
}

.age-range-table tr.current-age {
    background: rgba(201, 169, 110, 0.06);
}

.age-range-table tr.current-age td {
    color: var(--text-heading);
    font-weight: 500;
}

/* --- Sleep Environment Score --- */
.env-category {
    margin-bottom: 20px;
}

.env-category h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

.env-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.env-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.env-check-item:hover {
    background: rgba(201, 169, 110, 0.04);
}

.env-check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
    flex-shrink: 0;
}

.env-check-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.env-radar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.env-radar-container canvas {
    max-width: 280px;
    max-height: 280px;
}

.env-download-btn {
    background: transparent;
    border: 1px solid rgba(201, 169, 110, 0.3);
    color: var(--accent-gold);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.env-download-btn:hover {
    background: rgba(201, 169, 110, 0.1);
    border-color: var(--accent-gold);
}

.env-score-display {
    text-align: center;
    margin-bottom: 16px;
}

.env-score-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c9a96e, #e8d5a8, #c9a96e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.env-score-grade {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.env-tips {
    margin-top: 16px;
}

.env-tips h4 {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.env-tips ul {
    list-style: none;
    padding: 0;
}

.env-tips li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
}

.env-tips li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-gold);
}

/* --- Sleep IQ Quiz --- */
.siq-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.siq-question-card {
    padding: 24px;
    background: rgba(10, 8, 30, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.siq-question-card p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.siq-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.siq-option {
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

.siq-option:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
    background: rgba(201, 169, 110, 0.08);
}

.siq-option.selected {
    border-color: var(--accent-gold);
    background: rgba(201, 169, 110, 0.08);
    color: var(--text-primary);
}

.siq-option.correct {
    border-color: var(--accent-gold);
    background: rgba(201, 169, 110, 0.12);
}

.siq-option.incorrect {
    border-color: #e85d75;
    background: rgba(232, 93, 117, 0.08);
}

.siq-score-display {
    text-align: center;
    padding: 24px;
}

.siq-score-value {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c9a96e, #e8d5a8, #c9a96e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.siq-score-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.siq-score-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-heading);
    margin: 12px 0 8px;
}

/* --- Dream Journal --- */
.journal-mood-select {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.journal-mood-btn {
    padding: 8px 14px;
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.journal-mood-btn:hover,
.journal-mood-btn.active {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.journal-download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.journal-download-card {
    padding: 24px;
    background: rgba(10, 8, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.journal-download-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.journal-download-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.journal-file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.journal-download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-gold);
    color: #0a0a14;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.journal-download-btn:hover {
    opacity: 0.85;
}

.journal-quick-entry {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.journal-quick-entry textarea {
    background: rgba(10, 8, 30, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: border-color var(--transition-fast);
}

.journal-quick-entry textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.journal-print-template {
    display: none;
}

.tool-card--full {
    max-width: 100%;
}

/* Dream Journal Print Styles */
@media print {
    .journal-print-template {
        display: block !important;
    }

    body * {
        visibility: hidden;
    }

    .journal-print-template,
    .journal-print-template * {
        visibility: visible;
    }

    .journal-print-template {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        color: #222;
        font-family: Georgia, serif;
        padding: 40px;
    }

    .journal-print-template h2 {
        font-size: 1.4rem;
        margin-bottom: 24px;
        color: #333;
        border-bottom: 2px solid #666;
        padding-bottom: 8px;
    }

    .print-entry-block {
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid #ccc;
    }

    .print-entry-block .date {
        font-size: 0.85rem;
        color: #666;
        margin-bottom: 8px;
    }

    .print-entry-block .content {
        font-size: 1rem;
        line-height: 1.8;
        color: #333;
    }

    .print-entry-block .mood {
        font-size: 0.85rem;
        color: #666;
        font-style: italic;
        margin-top: 8px;
    }

    .print-footer {
        margin-top: 40px;
        font-size: 0.8rem;
        color: #999;
        text-align: center;
    }
}

/* --- Colour Noise Generator --- */
.noise-demo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.noise-demo-btn {
    padding: 8px 16px;
    background: rgba(201, 169, 110, 0.12);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.noise-demo-btn:hover {
    background: rgba(201, 169, 110, 0.2);
}

.noise-demo-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.noise-demo-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.noise-channels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.noise-channel {
    padding: 20px;
    background: rgba(10, 8, 30, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.noise-channel.active {
    border-color: var(--accent-gold);
}

.noise-channel--white.active { border-color: #c8c8c8; }
.noise-channel--pink.active  { border-color: #d4829a; }
.noise-channel--brown.active { border-color: #c9a96e; }

.noise-channel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.noise-channel-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.noise-icon--white { background: linear-gradient(135deg, #d0d0d0, #f0f0f0); }
.noise-icon--pink  { background: linear-gradient(135deg, #c06080, #e8a0b8); }
.noise-icon--brown { background: linear-gradient(135deg, #8b6914, #c9a96e); }

.noise-channel-info {
    flex: 1;
    min-width: 0;
}

.noise-channel-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

.noise-channel-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.noise-mute-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.noise-mute-btn:hover {
    border-color: var(--text-secondary);
}

.noise-mute-btn.muted {
    opacity: 0.4;
}

.noise-channel-vol {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.noise-channel input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(201, 169, 110, 0.15);
    border-radius: 2px;
    outline: none;
}

.noise-channel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.noise-channel input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.noise-channel--white input[type="range"]::-webkit-slider-thumb { background: #c8c8c8; }
.noise-channel--pink input[type="range"]::-webkit-slider-thumb  { background: #d4829a; }
.noise-channel--brown input[type="range"]::-webkit-slider-thumb { background: #c9a96e; }
.noise-channel--white input[type="range"]::-moz-range-thumb { background: #c8c8c8; }
.noise-channel--pink input[type="range"]::-moz-range-thumb  { background: #d4829a; }
.noise-channel--brown input[type="range"]::-moz-range-thumb { background: #c9a96e; }

.noise-master {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(10, 8, 30, 0.3);
    border-radius: var(--radius-sm);
}

.noise-master label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.noise-master input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(201, 169, 110, 0.15);
    border-radius: 2px;
    outline: none;
}

.noise-master input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.noise-master input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

#noise-master-val {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: right;
}

.noise-cta-card {
    text-align: center;
    padding: 24px;
}

.noise-cta-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.noise-cta-link {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.noise-cta-link:hover {
    text-decoration: underline;
}

.noise-controls {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.noise-control-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.noise-control-btn:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.noise-control-btn.playing {
    background: var(--gradient-aurora);
    color: #0a0a14;
    border-color: transparent;
    font-weight: 600;
}

.noise-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.noise-timer label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.noise-timer select {
    background: rgba(10, 8, 30, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.noise-timer-display {
    font-size: 0.8rem;
    color: var(--accent-gold);
    display: none;
}

.noise-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.noise-preset-btn {
    padding: 8px 14px;
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.noise-preset-btn:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

/* --- Tool Page: Educational Content --- */
.tool-education {
    max-width: var(--container-narrow);
    margin: 0 auto 64px;
    padding: 0 24px;
}

.tool-education h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #c9a96e;
    -webkit-text-fill-color: #c9a96e;
    margin-bottom: 16px;
}

.tool-education h3 {
    color: #c9a96e;
    -webkit-text-fill-color: #c9a96e;
    margin-bottom: 8px;
}

.tool-education p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.tool-education ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.tool-education li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* --- Tool Page: Product Recommendations --- */
.tool-products {
    max-width: var(--container-text);
    margin: 0 auto 64px;
    padding: 0 24px;
}

.tool-products h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 24px;
    text-align: center;
}

.tool-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tool-product-card {
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    text-align: center;
}

.tool-product-card:hover {
    border-color: rgba(201, 169, 110, 0.25);
    transform: translateY(-2px);
}

.tool-product-card h4 {
    font-size: 0.95rem;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.tool-product-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.tool-product-card .product-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-gold);
}

/* --- Tool Page: Related Tools --- */
.related-tools {
    max-width: var(--container-text);
    margin: 0 auto 64px;
    padding: 0 24px;
}

.related-tools h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 24px;
    text-align: center;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    text-align: center;
}

.related-tool-card:hover {
    border-color: rgba(201, 169, 110, 0.25);
    transform: translateY(-3px);
}

.related-tool-card .tool-icon {
    margin-bottom: 12px;
}

.related-tool-card h4 {
    font-size: 0.9rem;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.related-tool-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Tool Page: Share Button --- */
.tool-share-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.tool-share-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tool-share-btn:hover {
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

/* --- Tool JS Utility Classes (replacing inline styles) --- */

/* Hub page category description */
.tools-category-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Nap calculator result states */
.nap-unavailable-title {
    color: var(--accent-gold);
    font-size: 1rem;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.nap-unavailable-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nap-type-indicator {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.nap-info-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 12px;
}

.nap-info-item {
    text-align: center;
}

.nap-info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nap-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
}

/* Caffeine calculator footnote */
.caffeine-footnote {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sleep by age result display */
.age-summary-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.age-rec-highlight {
    color: var(--text-heading);
    font-weight: 600;
}

.age-result-summary {
    text-align: center;
    margin-bottom: 16px;
}

.age-bar-labels {
    position: relative;
    height: 20px;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.age-label-start {
    position: absolute;
    left: 0;
}

.age-label-end {
    position: absolute;
    right: 0;
}

.age-label-marker {
    position: absolute;
    transform: translateX(-50%);
    color: var(--accent-gold);
    font-weight: 500;
}

.age-status-text {
    font-size: 0.85rem;
}

.age-status-optimal {
    color: var(--accent-gold);
    font-weight: 600;
}

.age-status-deficit {
    color: #e8a84d;
    font-weight: 600;
}

.age-status-excess {
    color: var(--accent-gold);
    font-weight: 600;
    opacity: 0.8;
}

/* Sleep IQ quiz result components */
.siq-option--disabled {
    pointer-events: none;
}

.siq-explanation {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(201, 169, 110, 0.06);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-gold);
}

.siq-share-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 16px 0;
}

.siq-share-actions {
    text-align: center;
    margin-top: 16px;
}

/* Quiz result card (screenshot-friendly) */
.siq-result-card {
    background: rgba(10, 8, 30, 0.6);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
}

.siq-result-brand {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: rgba(201, 169, 110, 0.5);
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.siq-result-url {
    font-size: 0.75rem;
    color: rgba(201, 169, 110, 0.4);
    margin-top: 12px;
}

/* Quiz wrong-answer review */
.siq-review {
    margin-top: 24px;
    text-align: left;
}

.siq-review h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-heading);
    margin-bottom: 16px;
}

.siq-review-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.siq-review-item {
    background: rgba(10, 8, 30, 0.4);
    border: 1px solid rgba(201, 169, 110, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.siq-review-q {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.siq-review-wrong {
    font-size: 0.85rem;
    color: #e85d75;
    margin-bottom: 4px;
}

.siq-review-correct {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.siq-review-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent-gold);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.siq-review-link:hover {
    opacity: 1;
    text-decoration: underline;
}


/* Environment score perfect state */
.env-perfect-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Result note variant with top margin */
.result-note--mt {
    margin-top: 16px;
}

/* Chronotype result article link */
.chronotype-article-link {
    margin-top: 16px;
}


/* --- Tools Responsive --- */
@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tool-card {
        padding: 28px 20px;
    }

    .debt-days {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }

    .debt-day label {
        font-size: 0.6rem;
    }

    .debt-day input {
        padding: 8px 2px;
        font-size: 0.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .caffeine-presets {
        grid-template-columns: 1fr 1fr;
    }

    .result-times {
        flex-direction: column;
    }

    .chronotype-times {
        flex-direction: column;
        gap: 12px;
    }

    .nap-types {
        grid-template-columns: 1fr;
    }

    .noise-master {
        flex-wrap: wrap;
    }

    .tools-hub-grid {
        grid-template-columns: 1fr;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}
