/* Sonavibe - Styles v1.0.0 */

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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
            color: white;
            min-height: 100vh;
            overflow-x: hidden;
            line-height: 1.6;
            scroll-behavior: smooth;
        }

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

        /* Header */
        .header {
            text-align: center;
            margin-bottom: 40px;
            padding: 30px 0;
        }
        .header h1 {
            font-size: 2.4rem;
            background: linear-gradient(135deg, #64d8f0, #7b68ee, #a78bfa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
            letter-spacing: 4px;
            font-weight: 800;
        }
        .subtitle {
            font-size: 1.2rem;
            color: #b0c4de;
            margin-bottom: 12px;
        }
        .intro-text {
            max-width: 800px;
            margin: 0 auto;
            font-size: 0.95rem;
            color: #ddd;
            background: rgba(255, 255, 255, 0.05);
            padding: 16px 20px;
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            line-height: 1.5;
        }

        /* Quick Start Guide */
        .quick-start {
            background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(123, 104, 238, 0.2));
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 40px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .quick-start h3 {
            color: #4a90e2;
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.3rem;
        }
        .steps {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }
        .step {
            background: rgba(255, 255, 255, 0.05);
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.3s ease;
        }
        .step:hover {
            transform: translateY(-5px);
        }
        .step-number {
            background: linear-gradient(45deg, #4a90e2, #7b68ee);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            font-weight: bold;
            font-size: 1.2rem;
        }
        .step h4 {
            color: #4a90e2;
            margin-bottom: 10px;
        }
        .step p {
            color: #ddd;
            font-size: 0.95rem;
        }

        /* Healing Presets */
        .presets-section {
            background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 154, 0, 0.2));
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 40px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .presets-section h3 {
            color: #ff9a56;
            margin-bottom: 15px;
            text-align: center;
            font-size: 1.3rem;
        }
        .presets-intro {
            text-align: center;
            color: #ddd;
            margin-bottom: 25px;
            font-size: 0.95rem;
        }
        .presets-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }
        .preset-card {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        .preset-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
            border-color: #4a90e2;
        }
        .preset-card.active {
            background: linear-gradient(135deg, #4a90e2, #357abd);
            border-color: #4a90e2;
            box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
        }
        .preset-icon {
            font-size: 2.5rem;
            margin-bottom: 15px;
            display: block;
        }
        .preset-name {
            font-size: 1.3rem;
            font-weight: bold;
            color: #fff;
            margin-bottom: 8px;
        }
        .preset-desc {
            color: #b0c4de;
            margin-bottom: 12px;
            font-size: 0.95rem;
        }
        .preset-freqs {
            color: #4a90e2;
            font-size: 0.9rem;
            font-weight: 500;
        }

        /* Main Content Layout */
        .main-content {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            gap: 30px;
            margin-bottom: 40px;
        }

        /* Panel Styles */
        .panel {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
        }
        .panel-title {
            color: #4a90e2;
            margin-bottom: 15px;
            text-align: center;
            font-size: 1.2rem;
        }

        /* Active Frequencies Display */
        .active-freq-display {
            margin-bottom: 25px;
        }
        .freq-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }
        .freq-item:last-child {
            border-bottom: none;
        }
        .freq-label {
            color: #b0c4de;
            font-weight: 500;
        }
        .freq-value {
            color: #4a90e2;
            font-weight: bold;
            font-size: 1.1rem;
        }

        /* Volume Controls */
        .volume-section {
            margin-bottom: 25px;
        }
        .volume-control {
            margin-bottom: 20px;
        }
        .volume-control label {
            display: block;
            color: #b0c4de;
            margin-bottom: 8px;
            font-weight: 500;
        }
        .volume-slider {
            width: 100%;
            height: 8px;
            border-radius: 5px;
            background: linear-gradient(90deg, #4a90e2, #7b68ee);
            outline: none;
            cursor: pointer;
            -webkit-appearance: none;
            appearance: none;
        }
        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #4ecdc4;
            cursor: pointer;
            border: 2px solid #fff;
            box-shadow: 0 0 6px rgba(78,205,196,0.5);
        }
        .volume-slider::-moz-range-thumb {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #4ecdc4;
            cursor: pointer;
            border: 2px solid #fff;
            box-shadow: 0 0 6px rgba(78,205,196,0.5);
        }

        /* Status Panel */
        .status-panel {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 15px;
            border-left: 4px solid #4a90e2;
        }
        .status-title {
            color: #4a90e2;
            font-weight: bold;
            margin-bottom: 8px;
        }
        .status-text {
            color: #ddd;
            font-size: 0.95rem;
            line-height: 1.4;
        }

        /* Enhanced Visual Therapy Center */
        .center-panel {
            position: relative;
        }
        .visual-therapy-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .fullscreen-btn {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 10px 15px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }
        .fullscreen-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }

        /* Enhanced Canvas Container */
        .canvas-container {
            position: relative;
            width: 100%;
            height: 400px;
            background: radial-gradient(circle at center, rgba(0,0,0,0.9), rgba(0,0,0,1));
            border-radius: 15px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 25px;
            overflow: hidden;
        }
        #sacredCanvas {
            width: 100%;
            height: 100%;
            display: block;
        }

        /* Enhanced Sacred Pattern Controls */
        .pattern-controls {
            margin-bottom: 25px;
        }
        .pattern-controls h4 {
            color: #4a90e2;
            margin-bottom: 15px;
            text-align: center;
            font-size: 1.2rem;
        }
        .pattern-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 10px;
            margin-bottom: 20px;
        }
        .pattern-btn {
            background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
            border: 2px solid rgba(255,255,255,0.2);
            color: white;
            padding: 12px 8px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-size: 0.85rem;
            position: relative;
            overflow: hidden;
        }
        .pattern-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255,255,255,0.2);
        }
        .pattern-btn.active {
            background: linear-gradient(135deg, #4a90e2, #357abd);
            border-color: #4a90e2;
            box-shadow: 0 0 15px rgba(74,144,226,0.4);
        }
        .pattern-btn.freq-match {
            border-color: #4ecdc4;
            box-shadow: 0 0 12px rgba(78, 205, 196, 0.5), inset 0 0 6px rgba(78, 205, 196, 0.1);
        }
        .pattern-btn.freq-match::after {
            content: '♪';
            position: absolute;
            top: 4px;
            right: 6px;
            font-size: 0.7rem;
            color: #4ecdc4;
        }

        /* Play Mode Toggle Buttons (Combined / Sequence) */
        .visual-mode-btn {
            background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
            border: 1px solid rgba(255,255,255,0.15);
            color: #aaa;
            padding: 6px 4px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.7rem;
            font-weight: 500;
        }
        .visual-mode-btn:hover {
            background: linear-gradient(135deg, rgba(78,205,196,0.15), rgba(74,144,226,0.1));
            border-color: rgba(78,205,196,0.3);
            color: #ddd;
        }
        .visual-mode-btn.active {
            background: linear-gradient(135deg, rgba(78,205,196,0.25), rgba(74,144,226,0.2));
            border-color: #4ecdc4;
            color: #fff;
            box-shadow: 0 0 10px rgba(78,205,196,0.3);
        }
        .clear-btn {
            background: linear-gradient(135deg, #ff6b6b, #e74c3c) !important;
            border-color: #ff6b6b !important;
        }

        /* Pattern Control Sliders */
        .pattern-controls-sliders {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        /* Timer and Controls */
        .timer {
            text-align: center;
            font-size: 2rem;
            font-weight: bold;
            color: #4a90e2;
            margin-bottom: 20px;
            font-family: 'Courier New', monospace;
        }
        .main-controls {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }
        .btn {
            background: linear-gradient(135deg, #4a90e2, #357abd);
            border: none;
            color: white;
            padding: 12px 20px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.95rem;
            font-weight: 500;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
        }
        .btn:active {
            transform: translateY(0);
        }

        /* Audio Section */
        .audio-section {
            margin-bottom: 25px;
        }
        .audio-section h4 {
            color: #4a90e2;
            margin-bottom: 12px;
            font-size: 1rem;
        }
        .audio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 8px;
            margin-bottom: 15px;
        }
        .audio-btn {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            padding: 10px 8px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-size: 0.8rem;
        }
        .audio-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-1px);
        }
        .audio-btn.active {
            background: linear-gradient(135deg, #4a90e2, #357abd);
            border-color: #4a90e2;
        }

        /* Enhanced Frequency Controls Section */
        .frequency-section {
            background: linear-gradient(135deg, rgba(255,107,107,0.2), rgba(255,154,0,0.2));
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .frequency-section h3 {
            color: #ff9a56;
            margin-bottom: 15px;
            text-align: center;
            font-size: 1.3rem;
        }

        /* Collapsible sections */
        .section-toggle {
            cursor: pointer;
            user-select: none;
            position: relative;
        }
        .section-toggle::after {
            content: '▼';
            font-size: 0.6em;
            margin-left: 8px;
            display: inline-block;
            transition: transform 0.3s ease;
            opacity: 0.5;
        }
        .section-toggle.collapsed::after {
            transform: rotate(-90deg);
        }
        .section-body {
            transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
            overflow: hidden;
        }
        .section-body.collapsed {
            max-height: 0 !important;
            opacity: 0;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            margin-top: 0 !important;
            margin-bottom: 0 !important;
        }
        .frequency-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 20px;
        }
        .frequency-control {
            background: rgba(255,255,255,0.05);
            border-radius: 15px;
            padding: 20px;
            border: 1px solid rgba(255,255,255,0.2);
            transition: all 0.3s ease;
        }
        .frequency-control:hover {
            background: rgba(255,255,255,0.08);
            transform: translateY(-2px);
        }
        .frequency-label {
            font-weight: bold;
            color: #4ecdc4;
            margin-bottom: 10px;
            font-size: 1.1rem;
        }
        .frequency-slider {
            width: 100%;
            height: 8px;
            border-radius: 5px;
            background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
            outline: none;
            margin: 10px 0;
        }
        .frequency-value {
            text-align: center;
            font-size: 1.2rem;
            color: #fff;
            margin: 10px 0;
        }
        .frequency-description {
            font-size: 0.9rem;
            color: #bbb;
            text-align: center;
            line-height: 1.4;
        }

        /* Global Controls */
        .global-controls {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .control-group {
            background: rgba(255,255,255,0.05);
            border-radius: 15px;
            padding: 20px;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .control-label {
            color: #96ceb4;
            font-weight: bold;
            margin-bottom: 10px;
            display: block;
        }
        .control-slider {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: linear-gradient(90deg, #96ceb4, #4ecdc4);
            outline: none;
            margin: 10px 0;
        }
        .control-value {
            text-align: center;
            color: #fff;
            font-size: 1.1rem;
        }

        /* Educational Panel */
        .education-panel {
            background: linear-gradient(135deg, rgba(150,206,180,0.2), rgba(78,205,196,0.2));
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .education-panel h3 {
            color: #96ceb4;
            margin-bottom: 15px;
            text-align: center;
            font-size: 1.5rem;
        }
        .pattern-info {
            display: none;
            background: rgba(255,255,255,0.05);
            border-radius: 12px;
            padding: 20px;
            margin-top: 15px;
            border-left: 4px solid #96ceb4;
        }
        .pattern-info.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .pattern-info h4 {
            color: #4ecdc4;
            margin-bottom: 10px;
            font-size: 1.2rem;
        }
        .pattern-info p {
            color: #ddd;
            line-height: 1.6;
            margin-bottom: 10px;
        }
        .pattern-properties {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }
        .property-item {
            background: rgba(255,255,255,0.05);
            padding: 10px;
            border-radius: 8px;
            text-align: center;
        }
        .property-label {
            color: #ff9a56;
            font-size: 0.9rem;
            font-weight: bold;
        }
        .property-value {
            color: #fff;
            font-size: 0.95rem;
            margin-top: 5px;
        }

        /* Manifestation Section */
        .manifestation-section {
            background: linear-gradient(135deg, rgba(123, 104, 238, 0.2), rgba(147, 112, 219, 0.2));
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .manifestation-section h3 {
            color: #7b68ee;
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.4rem;
        }

        /* Knowledge Base Accordion */
        .knowledge-accordion {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
        }
        @media (max-width: 600px) {
            .knowledge-accordion { grid-template-columns: 1fr; }
        }
        .knowledge-item {
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid rgba(78, 205, 196, 0.15);
            background: rgba(15, 15, 35, 0.5);
        }
        .knowledge-item .knowledge-content.active {
            grid-column: 1 / -1;
        }
        .knowledge-toggle {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(74, 144, 226, 0.1));
            border: none;
            color: #e0e0e0;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            text-align: left;
            transition: all 0.3s ease;
        }
        .knowledge-toggle:hover {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(74, 144, 226, 0.2));
        }
        .knowledge-toggle.active {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.25), rgba(74, 144, 226, 0.25));
            color: #4ecdc4;
        }
        .knowledge-arrow {
            font-size: 1rem;
            transition: transform 0.3s ease;
            color: #4ecdc4;
        }
        .knowledge-toggle.active .knowledge-arrow {
            transform: rotate(90deg);
        }
        .knowledge-content {
            display: none;
            padding: 15px 18px 18px;
            color: #ccc;
            font-size: 0.82rem;
            line-height: 1.65;
            border-top: 1px solid rgba(78, 205, 196, 0.1);
        }
        .knowledge-content.active {
            display: block;
        }
        .knowledge-content ul {
            list-style: none;
            padding: 0;
            margin: 10px 0;
        }
        .knowledge-content li {
            padding: 6px 0 6px 18px;
            position: relative;
        }
        .knowledge-content li::before {
            content: "◆";
            position: absolute;
            left: 0;
            color: #4ecdc4;
            font-size: 0.55rem;
            top: 10px;
        }
        .knowledge-content strong {
            color: #e0e0e0;
        }
        .knowledge-content p {
            margin: 8px 0;
        }

        /* Advanced Frequency Control */
        .advanced-freq-section {
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(69, 183, 209, 0.2));
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .advanced-freq-section h3 {
            color: #4ecdc4;
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.4rem;
        }

        /* Binaural Beats Section */
        .binaural-section {
            background: linear-gradient(135deg, rgba(0, 206, 209, 0.2), rgba(72, 61, 139, 0.2));
            border-radius: 20px; padding: 25px; margin-bottom: 30px;
            border: 1px solid rgba(0, 206, 209, 0.3);
        }
        .binaural-section h3 { color: #00ced1; margin-bottom: 20px; text-align: center; font-size: 1.3rem; }
        .beat-preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
        .beat-preset-btn {
            background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
            border: 2px solid rgba(0,206,209,0.3); color: white; padding: 14px 10px;
            border-radius: 12px; cursor: pointer; text-align: center; transition: all 0.3s ease; font-size: 0.85rem;
        }
        .beat-preset-btn:hover { transform: translateY(-2px); border-color: #00ced1; box-shadow: 0 4px 15px rgba(0,206,209,0.3); }
        .beat-preset-btn.active { background: linear-gradient(135deg, #00ced1, #483d8b); border-color: #00ced1; }

        /* Rife & Planetary Frequencies */
        .rife-section, .planetary-section {
            border-radius: 20px; padding: 25px; margin-bottom: 30px;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .rife-section { background: linear-gradient(135deg, rgba(220, 20, 60, 0.2), rgba(139, 0, 0, 0.2)); }
        .rife-section h3 { color: #dc143c; margin-bottom: 20px; text-align: center; font-size: 1.3rem; }
        .planetary-section { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(184, 134, 11, 0.2)); }
        .planetary-section h3 { color: #ffd700; margin-bottom: 20px; text-align: center; font-size: 1.3rem; }
        .freq-preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
        .freq-preset-btn {
            background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
            color: white; padding: 12px; border-radius: 10px; cursor: pointer;
            text-align: left; transition: all 0.3s ease; font-size: 0.85rem;
        }
        .freq-preset-btn:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
        .freq-preset-btn strong { display: block; margin-bottom: 4px; }

        /* Breathing Pacer */
        .breathing-section {
            background: linear-gradient(135deg, rgba(46, 213, 115, 0.2), rgba(30, 144, 255, 0.2));
            border-radius: 20px; padding: 25px; margin-bottom: 30px;
            border: 1px solid rgba(46, 213, 115, 0.3);
        }
        .breathing-section h3 { color: #2ed573; margin-bottom: 20px; text-align: center; font-size: 1.3rem; }
        .breath-circle-container { display: flex; justify-content: center; margin: 20px 0; }
        .breath-circle {
            width: 180px; height: 180px; border-radius: 50%;
            background: radial-gradient(circle, rgba(46,213,115,0.3), rgba(30,144,255,0.1));
            border: 3px solid rgba(46,213,115,0.5);
            display: flex; align-items: center; justify-content: center;
            font-size: 1.2rem; color: #2ed573; font-weight: bold;
            transition: transform 4s ease-in-out, border-color 0.5s;
        }
        .breath-circle.inhale { transform: scale(1.4); border-color: #2ed573; }
        .breath-circle.hold { transform: scale(1.4); border-color: #ffd700; }
        .breath-circle.exhale { transform: scale(0.8); border-color: #1e90ff; }
        .breath-pattern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 15px; }
        .breath-pattern-btn {
            background: rgba(255,255,255,0.08); border: 2px solid rgba(46,213,115,0.3);
            color: white; padding: 10px; border-radius: 10px; cursor: pointer;
            text-align: center; transition: all 0.3s ease; font-size: 0.85rem;
        }
        .breath-pattern-btn:hover { border-color: #2ed573; }
        .breath-pattern-btn.active { background: linear-gradient(135deg, #2ed573, #1e90ff); border-color: #2ed573; }

        /* Session Protocols */
        .protocols-section {
            background: linear-gradient(135deg, rgba(255, 99, 71, 0.2), rgba(255, 165, 0, 0.2));
            border-radius: 20px; padding: 25px; margin-bottom: 30px;
            border: 1px solid rgba(255, 99, 71, 0.3);
        }
        .protocols-section h3 { color: #ff6347; margin-bottom: 20px; text-align: center; font-size: 1.3rem; }
        .protocol-card {
            background: rgba(255,255,255,0.08); border: 2px solid rgba(255,99,71,0.3);
            border-radius: 15px; padding: 18px; cursor: pointer; transition: all 0.3s ease;
        }
        .protocol-card:hover { border-color: #ff6347; transform: translateY(-2px); }
        .protocol-card.active { background: linear-gradient(135deg, rgba(255,99,71,0.3), rgba(255,165,0,0.2)); border-color: #ff6347; }
        .protocol-progress { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin-top: 10px; overflow: hidden; }
        .protocol-progress-bar { height: 100%; background: linear-gradient(90deg, #ff6347, #ffd700); border-radius: 3px; transition: width 1s ease; width: 0%; }

        /* Waveform Selector */
        .waveform-grid { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 15px 0; }
        .waveform-btn {
            background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.2);
            color: white; padding: 10px 18px; border-radius: 10px; cursor: pointer;
            transition: all 0.3s ease; font-size: 0.9rem;
        }
        .waveform-btn:hover { border-color: #4a90e2; }
        .waveform-btn.active { background: linear-gradient(135deg, #4a90e2, #357abd); border-color: #4a90e2; }

        /* 432Hz Toggle */
        .tuning-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 15px 0; }
        .tuning-switch { position: relative; width: 60px; height: 30px; }
        .tuning-switch input { opacity: 0; width: 0; height: 0; }
        .tuning-slider {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background: #444; border-radius: 30px; transition: 0.3s;
        }
        .tuning-slider:before {
            content: ""; position: absolute; height: 24px; width: 24px;
            left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s;
        }
        .tuning-switch input:checked + .tuning-slider { background: #2ed573; }
        .tuning-switch input:checked + .tuning-slider:before { transform: translateX(30px); }

        /* Responsive Design */
        @media (max-width: 1200px) {
            .main-content {
                grid-template-columns: 1fr;
                gap: 20px;
            }
        }
        @media (max-width: 768px) {
            .container {
                padding: 12px;
            }
            .header {
                margin-bottom: 20px;
                padding: 20px 0;
            }
            .header h1 {
                font-size: 2rem;
                letter-spacing: 3px;
            }
            .subtitle {
                font-size: 1rem;
            }
            .intro-text {
                font-size: 0.85rem;
                padding: 12px 16px;
            }
            .quick-start {
                padding: 20px;
                margin-bottom: 25px;
            }
            .quick-start h3 {
                font-size: 1.1rem;
                margin-bottom: 15px;
            }
            .steps {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            .step h4 {
                font-size: 0.95rem;
            }
            .step p {
                font-size: 0.8rem;
            }
            .presets-grid {
                grid-template-columns: 1fr;
            }
            .presets-section h3,
            .frequency-section h3 {
                font-size: 1.1rem;
            }
            .panel-title {
                font-size: 1.05rem;
            }
            .canvas-container {
                height: 300px;
            }
            .main-controls {
                flex-direction: column;
                align-items: center;
            }
            /* Standardize button text on mobile */
            .audio-btn, .freq-preset-btn, .waveform-btn {
                font-size: 0.8rem;
                padding: 8px 12px;
            }
            /* Bigger touch targets for mobile sliders */
            .volume-slider {
                height: 10px;
            }
            .volume-slider::-webkit-slider-thumb {
                width: 28px;
                height: 28px;
            }
            .volume-slider::-moz-range-thumb {
                width: 28px;
                height: 28px;
            }
        }
        @media (max-width: 480px) {
            .header h1 {
                font-size: 1.6rem;
                letter-spacing: 2px;
            }
            .intro-text {
                font-size: 0.8rem;
            }
            .quick-start h3 {
                font-size: 1rem;
            }
            /* Session cards on small screens */
            #sessionGrid {
                grid-template-columns: 1fr !important;
            }
            /* Ensure minimum touch target size (44px) */
            .session-card {
                min-height: 44px;
            }
            .freq-preset-btn, .audio-btn, .waveform-btn, .protocol-card, .knowledge-toggle {
                min-height: 44px;
            }
            /* Modality tabs wrap nicely */
            #modalityTabs {
                gap: 4px !important;
            }
            #modalityTabs .waveform-btn {
                padding: 8px 10px !important;
                font-size: 0.75rem !important;
            }
            /* Session filter tabs */
            #sessionFilterTabs .waveform-btn {
                padding: 6px 10px !important;
                font-size: 0.75rem !important;
            }
        }

        /* Session Card Styles */
        .session-card:hover {
            border-color: rgba(0, 200, 200, 0.5) !important;
            background: linear-gradient(135deg, rgba(0,200,200,0.2), rgba(123,104,238,0.2)) !important;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 200, 200, 0.2);
        }
        .session-card.active {
            border-color: rgba(0, 200, 200, 0.8) !important;
            background: linear-gradient(135deg, rgba(0,200,200,0.3), rgba(123,104,238,0.3)) !important;
            box-shadow: 0 0 20px rgba(0, 200, 200, 0.3);
        }
        .session-card.active::before {
            content: '▶ Playing';
            position: absolute;
            top: 6px;
            right: 8px;
            font-size: 0.65rem;
            color: #00c8c8;
            font-weight: bold;
        }

        /* Fullscreen Styles */
        .fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 9999;
            background: black;
            border-radius: 0;
        }
        .fullscreen #sacredCanvas {
            width: 100vw;
            height: 100vh;
        }

        /* Tooltip Styles */
        .tooltip {
            position: relative;
        }
        .tooltip:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.9);
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 0.8rem;
            white-space: nowrap;
            z-index: 1000;
            margin-bottom: 5px;
        }
        .tooltip:hover::before {
            content: '';
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 5px solid transparent;
            border-top-color: rgba(0, 0, 0, 0.9);
            z-index: 1000;
        }

/* ================================================
   Fullscreen Fix CSS
   ================================================ */

/* Fullscreen: fill entire viewport with canvas only */
.canvas-container.fullscreen{
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000 !important;
  overflow: hidden;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.canvas-container.fullscreen #sacredCanvas{
  width: 100% !important;
  height: 100% !important;
  display: block;
}
/* Hide exit button when not fullscreen, show in fullscreen */
.fs-exit-top{ display: none !important; }
.canvas-container.fullscreen .fs-exit-top{
  position: fixed;
  top: 12px; left: 12px;
  z-index: 10001;
  display: inline-flex !important;
  align-items: center; gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  background: rgba(0,0,0,0.7);
  color: #fff;
  backdrop-filter: blur(4px);
}
.canvas-container.fullscreen .fs-exit-top:hover{ background: rgba(0,0,0,0.85); }
/* Hide separate exit button - we use the inline one inside canvasContainer */
#fsExitBtn{ display: none !important; }
/* Hide back-to-top in fullscreen */
.canvas-container.fullscreen ~ #backToTop,
body:has(.canvas-container.fullscreen) #backToTop{ display: none !important; }

/* ================================================
   Back to Top Button
   ================================================ */

#backToTop{
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10000;
  border: none;
  border-radius: 999px;
  width: 40px; height: 40px;
  font-size: 20px;
  cursor: pointer;
  background: rgba(0,0,0,0.6);
  color: #fff;
  backdrop-filter: blur(4px);
}
#backToTop:hover{ background: rgba(0,0,0,0.8); }

/* ================================================
   Sticky Bottom Navigation
   ================================================ */
#stickyNav{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9998;
  background: rgba(15,15,30,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
  transition: transform 0.3s ease;
}
#stickyNav.nav-hidden{ transform: translateY(100%); }
.nav-btn{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.2s;
  min-width: 48px;
}
.nav-btn span{ font-size: 9px; font-weight: 600; letter-spacing: 0.3px; }
.nav-btn:hover, .nav-btn.active{ color: #7b68ee; }
.nav-btn:active{ transform: scale(0.9); }

/* Add bottom padding to body so content isn't hidden behind nav */
body{ padding-bottom: 70px !important; }

/* ================================================
   First-Launch Walkthrough
   ================================================ */
#walkthrough-overlay{
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: tierFadeIn 0.3s ease;
}
.walkthrough-card{
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border-radius: 20px;
  padding: 30px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  color: #e2e8f0;
  border: 2px solid rgba(123,104,238,0.4);
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  animation: tierSlideUp 0.35s ease;
}
.walkthrough-card .wt-icon{ font-size: 48px; margin-bottom: 12px; }
.walkthrough-card h2{ font-size: 20px; margin-bottom: 8px; color: #fff; }
.walkthrough-card p{ font-size: 14px; color: #a0aec0; line-height: 1.5; margin-bottom: 20px; }
.walkthrough-dots{ display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.walkthrough-dots .dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4a5568;
  transition: all 0.3s;
}
.walkthrough-dots .dot.active{ background: #7b68ee; width: 24px; border-radius: 4px; }
.wt-btn{
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 4px;
}
.wt-btn-primary{ background: linear-gradient(135deg, #7b68ee, #6b46c1); color: #fff; }
.wt-btn-primary:hover{ opacity: 0.9; }
.wt-btn-skip{ background: transparent; color: #a0aec0; border: 1px solid #4a5568; }
.wt-btn-skip:hover{ border-color: #a0aec0; }

/* ============================================================
   5-TAB BOTTOM NAVIGATION
   ============================================================ */
.tab-page { display: none !important; }
.tab-page.active { display: block !important; }

.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #1a1a2e, #0f1525);
    border-top: 1px solid rgba(123,104,238,0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9998;
    padding-bottom: env(safe-area-inset-bottom, 0);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #667;
    font-size: 0.65rem;
    cursor: pointer;
    padding: 4px 12px;
    transition: color 0.2s;
    gap: 2px;
    -webkit-tap-highlight-color: transparent;
}
.tab-btn .tab-icon { font-size: 1.3rem; line-height: 1; }
.tab-btn.active { color: #7b68ee; }
.tab-btn.active .tab-icon { filter: drop-shadow(0 0 6px rgba(123,104,238,0.5)); }

/* Now Playing Bar */
.now-playing-bar {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #1e2240, #161a30);
    border-top: 1px solid rgba(0,200,200,0.2);
    padding: 8px 16px;
    z-index: 9997;
    display: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.now-playing-bar.visible { display: flex; align-items: center; gap: 10px; }
.now-playing-info { flex: 1; min-width: 0; }
.now-playing-title { color: #e2e8f0; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing-sub { color: #a0aec0; font-size: 0.65rem; }
.now-playing-controls { display: flex; gap: 6px; align-items: center; }
.np-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}
.np-btn:hover, .np-btn.active { background: rgba(123,104,238,0.3); border-color: #7b68ee; color: #fff; }
.np-btn-stop { background: rgba(255,80,80,0.2); border-color: rgba(255,80,80,0.3); }
.np-btn-stop:hover { background: rgba(255,80,80,0.4); }
.np-vol-panel {
    position: absolute;
    bottom: 100%;
    right: 10px;
    background: #1e2240;
    border: 1px solid rgba(123,104,238,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: none;
    min-width: 220px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}
.np-vol-panel.open { display: block; }
.np-vol-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.np-vol-row label { color: #a0aec0; font-size: 0.7rem; width: 50px; }
.np-vol-row input[type=range] { flex: 1; }
.np-vol-row span { color: #e2e8f0; font-size: 0.7rem; width: 30px; text-align: right; }

/* Padding for content above fixed bars */
.container { padding-bottom: 140px; }

/* Hide old floating volume bar — replaced by Now Playing bar + tab nav */
#floatingVolume, #volumePill { display: none !important; }

/* ============================================================
   FONT STANDARDIZATION — Professional consistency
   ============================================================ */
/* Section titles (h3) — consistent across ALL sections */
.frequency-section > h3,
.frequency-section > h3.panel-title,
.presets-section > h3,
.quick-start > h3,
.binaural-section > h3,
.education-panel > h3,
.panel > h3.panel-title,
.tab-page h3:first-child {
    font-size: 1.15rem !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Section descriptions — muted text under titles */
.section-desc {
    color: #8892b0;
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Body text */
.frequency-section p,
.frequency-section div,
.presets-section div,
.panel div {
    font-size: 0.85rem;
}

/* Buttons — consistent sizing */
.freq-preset-btn strong { font-size: 0.85rem; }
.freq-preset-btn div { font-size: 0.75rem; }
.preset-card .preset-name { font-size: 0.85rem; }
.preset-card .preset-desc { font-size: 0.7rem; }
.preset-card .preset-freqs { font-size: 0.65rem; }
.audio-btn { font-size: 0.75rem !important; }
.waveform-btn { font-size: 0.8rem; }

/* Session cards */
.session-card div[style*="font-size:1.8rem"] { font-size: 1.5rem !important; }
.session-card div[style*="font-size:0.95rem"] { font-size: 0.85rem !important; }

/* Knowledge base */
.knowledge-btn { font-size: 0.85rem !important; }

/* Section toggle arrows — smaller, cleaner */
.section-toggle::after { font-size: 0.7rem !important; }
