/* AInidra — Premium Light Healing Style Sheet */

:root {
    --bg-primary: #f7f9f8;
    --bg-secondary: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-border: rgba(255, 255, 255, 0.6);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #0f766e; /* Deep rich teal */
    --accent-hover: #115e59;
    --accent-glow: rgba(15, 118, 110, 0.15);
    --accent-gradient: linear-gradient(135deg, #0d9488 0%, #0284c7 50%, #6366f1 100%);
    --glow-color: rgba(13, 148, 136, 0.04);
    --input-border: rgba(13, 148, 136, 0.15);
    --input-focus-border: #0d9488;
    
    /* Organ healing colors */
    --color-pancreas: rgba(34, 197, 94, 0.15);
    --color-kidneys: rgba(59, 130, 246, 0.15);
    --color-nerves: rgba(234, 179, 8, 0.15);
    --color-eyes: rgba(16, 185, 129, 0.15);
    --color-vessels: rgba(239, 68, 68, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(-45deg, #f0f6f4, #fdfbfa, #faf5ff, #f3f9f7);
    background-size: 400% 400%;
    animation: gradientMesh 25s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Background Ambient Glows - Light Soft Pastels */
.ambient-glow {
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.12) 0%, rgba(244, 247, 246, 0) 70%);
    top: -120px;
    right: -100px;
    filter: blur(80px);
    z-index: -1;
    transition: background 1.5s ease-in-out;
}

.ambient-glow-secondary {
    position: absolute;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, rgba(244, 247, 246, 0) 70%);
    bottom: -100px;
    left: -100px;
    filter: blur(80px);
    z-index: -1;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    animation: rotate-slow 15s linear infinite;
}

.logo h1 {
    font-size: 1.7rem;
    background: linear-gradient(135deg, #0d9488 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-nav {
    display: flex;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.25rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.nav-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #0d9488 0%, #0ea5e9 100%);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.25);
    border: none;
}

/* App Container */
.app-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 1.75rem auto;
    padding: 0 1.5rem;
}

/* Tab Contents */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
    display: block;
}

/* Cards Premium Glassmorphic design */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.01),
        0 20px 40px -15px rgba(15, 118, 110, 0.05),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.01),
        0 30px 60px -20px rgba(15, 118, 110, 0.1),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.9);
}

/* --- PLAYER TAB STYLES --- */
.player-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .player-grid {
        grid-template-columns: 1fr;
    }
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

/* Meditation Sphere & Ring */
.meditation-sphere-container {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.meditation-sphere {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    /* Layered organic radial and linear gradients */
    background: radial-gradient(circle at 30% 30%, #ffd8a8 0%, #ff8787 40%, #ff5252 75%, #e64980 100%);
    box-shadow: 
        0 0 50px rgba(255, 82, 82, 0.3),
        0 10px 30px rgba(230, 73, 128, 0.2),
        inset 0 -20px 30px rgba(0, 0, 0, 0.15),
        inset 0 10px 20px rgba(255, 255, 255, 0.4);
    filter: blur(0.5px);
    z-index: 1;
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: sphereFloat 8s ease-in-out infinite alternate, rotate-slow 40s linear infinite;
}

.breathing-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px dashed rgba(13, 148, 136, 0.25);
    z-index: 2;
    transition: transform 0.1s linear, border-color 1s ease;
    box-shadow: 0 0 20px rgba(13, 148, 136, 0.05);
}

/* Breathing animation helper states (via JS) */
.breathing-ring.inhale {
    animation: breathing-in 5s ease-in-out forwards;
}

.breathing-ring.exhale {
    animation: breathing-out 5s ease-in-out forwards;
}

.breathing-ring.hold {
    border-color: rgba(13, 148, 136, 0.6);
}

.visualizer-overlay {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 140px;
    height: 140px;
}

.pulse-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    pointer-events: none;
    text-align: center;
}

/* Controls */
.player-controls {
    width: 100%;
}

.voice-selector-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.voice-selector-container label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Gender Selector segmented control */
.gender-selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
}

.gender-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.gender-toggle {
    display: flex;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 2px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .gender-toggle,
.player-card .gender-toggle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.gender-btn {
    background: transparent;
    border: none;
    outline: none;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gender-btn:hover {
    color: var(--text-primary);
}

.gender-btn.active {
    background: #ffffff;
    color: #9333ea;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

[data-theme="dark"] .gender-btn.active,
.player-card .gender-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #e9d5ff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.custom-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

.custom-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(13, 148, 136, 0.15);
}

.sound-toggles {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sound-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(13, 148, 136, 0.1);
    padding: 0.65rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sound-btn:hover {
    color: var(--text-primary);
    background: #ffffff;
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.05);
}

.sound-btn.active {
    color: #fff;
    background: var(--accent-gradient);
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.25);
}

.playback-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.control-btn {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.play-btn {
    width: 68px;
    height: 68px;
    background: var(--accent-gradient);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.45);
}

.play-btn span {
    font-size: 1.3rem;
    color: #fff;
    margin-left: 4px;
}

.play-btn.paused span {
    margin-left: 0;
}

.stop-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.stop-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
}

.stop-btn span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stop-btn:hover span {
    color: #ef4444;
}

.progress-container {
    width: 100%;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0d9488 0%, #0ea5e9 100%);
    border-radius: 3px;
    transition: width 0.3s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Script Teleprompter Card */
.script-card {
    display: flex;
    flex-direction: column;
    height: 480px;
}

.script-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.script-card h2 {
    font-size: 1.3rem;
}

.stage-badge {
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 1s ease;
}

.script-scroller {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Script Card */
.script-scroller::-webkit-scrollbar {
    width: 6px;
}

.script-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.script-scroller::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
}

.script-scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

.script-content {
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.script-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-top: 4rem;
}

.script-content p {
    margin-bottom: 1.5rem;
    transition: color 0.4s ease, opacity 0.4s ease;
}

.script-content p.active-sentence {
    color: #0f172a;
    font-weight: 600;
    opacity: 1;
}

.script-content p.past-sentence {
    opacity: 0.35;
}

.breathing-cue {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    animation: pulse-border 2s infinite;
}

.cue-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.cue-action {
    font-weight: 600;
    color: var(--accent);
}

/* --- DIARY TAB STYLES --- */
.diary-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .diary-grid {
        grid-template-columns: 1fr;
    }
}

.standard-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.standard-form input[type="date"],
.standard-form input[type="time"],
.standard-form input[type="number"],
.standard-form input[type="email"],
.standard-form input[type="password"],
.standard-form textarea {
    width: 100%;
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.standard-form input:focus,
.standard-form textarea:focus {
    border-color: var(--input-focus-border);
    background: #ffffff;
    box-shadow: 
        0 0 0 4px var(--accent-glow),
        inset 0 1px 2px rgba(0,0,0,0.01);
}

/* Custom Checkbox */
.form-group-checkbox {
    margin: 0.5rem 0;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #f8fafc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Chart Container & SVG styling */
.chart-container {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem 0 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

#sugar-chart {
    width: 100%;
    height: auto;
    display: block;
}

.chart-grid-line {
    stroke: rgba(0, 0, 0, 0.04);
    stroke-width: 1;
}

.chart-axis-line {
    stroke: rgba(0, 0, 0, 0.12);
    stroke-width: 1;
}

.chart-axis-text {
    fill: var(--text-secondary);
    font-size: 10px;
    font-family: inherit;
}

.chart-line-before {
    fill: none;
    stroke: #ff9f43;
    stroke-width: 2.5;
}

.chart-line-after {
    fill: none;
    stroke: #10b981;
    stroke-width: 2.5;
}

.chart-dot-before {
    fill: #ff9f43;
    stroke: #ffffff;
    stroke-width: 2;
    cursor: pointer;
}

.chart-dot-after {
    fill: #10b981;
    stroke: #ffffff;
    stroke-width: 2;
    cursor: pointer;
}

.chart-target-band {
    fill: rgba(16, 185, 129, 0.04);
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-item.before {
    color: #ff9f43;
    font-weight: 500;
}

.legend-item.after {
    color: #10b981;
    font-weight: 500;
}

.legend-item.target-zone {
    color: #059669;
    font-weight: 500;
}

/* Logs List */
.logs-list-container {
    margin-top: 1.5rem;
}

.logs-list-container h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.logs-list::-webkit-scrollbar {
    width: 6px;
}

.logs-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
}

.list-placeholder {
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.diary-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
}

.diary-item:hover {
    border-color: rgba(13, 148, 136, 0.25);
    transform: translateX(3px);
}

.diary-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.diary-item-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.diary-item-sugar {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.sugar-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.sugar-badge.before {
    background: rgba(255, 159, 67, 0.1);
    color: #d97706;
}

.sugar-badge.after {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

.diary-item-feeling {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.btn-delete-log {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.diary-item:hover .btn-delete-log {
    opacity: 1;
}

.btn-delete-log:hover {
    color: #ef4444;
}

/* --- GUIDE TAB STYLES --- */
.guide-container {
    max-width: 800px;
    margin: 0 auto;
}

.guide-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.guide-details {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s;
}

.guide-details[open] {
    border-color: rgba(13, 148, 136, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.guide-details summary {
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.guide-details summary::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.guide-details[open] summary::after {
    transform: rotate(180deg);
}

.details-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.details-content p {
    margin: 0.75rem 0;
}

.details-content ul,
.details-content ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.details-content li {
    margin-bottom: 0.5rem;
}

.details-content strong {
    color: var(--text-primary);
}

/* App Footer */
.app-footer {
    border-top: 1px solid var(--card-border);
    padding: 2rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.footer-top {
    text-align: center;
    font-weight: 500;
}

.footer-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.legal-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.legal-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.cookie-notice {
    color: var(--text-secondary);
}

.footer-disclaimer {
    max-width: 900px;
    margin: 1.5rem auto 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    padding-top: 1rem;
}

/* --- KEYFRAMES / ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.02);
    }
    100% {
        transform: translateY(0px) scale(1);
    }
}

@keyframes sphereFloat {
    0% {
        transform: translateY(0px) scale(1);
        border-radius: 50%;
    }
    50% {
        transform: translateY(-8px) scale(1.03);
        border-radius: 48% 52% 50% 50% / 50% 48% 52% 50%;
    }
    100% {
        transform: translateY(0px) scale(1);
        border-radius: 50%;
    }
}

@keyframes gradientMesh {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes breathing-in {
    from {
        transform: scale(0.92);
        border-color: rgba(13, 148, 136, 0.15);
    }
    to {
        transform: scale(1.14);
        border-color: var(--accent);
    }
}

@keyframes breathing-out {
    from {
        transform: scale(1.14);
        border-color: var(--accent);
    }
    to {
        transform: scale(0.92);
        border-color: rgba(13, 148, 136, 0.15);
    }
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.2);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(13, 148, 136, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0);
    }
}

/* --- INDIVIDUAL PRACTICE ADDITIONAL STYLES --- */
.auth-card {
    max-width: 450px;
    margin: 2rem auto;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    padding: 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #0d9488 0%, #0ea5e9 100%);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.questionnaire-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.text-center {
    text-align: center;
}

.payment-card {
    max-width: 500px;
    margin: 3rem auto;
    padding: 3rem 2rem;
}

.payment-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.5rem 0;
    font-family: 'Playfair Display', serif;
}

.payment-desc {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.payment-notice {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.pending-card {
    max-width: 550px;
    margin: 4rem auto;
    padding: 3rem 2rem;
}

.pending-card h2 {
    margin: 1.5rem 0 1rem;
}

.pending-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.pending-notice {
    font-style: italic;
    font-size: 0.9rem;
    background: rgba(13, 148, 136, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

/* Spinner Loader */
.pulse-loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    margin: 0 auto;
    animation: pulse-zoom 1.5s ease-in-out infinite;
}

@keyframes pulse-zoom {
    0% {
        transform: scale(0.6);
        opacity: 0.2;
    }
    50% {
        transform: scale(1);
        opacity: 0.9;
    }
    100% {
        transform: scale(0.6);
        opacity: 0.2;
    }
}

.card-header-ind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.ind-badge {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #d97706;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.ind-sphere {
    background: radial-gradient(circle, #f43f5e 0%, #fb7185 50%, rgba(255, 255, 255, 0) 100%) !important;
    box-shadow: 0 0 35px rgba(251, 113, 133, 0.3) !important;
}

/* --- MOBILE RESPONSIVENESS AND MOBILE ADAPTATION --- */
@media (max-width: 768px) {
    /* Layout & Spacing */
    .app-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    /* Header & Navigation */
    .app-header {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        position: sticky;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .app-nav {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding: 0.35rem;
        border-radius: 10px;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
        display: flex;
    }
    
    .app-nav::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari and Opera */
    }
    
    .nav-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    /* Player page adjustments */
    .meditation-sphere-container {
        width: 200px;
        height: 200px;
        margin-bottom: 1.5rem;
    }
    
    .meditation-sphere {
        width: 130px;
        height: 130px;
    }
    
    .breathing-ring {
        width: 180px;
        height: 180px;
    }
    
    .pulse-text {
        font-size: 0.9rem;
    }
    
    .player-controls {
        width: 100%;
    }
    
    .sound-toggles {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }
    
    .sound-btn {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
        justify-content: center;
    }
    
    .playback-bar {
        gap: 1.5rem;
    }
    
    .custom-select {
        font-size: 0.9rem;
        padding: 0.65rem 1rem;
    }
    
    /* Diary page adjustments */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .diary-history {
        margin-top: 1.5rem;
    }
    
    /* Payment & Forms */
    .payment-card, .pending-card, .auth-card {
        margin: 1.5rem auto;
        padding: 2rem 1.25rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .price-tag {
        font-size: 2rem;
    }
    
    /* Admin/Moderator page adjustments */
    .admin-wrapper {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .playback-bar .control-btn {
        width: 50px;
        height: 50px;
    }
    
    .playback-bar .play-btn {
        width: 60px;
        height: 60px;
    }
    
    .stage-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .script-card {
        height: 350px;
    }
    
    .sound-toggles {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sound-btn {
        width: 100%;
    }
}

/* --- INTRO CARD & WELCOME BANNER --- */
.intro-card {
    margin-bottom: 2.5rem;
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(240, 248, 245, 0.8) 100%);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
}

.intro-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(13, 148, 136, 0.08);
    color: var(--accent);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.intro-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    color: var(--text-primary);
    margin: 0 0 1rem;
    line-height: 1.25;
}

.intro-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 2.5rem;
}

.intro-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.04);
}

.feature-icon {
    font-size: 2rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.feature-item h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.feature-item p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.intro-science-box {
    margin-bottom: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(13, 148, 136, 0.15);
}

.intro-science-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.science-item {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 1.5rem;
}

.science-item h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.science-item p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.intro-steps-box {
    background: rgba(13, 148, 136, 0.03);
    border: 1px solid rgba(13, 148, 136, 0.1);
    border-radius: 16px;
    padding: 1.75rem;
}

.intro-steps-box h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0 0 1rem;
    font-weight: 600;
}

.intro-steps {
    margin: 0;
    padding-left: 1.25rem;
}

.intro-steps li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.intro-steps li:last-child {
    margin-bottom: 0;
}

/* --- DEVELOPER & SUPPORT INFO --- */
.footer-bottom-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
    text-align: left;
    font-size: 0.8rem;
}

.developer-info p, .support-info p {
    margin: 0 0 0.35rem 0;
}

.support-info a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.support-info a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .intro-card {
        padding: 2rem 1.5rem;
    }
    .intro-card h1 {
        font-size: 1.85rem;
    }
    .footer-bottom-info {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.25rem;
    }
}

/* Global Auth Modal styling */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-modal-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: 100%;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    padding: 2.25rem;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.auth-box {
    width: 100%;
}

.auth-logo {
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 2.2rem;
}

/* Header profile widget */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 0.4rem 0.85rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.user-email {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.promo-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.promo-toggle-container input {
    cursor: pointer;
}

.logout-btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #ef4444;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.auth-buttons-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.auth-buttons-row button {
    flex: 1;
}

.highlight-label {
    color: var(--accent) !important;
    font-weight: 600 !important;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Card Lock Overlays */
.player-card, .diary-grid {
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(247, 249, 248, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    border-radius: 24px;
}

.overlay-content {
    max-width: 320px;
    margin: auto;
}

.overlay-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    animation: float 6s ease-in-out infinite;
}

.overlay-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.overlay-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Landing Extra Info */
.landing-extra-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.mission-card h2, .testimonials-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.mission-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.testimonial-item {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-rating {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.testimonial-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .header-right {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    .user-profile-widget {
        width: 100%;
        justify-content: space-between;
    }
}
