/*
 * STYLE GUIDE: Terminal Audio
 * Shared design system for Audio Tools Network
 * Theme: Dark mode, electric green accent, clean and functional
 */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --accent: #10b981;
    --bg: #0a0a0a;
    --surface: #111111;
    --surface-raised: #1a1a1a;
    --text: #f0f0f0;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: #262626;
    --border-focus: #404040;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
    overflow: hidden;
}

/* Header */
.page-header {
    padding: 3rem 3rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.header-content h1,
.header-content .site-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.03em;
}

.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-cta-line {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.hero-cta-line kbd {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: var(--surface-raised);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
    font-family: inherit;
    font-size: 0.85em;
    font-weight: 600;
}

.header-badges {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.header-badge i {
    color: var(--primary);
}

/* Mini Navigation */
.mini-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-right: 1px solid var(--border);
    position: relative;
}

.nav-link:last-child {
    border-right: none;
}

.nav-link:hover {
    background: var(--surface);
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    transition: transform 0.2s ease;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Main Controls */
.main-controls {
    padding: 2rem 3rem;
}

/* Presets */
.presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.preset-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.preset-group h3 {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--border);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.preset-btn:hover {
    background: var(--surface-raised);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.preset-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.preset-btn i {
    font-size: 1rem;
    opacity: 0.8;
}

/* BPM Display */
.bpm-display {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.bpm-value-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bpm-adjust-btn {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bpm-adjust-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    transform: scale(1.05);
}

.bpm-adjust-btn:active {
    transform: scale(0.95);
}

.bpm-value-wrapper {
    text-align: center;
}

.bpm-input {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    background: transparent;
    border: none;
    text-align: center;
    width: 180px;
    outline: none;
    font-family: inherit;
    -moz-appearance: textfield;
}

.bpm-input::-webkit-outer-spin-button,
.bpm-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bpm-input:focus {
    color: var(--text);
}

.bpm-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: -0.5rem;
}

.bpm-slider {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

.bpm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.bpm-slider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.bpm-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.bpm-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Beat Indicator */
.beat-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.beat-dot {
    width: 40px;
    height: 40px;
    background: var(--surface-raised);
    border: 2px solid var(--border);
    border-radius: 50%;
    transition: all 0.1s ease;
}

.beat-dot.accent {
    border-color: var(--primary);
}

.beat-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    transform: scale(1.15);
}

.beat-dot.accent.active {
    background: var(--primary);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.8);
    transform: scale(1.25);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.status-badge.ready {
    background: var(--surface-raised);
    border-color: var(--border);
    color: var(--text-secondary);
}

.status-badge.ready .status-icon {
    color: var(--text-muted);
}

.status-badge.playing {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.status-badge.playing .status-icon {
    color: var(--primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.primary-btn {
    flex: 2;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 1.125rem 2rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.primary-btn.playing {
    background: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6); }
}

.primary-btn.playing:hover {
    background: #dc2626;
}

.secondary-btn {
    flex: 1;
    background: var(--surface-raised);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 1.125rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.secondary-btn:active {
    transform: scale(0.98);
    background: var(--primary);
    color: #000;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding: 0 3rem 2rem;
}

.control-group {
    background: var(--surface);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.control-group h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--surface-raised);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.control-group label {
    display: block;
    font-weight: 500;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.control-group label:first-of-type {
    margin-top: 0;
}

.control-group input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    margin: 0.5rem 0;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.control-group .value {
    display: block;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Sound Buttons */
.sound-buttons,
.subdivision-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sound-btn,
.subdivision-btn {
    padding: 0.625rem 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.sound-btn:hover,
.subdivision-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sound-btn.active,
.subdivision-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.note-icon {
    font-size: 1rem;
    font-weight: 700;
}

/* Accent Toggle */
.accent-toggle {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.accent-toggle label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
    color: var(--text);
    font-weight: 500;
}

.accent-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.accent-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary);
}

.accent-toggle input[type="checkbox"]:checked + .toggle-slider::after {
    left: 22px;
    background: #000;
}

/* Content Section */
.content-section {
    padding: 3rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.content-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.content-article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-article p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.info-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.info-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card h4 i {
    font-size: 1.125rem;
}

.info-card p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.noise-specs {
    font-size: 0.8125rem !important;
    color: var(--text-muted) !important;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem !important;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.feature-list li strong {
    color: var(--text);
    font-weight: 600;
}

/* Math/Algorithm Section Styles */
.math-block {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
}

.math-block code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 1.25rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.math-block.small {
    padding: 0.75rem;
    margin: 0.75rem 0;
}

.math-block.small code {
    font-size: 1rem;
}

.math-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.algorithm-card {
    background: var(--surface-raised);
}

.algorithm-card h4 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* Ad Section - Tasteful, minimal ad placement */
.ad-section {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.ad-container {
    text-align: center;
    max-width: 400px;
}

.ad-container [data-ea-publisher] {
    margin: 0 auto;
}

.ad-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* Affiliate disclosure styling */
.affiliate-disclosure {
    font-size: 0.6875rem;
    color: #475569;
    margin-top: 0.5rem;
}

.disclosure-link {
    color: #64748b;
    text-decoration: underline;
}

.disclosure-link:hover {
    color: var(--primary);
}

/* Recommended Gear - Affiliate Links */
.recommended-gear {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.recommended-gear h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommended-gear > p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.recommended-gear ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-gear li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.recommended-gear li:last-child {
    border-bottom: none;
}

.recommended-gear a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.recommended-gear a:hover {
    color: var(--primary);
}

.recommended-gear .gear-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 2.5rem 3rem;
    border-bottom: 1px solid #334155;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-links h4,
.footer-related h4 {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f1f5f9;
    margin-bottom: 0.875rem;
}

.footer-links a,
.footer-related a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8125rem;
    padding: 0.375rem 0;
    transition: all 0.2s ease;
}

.footer-links a:hover,
.footer-related a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-bottom {
    padding: 1.25rem 3rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        border-radius: 0;
        box-shadow: none;
    }

    .page-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .header-content h1,
.header-content .site-title {
        font-size: 1.75rem;
    }

    .mini-nav {
        flex-direction: column;
    }

    .nav-link {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.875rem 1.5rem;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .main-controls {
        padding: 1.5rem;
    }

    .presets {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bpm-display {
        padding: 1.5rem;
    }

    .bpm-input {
        font-size: 3rem;
        width: 140px;
    }

    .bpm-value-container {
        gap: 1rem;
    }

    .beat-indicator {
        gap: 0.5rem;
        padding: 1rem;
    }

    .beat-dot {
        width: 32px;
        height: 32px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .controls {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 1.5rem;
    }

    .content-section {
        padding: 2rem 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    .footer-bottom {
        padding: 1rem 1.5rem;
    }

    .practice-tools-grid {
        grid-template-columns: 1fr;
    }

    .setlist-add {
        flex-direction: column;
    }

    .shortcuts-hint {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .fullscreen-bpm {
        font-size: 6rem;
    }

    .fullscreen-beat-dot {
        width: 40px;
        height: 40px;
    }
}

/* ==================== NEW FEATURES STYLES ==================== */

/* Keyboard Shortcuts Hint */
.shortcuts-hint {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.shortcuts-hint span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.shortcuts-hint kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.section-title i {
    color: var(--primary);
}

.section-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Practice Tools Section */
.practice-tools-section {
    padding: 2rem 3rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.practice-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.practice-tool-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tool-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.tool-header h3 i {
    color: var(--primary);
}

.tool-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Toggle Switch Small */
.toggle-switch {
    position: relative;
    display: inline-block;
}

.toggle-switch input {
    display: none;
}

.toggle-slider-sm {
    display: inline-block;
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-slider-sm::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider-sm {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider-sm::after {
    left: 20px;
    background: #000;
}

/* Tool Panel */
.tool-panel {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.tool-panel.active {
    display: block;
}

.tool-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tool-row label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.tool-row input[type="number"],
.tool-row select {
    width: 100px;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    text-align: right;
}

.tool-row input[type="number"]:focus,
.tool-row select:focus {
    outline: none;
    border-color: var(--primary);
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tool-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.tool-btn.primary:hover {
    background: var(--primary-dark);
}

.tool-btn.danger {
    color: #ef4444;
}

.tool-btn.danger:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Trainer Progress */
.trainer-progress {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0 0.5rem;
}

.trainer-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}

.trainer-current {
    font-size: 0.8125rem;
    color: var(--primary);
    text-align: center;
    font-weight: 500;
}

/* Timer Display */
.timer-display-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 1rem 0;
    font-variant-numeric: tabular-nums;
}

.timer-display-large.complete {
    color: #10b981;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Muted Beats Status */
.muted-beats-status {
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-top: 0.75rem;
}

.muted-beats-status.silent {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Stats Card */
.stats-card .tool-header {
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Setlist Section */
.setlist-section {
    padding: 2rem 3rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.setlist-add {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.song-name-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
}

.song-name-input:focus {
    outline: none;
    border-color: var(--primary);
}

.song-name-input::placeholder {
    color: var(--text-muted);
}

.setlist-items {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.setlist-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.setlist-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

.setlist-item:last-child {
    border-bottom: none;
}

.setlist-item:hover {
    background: var(--surface);
}

.setlist-item.active {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--primary);
}

.setlist-item-info {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setlist-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--surface);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.setlist-item.active .setlist-number {
    background: var(--primary);
    color: #000;
}

.setlist-name {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.setlist-details {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.setlist-delete {
    padding: 0.375rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.setlist-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.setlist-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Fullscreen Overlay */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-overlay.active {
    display: flex;
}

.fullscreen-content {
    text-align: center;
    padding: 2rem;
}

.fullscreen-bpm {
    font-size: 12rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.fullscreen-bpm-label {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
}

.fullscreen-beats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.fullscreen-beat-dot {
    width: 60px;
    height: 60px;
    background: var(--surface-raised);
    border: 3px solid var(--border);
    border-radius: 50%;
    transition: all 0.1s ease;
}

.fullscreen-beat-dot.accent {
    border-color: var(--primary);
}

.fullscreen-beat-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
    transform: scale(1.2);
}

.fullscreen-beat-dot.accent.active {
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.8);
    transform: scale(1.3);
}

.fullscreen-timer {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.fullscreen-status {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.fullscreen-status.playing {
    color: var(--primary);
}

.fullscreen-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.fullscreen-play-btn {
    padding: 1rem 2.5rem;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fullscreen-play-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.fullscreen-exit-btn {
    padding: 1rem 2rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fullscreen-exit-btn:hover {
    border-color: var(--text-secondary);
}

.fullscreen-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.fullscreen-hint kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    margin: 0 0.25rem;
}

/* Fullscreen Button in Main UI */
.fullscreen-btn {
    flex: 0.5;
}

/* Workout BPM Table */
.workout-bpm-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.workout-bpm-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border-radius: 8px;
    overflow: hidden;
}

.workout-bpm-table th,
.workout-bpm-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.workout-bpm-table th {
    background: var(--surface);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.workout-bpm-table td {
    font-size: 0.875rem;
    color: var(--text);
}

.workout-bpm-table tr:last-child td {
    border-bottom: none;
}

.workout-bpm-table tr:hover td {
    background: var(--surface);
}

/* Song List in Educational Content */
.song-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.song-list li {
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.song-list li:last-child {
    border-bottom: none;
}

/* Practice Session Structure */
.session-structure {
    margin: 1.5rem 0;
}

.session-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.session-item:last-child {
    margin-bottom: 0;
}

.session-time {
    flex-shrink: 0;
    width: 80px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.session-activity {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.session-activity strong {
    color: var(--text);
}

/* ==================== CONTENT PAGE STYLES ==================== */

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dropdown .dropdown-trigger::after {
    display: none;
}

.nav-dropdown .dropdown-arrow {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--border);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--surface-raised);
    color: var(--primary);
}

.dropdown-menu a.active {
    background: var(--surface-raised);
    color: var(--primary);
}

.dropdown-menu a i {
    font-size: 1.125rem;
    color: var(--primary);
    opacity: 0.7;
}

.dropdown-menu a:hover i {
    opacity: 1;
}

/* Research/Science Page Styles */
.research-hero {
    padding: 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.research-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.research-hero .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.research-content {
    padding: 3rem;
}

.research-section {
    margin-bottom: 4rem;
}

.research-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.research-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.research-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.research-section strong {
    color: var(--text);
    font-weight: 600;
}

/* Research Table */
.research-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.research-table th,
.research-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.research-table th {
    background: var(--surface-raised);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.research-table td {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.research-table tr:last-child td {
    border-bottom: none;
}

.research-table tr:hover td {
    background: var(--surface-raised);
}

/* Key Findings Box */
.key-findings {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.key-findings h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-findings ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-findings li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.key-findings li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Disclaimer Box */
.disclaimer-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.disclaimer-box i {
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.disclaimer-box p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Application Cards Grid */
.application-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.application-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.application-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.application-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.application-card h4 i {
    color: var(--primary);
    font-size: 1.25rem;
}

.application-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.application-card ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.application-card li {
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.application-card li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Traditions/Spiritual Content Styles */
.tradition-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    transition: all 0.2s ease;
}

.tradition-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.tradition-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tradition-card h4 .tradition-icon {
    font-size: 1.5rem;
}

.tradition-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.tradition-card p:last-child {
    margin-bottom: 0;
}

.tradition-quote {
    font-style: italic;
    padding: 1rem 1.5rem;
    background: var(--surface-raised);
    border-left: 3px solid var(--primary);
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.tradition-quote p {
    margin-bottom: 0;
}

.tradition-quote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* FAQ Styles */
.faq-container {
    padding: 3rem;
}

.faq-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.faq-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.faq-section {
    margin-bottom: 3rem;
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--border-focus);
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-raised);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.open .faq-answer {
    padding: 1.25rem 1.5rem;
    max-height: 1000px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.faq-answer p + p {
    margin-top: 1rem;
}

/* Cross-link boxes */
.cross-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.cross-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cross-link-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cross-link-card i {
    font-size: 1.5rem;
    color: var(--primary);
}

.cross-link-card .link-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.25rem 0;
}

.cross-link-card .link-content p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* References Section */
.references {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.reference-list {
    list-style: none;
    counter-reset: reference-counter;
    padding: 0;
    margin: 0;
}

.reference-list li {
    counter-increment: reference-counter;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.reference-list li:last-child {
    margin-bottom: 0;
}

.reference-list li::before {
    content: "[" counter(reference-counter) "]";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--primary);
}

.reference-list li em {
    font-style: italic;
}

/* Responsive Content Pages */
@media (max-width: 768px) {
    .research-hero,
    .research-content,
    .faq-container {
        padding: 1.5rem;
    }

    .research-hero h1,
    .faq-hero h1 {
        font-size: 1.75rem;
    }

    .research-table {
        font-size: 0.875rem;
    }

    .research-table th,
    .research-table td {
        padding: 0.75rem;
    }

    .application-grid {
        grid-template-columns: 1fr;
    }

    .cross-links {
        grid-template-columns: 1fr;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown .dropdown-trigger {
        width: 100%;
        justify-content: center;
        border-bottom: 1px solid var(--border);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        display: none;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        justify-content: center;
        background: var(--surface-raised);
    }
}

/* ===== Use-case pages (ported from noise-generator) ===== */
.use-case-container {
    padding: 0;
}

.use-case-hero {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-raised) 100%);
    border-bottom: 1px solid var(--border);
}

.use-case-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.cta-button i {
    font-size: 1.25rem;
}

.use-case-section {
    padding: 3rem;
    border-bottom: 1px solid var(--border);
}

.use-case-section:last-of-type {
    border-bottom: none;
}

.use-case-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.use-case-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.use-case-section p strong {
    color: var(--text);
    font-weight: 600;
}

/* Benefit Grid */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.benefit-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.benefit-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.benefit-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Tips List */
.tips-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.tips-list li {
    padding: 0.875rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.7;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.tips-list li strong {
    color: var(--text);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem;
    background: var(--surface-raised);
    border-top: 1px solid var(--border);
}

.cta-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.cta-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive for use-case pages */
@media (max-width: 768px) {
    .use-case-hero {
        padding: 2rem 1.5rem;
    }

    .use-case-hero h1 {
        font-size: 1.75rem;
    }

    .use-case-section {
        padding: 2rem 1.5rem;
    }

    .benefit-grid {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }
}

/* ==================== Engagement: Share bar & Network tools ==================== */
.share-bar{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:1.5rem 0;}
.share-label{font-size:.8125rem;font-weight:600;color:var(--text-secondary);margin-right:.25rem;}
.share-btn{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .8rem;font-size:.8125rem;font-weight:600;
  color:var(--text-secondary);background:var(--surface-raised,#1a1a1a);border:1px solid var(--border,#262626);
  border-radius:8px;text-decoration:none;cursor:pointer;transition:all .15s ease;}
.share-btn:hover{color:var(--primary);border-color:var(--primary);}
.network-tools{margin:3rem 0 1rem;}
.network-tools h2{font-size:1.25rem;margin-bottom:1rem;}
.network-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;}
.network-card{display:flex;flex-direction:column;gap:.25rem;padding:1rem;background:var(--surface-raised,#1a1a1a);
  border:1px solid var(--border,#262626);border-radius:12px;text-decoration:none;transition:all .15s ease;}
.network-card:hover{border-color:var(--primary);transform:translateY(-2px);}
.network-card i{color:var(--primary);font-size:1.4rem;}
.nt-name{font-weight:700;color:var(--text);}
.nt-blurb{font-size:.8125rem;color:var(--text-secondary);}

/* ===== Heartbeat visual + sleep timer ===== */
.heart-visual{display:flex;justify-content:center;align-items:center;margin:1.5rem 0 0.5rem;}
.heart-pulse{font-size:5.5rem;line-height:1;color:var(--primary-dark,#059669);opacity:.55;
  transition:color .3s ease,opacity .3s ease;will-change:transform;}
.heart-pulse.active{color:var(--primary,#10b981);opacity:1;}
.heart-pulse i{display:block;}
@keyframes hb-lub{0%{transform:scale(1)}18%{transform:scale(1.18)}100%{transform:scale(1)}}
@keyframes hb-dub{0%{transform:scale(1)}18%{transform:scale(1.09)}100%{transform:scale(1)}}
.heart-pulse.beat-lub{animation:hb-lub .42s ease-out;}
.heart-pulse.beat-dub{animation:hb-dub .34s ease-out;}
@media (prefers-reduced-motion: reduce){
  .heart-pulse.beat-lub,.heart-pulse.beat-dub{animation:none;}
}
.sleep-timer-buttons{flex-wrap:wrap;}
.timer-status{margin-top:.85rem;font-size:.9rem;color:var(--text-secondary,#a3a3a3);
  font-weight:600;text-align:center;}


/* === DESIGN SYSTEM V2 === */
/* ============================================================
   Audio Tools Network — Design System v2 — HEARTBEAT SOUND
   Mood: tender, warm, maternal. Dim rose/blush night palette for
   2am one-handed crib-side use. Fraunces display serif + Inter UI.
   Strategy: (1) per-site PALETTE via token overrides = distinct
   identity; (2) shared ELEVATION layer = world-class bar.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Heartbeat palette: warm dim rose / blush over a womb-dark base ---- */
:root {
  --primary: #E8849B;
  --primary-dark: #C75F7C;
  --primary-light: #F6D1DA;
  --accent: #F4B6A6;
  --bg: #1A1014;
  --surface: #2A1A21;
  --surface-raised: #341F28;
  --text: #F7E9EE;
  --text-secondary: #D5AEB9;
  --text-muted: #9C7884;
  --border: #3A222C;
  --border-focus: #4E2E3B;
  --grad: linear-gradient(125deg, #F4B6A6 0%, #E8849B 50%, #C75F7C 110%);
  --glow: 0 0 0 1px rgba(232,132,155,.16), 0 22px 60px -16px rgba(232,132,155,.40);
  --shadow-lg: 0 26px 64px -20px rgba(0,0,0,.80), 0 8px 26px -14px rgba(0,0,0,.6);
}

/* ---- Ambient background: warm womb-glow depth, never flat black ---- */
body {
  background:
    radial-gradient(1100px 640px at 50% -12%, rgba(232,132,155,.22), transparent 60%),
    radial-gradient(820px 560px at 88% 10%, rgba(244,182,166,.13), transparent 58%),
    radial-gradient(760px 620px at 12% 108%, rgba(199,95,124,.14), transparent 60%),
    var(--bg) !important;
  background-attachment: fixed;
  color: var(--text);
}

/* ---- Container: soft glassy hairline card with a gentle rose lift ---- */
.container {
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 26px;
  box-shadow: var(--shadow-lg), var(--glow);
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 260px),
    var(--surface);
}

/* ---- Hero: Fraunces serif wordmark with gradient clip ---- */
.page-header { padding: 3.75rem 3rem 2.5rem; }
.header-content h1,
.header-content .site-title {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-size: clamp(2.7rem, 5.2vw, 3.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.14rem;
  color: var(--text-secondary);
  max-width: 54ch;
  margin: 0.9rem auto 0;
  line-height: 1.55;
}
.hero-cta-line { color: var(--text-secondary); }
.hero-cta-line kbd {
  background: var(--surface-raised);
  border: 1px solid var(--border);
}
.page-header::after { height: 3px; background: var(--grad); opacity: .85; }

/* ---- Badges: soft glass pills ---- */
.header-badge {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 2rem;
  backdrop-filter: blur(6px);
  color: var(--text-secondary);
  transition: transform .22s ease, border-color .22s ease;
}
.header-badge:hover { transform: translateY(-1px); border-color: rgba(232,132,155,.42); }
.header-badge i { color: var(--accent); }

/* ---- Nav: animated active underline ---- */
.nav-link { transition: color .2s ease, background .2s ease; position: relative; }
.nav-link::after {
  content: ''; position: absolute; left: 1.5rem; right: 1.5rem; bottom: 0;
  height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .24s ease;
}
.nav-link:hover { color: var(--text); background: rgba(232,132,155,.06); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); }

/* ---- Primary actions: warm gradient pill with glow + soft lift ---- */
button.btn-primary, .btn-primary, .play-btn, .play-button, button[class*="play"],
.generate-btn, .primary-btn, .btn--primary {
  background: var(--grad) !important;
  border: none !important;
  color: #2A0E16 !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 34px -10px rgba(232,132,155,.62), inset 0 1px 0 rgba(255,255,255,.40) !important;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}
button.btn-primary:hover, .btn-primary:hover, .play-btn:hover, .play-button:hover,
button[class*="play"]:hover, .generate-btn:hover, .primary-btn:hover, .btn--primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 18px 46px -10px rgba(232,132,155,.78), inset 0 1px 0 rgba(255,255,255,.5) !important;
  filter: saturate(1.06) !important;
}

/* ---- The breathing pulse orb: the brand's heart, gently alive ---- */
@keyframes hb-pulse {
  0%   { transform: scale(1);     box-shadow: 0 0 0 0 rgba(232,132,155,.45), 0 12px 40px -8px rgba(232,132,155,.5); }
  18%  { transform: scale(1.045); box-shadow: 0 0 0 18px rgba(232,132,155,0), 0 14px 44px -8px rgba(232,132,155,.6); }
  34%  { transform: scale(1.012); }
  50%  { transform: scale(1.05);  box-shadow: 0 0 0 26px rgba(232,132,155,0), 0 16px 48px -8px rgba(232,132,155,.62); }
  100% { transform: scale(1);     box-shadow: 0 0 0 0 rgba(232,132,155,0), 0 12px 40px -8px rgba(232,132,155,.5); }
}
.play-btn, .play-button, button[class*="play"], .pulse-orb, .orb {
  animation: hb-pulse 1.85s ease-in-out infinite;
}
.play-btn:hover, .play-button:hover, button[class*="play"]:hover {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .play-btn, .play-button, button[class*="play"], .pulse-orb, .orb { animation: none; }
}

/* ---- Inputs / sliders / cards: tuned to the warm system ---- */
input, select, textarea { border-radius: 12px !important; }
input[type="range"] { accent-color: var(--primary); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(232,132,155,.18) !important;
}
.preset-btn, .card, .panel, .tool-card, .feature-card, .network-card {
  border-radius: 18px !important;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.network-card:hover, .tool-card:hover, .card:hover, .feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232,132,155,.38);
  box-shadow: 0 18px 40px -18px rgba(232,132,155,.5);
}

/* ---- Footer: rescue the hardcoded slate-navy into warm night ---- */
.site-footer {
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(232,132,155,.10), transparent 62%),
    #20131A !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border);
}
.footer-content { border-bottom-color: rgba(255,255,255,.06) !important; }
.footer-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.footer-brand p { color: var(--text-muted) !important; }
.footer-links h4, .footer-related h4 { color: var(--text) !important; }
.footer-links a, .footer-related a { color: var(--text-secondary) !important; }
.footer-links a:hover, .footer-related a:hover { color: var(--accent) !important; }
.footer-bottom { border-top-color: rgba(255,255,255,.06) !important; }
.footer-bottom p, .footer-bottom a { color: var(--text-muted) !important; }

/* ---- Section accents ---- */
h2 { letter-spacing: -0.01em; font-family: 'Fraunces', Georgia, serif; font-weight: 600; }
a { color: var(--primary-light); }
a:hover { color: var(--accent); }
::selection { background: rgba(232,132,155,.38); color: #fff; }

/* ---- The heart orb itself: give the brand mark a warm glow ---- */
.heartbeat-orb, .pulse-orb, .heart-icon, [class*="orb"] svg, [class*="heart"] svg {
  filter: drop-shadow(0 6px 22px rgba(232,132,155,.45));
}


/* === FOLD FIX + FLOATING PLAY === */
/* ============================================================
   FOLD FIX — bring the tool's primary control above the fold.
   Compacts the hero + collapses the mini-nav into one scroll row.
   Appended after DESIGN SYSTEM V2. CSS-only, fleet-wide.
   ============================================================ */

/* --- Desktop: gently tighten the top so the tool sits higher --- */
body { padding-top: 1rem; padding-bottom: 1rem; }
.page-header { padding: 2rem 3rem 1.5rem !important; }
.header-content h1,
.header-content .site-title { font-size: clamp(2.1rem, 4vw, 2.9rem) !important; }
.tagline { font-size: 1rem !important; margin-top: 0.6rem !important; }
.header-badges { margin-top: 0.85rem !important; }

/* mini-nav: never let it grow tall; keep it one tidy row */
.mini-nav { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mini-nav::-webkit-scrollbar { display: none; }
.nav-link { padding-top: 0.8rem !important; padding-bottom: 0.8rem !important; white-space: nowrap; }

/* --- Mobile: aggressive compaction (the real problem) --- */
@media (max-width: 640px) {
  body { padding: 0.5rem !important; }
  .page-header { padding: 1.25rem 1rem 1rem !important; }
  .header-content h1,
  .header-content .site-title { font-size: clamp(1.9rem, 8vw, 2.3rem) !important; line-height: 1.05 !important; }
  .tagline {
    font-size: 0.9rem !important; line-height: 1.4 !important; margin-top: 0.5rem !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  /* badges are decorative — drop them above the fold on phones */
  .header-badges { display: none !important; }

  /* mini-nav: the big win — collapse the 6-row vertical stack into ONE horizontal scroll strip */
  .mini-nav {
    flex-direction: row !important; flex-wrap: nowrap !important;
    justify-content: flex-start !important; align-items: stretch !important;
  }
  .nav-link {
    flex: 0 0 auto !important; width: auto !important;
    padding: 0.7rem 1rem !important; font-size: 0.8125rem !important;
    border-right: 1px solid var(--border) !important; border-bottom: none !important;
  }
  .nav-dropdown { flex: 0 0 auto !important; }
  .nav-dropdown .dropdown-trigger { width: auto !important; }

  /* lift the tool: trim the first section's top padding so Play rises */
  .page-header::after { height: 2px !important; }
  main > section:first-of-type,
  .tool, .tool-section, .generator, .generator-section,
  #generator, #tool, .controls-section { padding-top: 1rem !important; margin-top: 0 !important; }
}

/* === FLOATING PLAY (always-available primary control) === */
#floating-play{
  position:fixed; left:50%; bottom:20px; transform:translateX(-50%) translateY(140%);
  z-index:9999; display:inline-flex; align-items:center; gap:.55rem;
  padding:.85rem 1.7rem; border:none; border-radius:999px; cursor:pointer;
  font:700 1rem/1 'Inter',-apple-system,sans-serif; color:#140a1e;
  background:var(--grad, var(--primary));
  box-shadow:0 14px 34px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.4);
  opacity:0; pointer-events:none;
  transition:transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s, filter .15s;
}
#floating-play.visible{ transform:translateX(-50%) translateY(0); opacity:1; pointer-events:auto; }
#floating-play:hover{ filter:saturate(1.1) brightness(1.06); }
#floating-play:active{ transform:translateX(-50%) translateY(1px); }
#floating-play .fp-icon{ font-size:1.05em; line-height:1; }
#floating-play.is-playing{ background:#23232b; color:#fff; box-shadow:0 14px 34px -8px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.14); }
@media (max-width:640px){ #floating-play{ bottom:16px; padding:.8rem 1.5rem; } }
@media (prefers-reduced-motion: reduce){ #floating-play{ transition:opacity .2s; } }
