/* =================================== */
/* 1. Styles for New Content Pages    */
/* =================================== */

body.content-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(39, 84, 191, 0.28), transparent 42%),
        radial-gradient(circle at 85% 10%, rgba(16, 185, 129, 0.18), transparent 38%),
        #071021;
    color: #e8eefc;
    line-height: 1.6;
}

.header {
    background: rgba(6, 14, 30, 0.86);
    backdrop-filter: blur(8px);
    padding: 15px 30px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #f8fbff;
    text-decoration: none;
}

.nav a {
    color: #c9d5f0;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover, .nav a.active {
    color: #7cc8ff;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #f5f9ff;
}

.content {
    background: rgba(10, 20, 38, 0.9);
    padding: 30px;
    border-radius: 14px;
    border: 1px solid rgba(124, 200, 255, 0.18);
    box-shadow: 0 18px 48px rgba(0,0,0,0.35);
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: rgba(6, 14, 30, 0.9);
    color: #d8e7ff;
}

.footer p { margin: 0; }
.footer a { color: #9fd8ff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Blog List & Article Styles */
.blog-post-item { margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(148, 163, 184, 0.22); }
.blog-post-item h3 a { color: #e8f3ff; text-decoration: none; font-size: 1.8em; }
.blog-post-item h3 a:hover { color: #7cc8ff; }
.blog-post-item p { color: #c7d3ea; }
.read-more { display: inline-block; color: #7cc8ff; text-decoration: none; font-weight: bold; }
.article-meta { font-size: 0.9em; color: #9fb2d6; margin-bottom: 20px; }

/* Article FAQ */
.article-faq details { margin-bottom: 12px; }
.article-faq summary { cursor: pointer; font-weight: 600; color: #e8f3ff; padding: 8px 0; }
.article-faq details p { color: #c7d3ea; margin-top: 6px; }

/* Article References */
.article-references ul { list-style: none; padding: 0; }
.article-references li { margin-bottom: 8px; }
.article-references a { color: #7cc8ff; text-decoration: none; }
.article-references a:hover { text-decoration: underline; }

/* Related Articles */
.related-articles ul { list-style: none; padding: 0; }
.related-articles li { margin-bottom: 6px; }
.related-articles a { color: #7cc8ff; text-decoration: none; }
.related-articles a:hover { text-decoration: underline; }

/* Author Card */
.author-card {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border: 1px solid rgba(124, 200, 255, 0.12);
}
.author-card strong { color: #f5f9ff; font-size: 1.1em; }
.author-card p { color: #c7d3ea; margin-top: 6px; }


/* =================================== */
/* 2. Styles for Original index.html  */
/* =================================== */

html, body { margin:0; padding:0; }

body.tool-page {
    width:100%;
    min-height:100vh;
    font-family: "Inter","Helvetica Neue",Arial,sans-serif;
    background: #071021;
    color:white;
    overflow-x:hidden;
    overflow-y:auto;
    scroll-behavior:smooth;
}
canvas#bg { position:fixed; top:0; left:0; width:100%; height:100%; z-index:0; pointer-events:none; }
.theme-switcher { display:flex; gap:8px; }
.theme-btn { background: rgba(255,255,255,0.08); border:none; padding:8px 12px; border-radius:999px; color:white; cursor:pointer; font-size:13px; transition:0.2s; }
.theme-btn.active { background: rgba(255,255,255,0.12); box-shadow:0 6px 20px rgba(0,128,255,0.2);}
.theme-btn:hover { transform: translateY(-2px); }
.center-wrap { display:flex; flex-direction:column; align-items:center; text-align:center; }
.circle { width:180px; height:180px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:600; letter-spacing:0.6px; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.25), rgba(255,255,255,0.05)); box-shadow:0 12px 40px rgba(0,0,0,0.6); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 0%,100%{transform:scale(1);}50%{transform:scale(1.7);} }
.label { margin-top:12px; font-size:14px; color: rgba(255,255,255,0.88); }
.preset-timers { display: flex; gap: 8px; margin-top: 24px; align-items: center; }
.preset-btn { background: rgba(255,255,255,0.08); border:none; padding:6px 10px; border-radius: 6px; color:white; cursor:pointer; font-size:13px; transition:0.2s; }
.preset-btn:hover { background: rgba(255,255,255,0.12); }
.preset-btn.active { background: rgba(255,255,255,0.15); }
#customTimeInput { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; width: 50px; padding: 5px 8px; border-radius: 6px; text-align: center; font-size: 13px; margin-left: 4px; }
#customTimeInput::-webkit-outer-spin-button, #customTimeInput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#customTimeInput[type=number] { -moz-appearance: textfield; }
.timer-container { margin-top:12px; display:flex; gap:6px; align-items:center; position: relative; z-index: 1; }
.timer-display { font-size:22px; font-weight:600; background: rgba(255,255,255,0.05); padding:8px 16px; border-radius:8px; min-width:120px; text-align:center; user-select:none; }
.timer-btn { padding:8px 14px; border-radius:6px; border:none; background: rgba(255,255,255,0.08); color:white; cursor:pointer; transition:0.2s; }
.timer-btn:hover { background: rgba(255,255,255,0.12); }
#audioToggle { background: rgba(255,255,255,0.08); border:none; padding:8px 12px; border-radius:999px; color:white; cursor:pointer; font-size:13px; transition:0.2s; }
#audioToggle:hover { background: rgba(255,255,255,0.12); }

/* New Navigation Menu for Tool Page */
.tool-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    gap: 15px;
}
.tool-nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}
.tool-nav a:hover {
    color: #fff;
}

.home-longform { position: relative; z-index: 15; max-width: 920px; margin: 60px auto 80px; padding: 0 20px; }

.home-longform .content { background: rgba(255,255,255,0.95); color: #1e293b; }
.home-longform a { color: #0b63ce; }
.home-longform h1, .home-longform h2, .home-longform h3 { color: #071021; }


/* Readability and UX improvements */
.content-page .content {
    border: 1px solid rgba(124, 200, 255, 0.2);
}
.content-page .content p,
.content-page .content li {
    font-size: 1.04rem;
    color: #d7e4fb;
}
.content-page .content h1,
.content-page .content h2,
.content-page .content h3 {
    line-height: 1.35;
}
.content-page .content figure {
    margin: 0 0 22px;
}
.content-page .content figcaption {
    font-size: 0.92rem;
    color: #adc0e0;
    margin-top: 8px;
}

.content-page .content a {
    color: #7cc8ff;
}

/* Homepage polish */
.center-wrap {
    padding: 10px 10px 8px;
    border-radius: 12px;
}
.tool-nav {
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
.home-longform {
    margin: 60px auto 80px;
}
.home-longform .content {
    border: 1px solid rgba(11, 99, 206, 0.14);
    box-shadow: 0 14px 38px rgba(10, 20, 35, 0.24);
}
.home-longform h2 {
    margin-top: 30px;
}

@media (max-width: 900px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
    }
    .nav a {
        margin-left: 0;
    }
    .tool-nav {
        width: calc(100% - 24px);
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 14px;
        bottom: 10px;
    }
    .theme-switcher {
        max-width: calc(100% - 24px);
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .center-wrap {
        width: calc(100% - 24px);
    }
    .circle {
        width: 150px;
        height: 150px;
    }
    .home-longform {
        margin-top: 40px;
        margin-bottom: 60px;
    }
}

.home-longform .quick-start {
    margin: 22px 0 12px;
    padding: 18px 18px 10px;
    background: #f3f8ff;
    border: 1px solid #d7e7ff;
    border-radius: 12px;
}
.home-longform .quick-start h2 {
    margin-top: 0;
}

/* =================================== */
/* 3. Side-by-Side Homepage Layout     */
/* =================================== */

.tool-split {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    z-index: 5;
}

.tool-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
    padding: 20px 10px;
}

.tool-panel-divider {
    width: 1px;
    background: rgba(255,255,255,0.1);
    align-self: stretch;
}

.panel-title {
    font-size: 1.1em;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* =================================== */
/* 4. Breathing Tool Styles            */
/* =================================== */

.breathing-circle-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 12px;
}

.breathing-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(100,220,180,0.3), rgba(100,220,180,0.05));
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: white;
    transition: transform 0.3s ease;
}

.breathing-circle.phase-inhale {
    animation: breatheIn var(--inhale-duration, 4s) ease-in-out forwards;
}
.breathing-circle.phase-hold {
    transform: scale(var(--hold-scale, 1.5));
}
.breathing-circle.phase-exhale {
    animation: breatheOut var(--exhale-duration, 4s) ease-in-out forwards;
}
.breathing-circle.phase-hold2 {
    transform: scale(1);
}

@keyframes breatheIn {
    from { transform: scale(1); }
    to   { transform: scale(1.5); }
}
@keyframes breatheOut {
    from { transform: scale(1.5); }
    to   { transform: scale(1); }
}

.breathing-progress-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
}

.breathing-progress-ring circle {
    fill: none;
    stroke-width: 3;
}
.breathing-progress-ring .ring-bg {
    stroke: rgba(255,255,255,0.08);
}
.breathing-progress-ring .ring-fg {
    stroke: rgba(100,220,180,0.6);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.breathing-prompt {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
    min-height: 20px;
}

.breathing-modes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.breathing-mode-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 5px 9px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}
.breathing-mode-btn:hover { background: rgba(255,255,255,0.12); }
.breathing-mode-btn.active { background: rgba(100,220,180,0.2); box-shadow: 0 4px 14px rgba(100,220,180,0.15); }

.breathing-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.breathing-btn {
    padding: 7px 12px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}
.breathing-btn:hover { background: rgba(255,255,255,0.12); }

.breathing-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.breathing-duration-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.breathing-duration-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 5px 9px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}
.breathing-duration-btn:hover { background: rgba(255,255,255,0.12); }
.breathing-duration-btn.active { background: rgba(255,255,255,0.15); }

/* White noise panel adjustments for split layout */
.tool-panel .circle {
    width: 150px;
    height: 150px;
}
.tool-panel .theme-switcher-inline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}
.tool-panel .preset-timers {
    margin-top: 10px;
}

/* Mobile: always side-by-side, compact */
@media (max-width: 900px) {
    .tool-split {
        height: 100vh;
    }
    .panel-title {
        font-size: 0.9em;
    }
    .tool-panel .circle,
    .breathing-circle-wrap {
        width: 100px;
        height: 100px;
    }
    .breathing-circle {
        font-size: 11px;
    }
    .breathing-mode-btn,
    .breathing-duration-btn {
        font-size: 10px;
        padding: 4px 6px;
    }
    .breathing-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
    .breathing-stats {
        font-size: 10px;
    }
    .tool-panel {
        padding: 10px 5px;
    }
    .theme-btn {
        font-size: 10px;
        padding: 4px 6px;
    }
    .preset-btn {
        font-size: 10px;
        padding: 4px 6px;
    }
    .timer-display {
        font-size: 16px;
        padding: 5px 10px;
        min-width: 80px;
    }
    .timer-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
    #customTimeInput {
        width: 36px;
        font-size: 11px;
    }
    .home-longform {
        margin-top: 40px;
    }
}

/* =================================== */
/* 5. RTL Support (Arabic)             */
/* =================================== */

[dir="rtl"] .header {
    flex-direction: row-reverse;
}
[dir="rtl"] .nav a {
    margin-left: 0;
    margin-right: 20px;
}
[dir="rtl"] .content {
    text-align: right;
}
[dir="rtl"] .tool-split {
    flex-direction: row-reverse;
}
[dir="rtl"] .breathing-stats {
    direction: ltr;
}
[dir="rtl"] .footer {
    text-align: center;
}

/* =================================== */
/* 6. Language Switcher                */
/* =================================== */

.lang-switcher {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #e8eefc;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.lang-switcher option {
    background: #071021;
    color: #e8eefc;
}

/* =================================== */
/* 7. Noise Mixer Styles               */
/* =================================== */

.mixer-panel {
    max-width: 600px;
    margin: 0 auto;
}
.mixer-layer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mixer-layer label {
    min-width: 100px;
    font-size: 14px;
}
.mixer-layer input[type="range"] {
    flex: 1;
    accent-color: #7cc8ff;
}
.mixer-toggle {
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    min-width: 40px;
}
.mixer-toggle.active {
    background: rgba(124,200,255,0.2);
    color: #7cc8ff;
}

/* =================================== */
/* 8. Blog Subtitle                    */
/* =================================== */

.blog-subtitle {
    color: #9fb2d6;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* =================================== */
/* 9. Homepage 4-Grid Layout           */
/* =================================== */

.homepage-hero {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 12vh 20px 0;
}
.homepage-title {
    font-size: 2.8em;
    font-weight: 700;
    color: #f8fbff;
    margin: 0 0 8px;
    letter-spacing: 1px;
}
.homepage-subtitle {
    font-size: 1.15em;
    color: rgba(201, 213, 240, 0.85);
    margin: 0;
}

.homepage-grid {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 820px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.grid-card {
    background: rgba(10, 20, 38, 0.72);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 200, 255, 0.15);
    border-radius: 18px;
    padding: 36px 28px;
    text-decoration: none;
    color: white;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.grid-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 128, 255, 0.18);
    border-color: rgba(124, 200, 255, 0.35);
}
.grid-card__icon {
    margin-bottom: 16px;
}
.grid-card__title {
    font-size: 1.25em;
    font-weight: 600;
    margin: 0 0 8px;
    color: #f0f6ff;
}
.grid-card__desc {
    font-size: 0.92em;
    color: rgba(201, 213, 240, 0.75);
    margin: 0;
    line-height: 1.5;
}

.grid-card--mixer:hover { border-color: rgba(124, 200, 255, 0.4); }
.grid-card--breathing:hover { border-color: rgba(100, 220, 180, 0.4); }
.grid-card--binaural:hover { border-color: rgba(167, 139, 250, 0.4); }
.grid-card--journal:hover { border-color: rgba(251, 191, 36, 0.4); }

@media (max-width: 900px) {
    .homepage-hero { padding-top: 8vh; }
    .homepage-title { font-size: 2em; }
    .homepage-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
    .grid-card { padding: 24px 20px; }
}

/* =================================== */
/* 10. Tool Page Full Layout            */
/* =================================== */

.tool-full {
    position: relative;
    z-index: 5;
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-section {
    width: 100%;
    background: rgba(10, 20, 38, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(124, 200, 255, 0.12);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.tool-section-title {
    font-size: 1em;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin: 0 0 16px;
    letter-spacing: 0.3px;
}

/* =================================== */
/* 11. Equalizer Styles                */
/* =================================== */

.eq-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.eq-band input[type="range"] {
    writing-mode: vertical-lr;
    direction: rtl;
    height: 100px;
    accent-color: #7cc8ff;
    cursor: pointer;
}

.eq-band .eq-label {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.eq-band .eq-value {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    min-width: 32px;
    text-align: center;
}

/* =================================== */
/* 12. Fade Controls                   */
/* =================================== */

.fade-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.fade-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fade-group label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.fade-group input[type="number"] {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 50px;
    padding: 5px 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
}

.fade-toggle {
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}
.fade-toggle.active {
    background: rgba(124,200,255,0.2);
    color: #7cc8ff;
}

/* =================================== */
/* 13. Scene Presets                    */
/* =================================== */

.scene-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scene-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 18px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
    flex: 1;
    min-width: 120px;
    text-align: center;
}
.scene-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(124,200,255,0.3);
}
.scene-btn.active {
    background: rgba(124,200,255,0.15);
    border-color: rgba(124,200,255,0.4);
    color: #7cc8ff;
}
.scene-btn .scene-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}
.scene-btn .scene-label {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

/* =================================== */
/* 14. Sound Visualizer                */
/* =================================== */

.visualizer-wrap {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}

.visualizer-wrap canvas {
    width: 100%;
    height: 100%;
}

.viz-toggle {
    background: rgba(255,255,255,0.08);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
    margin-bottom: 8px;
}
.viz-toggle.active {
    background: rgba(124,200,255,0.2);
    color: #7cc8ff;
}

/* =================================== */
/* 15. Binaural Beats & Solfeggio      */
/* =================================== */

.binaural-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.binaural-preset-btn {
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}
.binaural-preset-btn:hover {
    background: rgba(167, 139, 250, 0.2);
}
.binaural-preset-btn.active {
    background: rgba(167, 139, 250, 0.25);
    border-color: rgba(167, 139, 250, 0.5);
    color: #c4b5fd;
}

.binaural-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.binaural-slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.binaural-slider-group label {
    min-width: 110px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.binaural-slider-group input[type="range"] {
    flex: 1;
    accent-color: #a78bfa;
}

.binaural-slider-group .slider-value {
    min-width: 50px;
    text-align: right;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.binaural-play-btn {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    padding: 10px 24px;
    border-radius: 8px;
    color: #c4b5fd;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    margin-top: 8px;
    align-self: center;
}
.binaural-play-btn:hover {
    background: rgba(167, 139, 250, 0.25);
}

.headphone-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}

.solfeggio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.solfeggio-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}
.solfeggio-card:hover {
    background: rgba(255,255,255,0.08);
}
.solfeggio-card.active {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.3);
}
.solfeggio-card .freq {
    font-size: 1.3em;
    font-weight: 600;
    color: #c4b5fd;
}
.solfeggio-card .freq-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}
.solfeggio-card input[type="range"] {
    width: 80%;
    margin-top: 8px;
    accent-color: #a78bfa;
}

@media (max-width: 900px) {
    .solfeggio-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =================================== */
/* 16. Sleep Journal                   */
/* =================================== */

.journal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #fbbf24;
}

.stat-card .stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.journal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.journal-form .form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.journal-form label {
    min-width: 80px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.journal-form input,
.journal-form textarea,
.journal-form select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    flex: 1;
}

.journal-form textarea {
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
}

.journal-submit {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    align-self: flex-start;
}
.journal-submit:hover {
    background: rgba(251, 191, 36, 0.25);
}

.journal-entries {
    margin-top: 16px;
}

.journal-entry {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.journal-entry .entry-date {
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
}

.journal-entry .entry-details {
    flex: 1;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.journal-entry .entry-duration {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.journal-entry .entry-notes {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.journal-entry .entry-delete {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
}
.journal-entry .entry-delete:hover {
    color: #f87171;
}

.star-rating {
    display: flex;
    gap: 4px;
}

.star-rating .star {
    cursor: pointer;
    font-size: 20px;
    color: rgba(255,255,255,0.2);
    transition: 0.15s;
}
.star-rating .star.active {
    color: #fbbf24;
}

.journal-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 6px;
    color: rgba(255,255,255,0.4);
}
.cal-day.has-entry {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}
.cal-day.today {
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.cal-day-header {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 4px 0;
}

@media (max-width: 900px) {
    .journal-stats { grid-template-columns: repeat(2, 1fr); }
    .journal-form .form-row { flex-direction: column; align-items: stretch; }
    .journal-form label { min-width: auto; }
}
