/* ZYZ DYNAMICS Frequency Lab Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Navigation */
.site-nav {
    border-bottom: 1px solid #222;
    padding: 20px 0;
    margin-bottom: 40px;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a.current {
    color: #fff;
}

/* Main Header */
header {
    text-align: center;
    margin-bottom: 60px;
}

.logo {
    font-size: 5em;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 20px;
    color: #fff;
}

.tagline {
    font-size: 1.8em;
    font-weight: 300;
    color: #ccc;
    letter-spacing: 2px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #fff;
}

.tool-subtitle {
    font-size: 1.2em;
    color: #999;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .logo {
        font-size: 3em;
        letter-spacing: 4px;
    }

    .tagline {
        font-size: 1.3em;
    }

    .tool-header h1 {
        font-size: 2em;
    }
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 25px;
}

.safety-notice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff4444aa 0%, #ff6666aa 100%);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #ff4444;
}

/* Main Interface */
.frequency-interface {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Master Controls */
.master-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: #111;
    border-radius: 15px;
    border: 1px solid #222;
}

.control-group {
    display: flex;
    gap: 15px;
}

.play-button, .stop-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.play-button {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #000;
}

.play-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

.play-button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.stop-button {
    background: linear-gradient(135deg, #ff4444 0%, #cc3333 100%);
    color: #fff;
}

.stop-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.3);
}

.stop-button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-control label {
    font-weight: 500;
    color: #ccc;
}

.volume-control input[type="range"] {
    width: 150px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

.volume-value {
    min-width: 35px;
    font-weight: 600;
    color: #00ff88;
}

/* Generator Modes */
.generator-modes {
    text-align: center;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 25px;
    border: 1px solid #333;
    background: #111;
    color: #888;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.mode-btn:hover, .mode-btn.active {
    background: #222;
    color: #fff;
    border-color: #555;
}

/* Generator Mode Sections */
.generator-mode {
    display: none;
    padding: 30px;
    background: #111;
    border-radius: 15px;
    border: 1px solid #222;
}

.generator-mode.active {
    display: block;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* Control Groups */
.frequency-control, .base-frequency-control, .beat-frequency-control, .waveform-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.frequency-control label, .base-frequency-control label, .beat-frequency-control label, .waveform-control label {
    font-weight: 600;
    color: #ccc;
    margin-bottom: 5px;
}

/* Range Inputs */
input[type="range"] {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0, 255, 136, 0.4);
}

/* Number Inputs */
input[type="number"] {
    padding: 12px 15px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    width: 120px;
}

input[type="number"]:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

/* Select Inputs */
select {
    padding: 12px 15px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #00ff88;
}

/* Binaural Beats Specific */
.brainwave-indicator {
    padding: 10px 15px;
    background: #222;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #00ff88;
    text-align: center;
    margin-top: 10px;
}

.binaural-presets h3, .noise-types h3, .sacred-frequencies h3 {
    margin-bottom: 20px;
    color: #ccc;
    font-weight: 600;
}

.preset-buttons, .noise-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-btn, .noise-btn {
    padding: 10px 20px;
    background: #222;
    border: 1px solid #333;
    border-radius: 20px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.preset-btn:hover, .noise-btn:hover, .noise-btn.active {
    background: #333;
    color: #fff;
    border-color: #555;
}

/* Noise Generator */
.noise-description {
    margin-top: 20px;
    padding: 15px;
    background: #222;
    border-radius: 8px;
    color: #ccc;
    font-style: italic;
}

/* Sacred Frequencies */
.sacred-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.sacred-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #222;
    border: 1px solid #333;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.sacred-btn:hover {
    background: #333;
    border-color: #555;
    transform: translateY(-2px);
}

.freq-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 5px;
}

.freq-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.freq-desc {
    font-size: 0.85rem;
    color: #888;
}

/* Visual Feedback */
.visual-feedback {
    background: #111;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #222;
}

.oscilloscope-container h3 {
    margin-bottom: 20px;
    color: #ccc;
    font-weight: 600;
    text-align: center;
}

#oscilloscope {
    width: 100%;
    max-width: 600px;
    height: 200px;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.frequency-readout {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #00ff88;
}

/* Duration Controls */
.duration-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-duration {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #222;
    border-radius: 8px;
    border: 1px solid #333;
}

.custom-duration input[type="number"] {
    width: 60px;
    padding: 8px 10px;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-family: inherit;
    text-align: center;
}

.custom-duration span {
    color: #888;
    font-weight: bold;
}

#apply-custom-duration {
    padding: 8px 15px;
    background: #00ff88;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

#apply-custom-duration:hover {
    background: #00cc66;
}

/* Base Frequency Education */
.frequency-info {
    margin-bottom: 10px;
}

.info-text {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.base-frequency-presets {
    margin-top: 15px;
}

.base-frequency-presets h4 {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 600;
}

.base-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.base-preset-btn {
    padding: 6px 12px;
    background: #222;
    border: 1px solid #333;
    border-radius: 15px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.8rem;
}

.base-preset-btn:hover, .base-preset-btn.active {
    background: #333;
    color: #00ff88;
    border-color: #00ff88;
}

/* Isochronic Tones Specific */
.carrier-frequency-control, .pulse-frequency-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carrier-frequency-presets {
    margin-top: 15px;
}

.carrier-frequency-presets h4 {
    margin-bottom: 10px;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 600;
}

.carrier-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.carrier-preset-btn {
    padding: 6px 12px;
    background: #222;
    border: 1px solid #333;
    border-radius: 15px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.8rem;
}

.carrier-preset-btn:hover, .carrier-preset-btn.active {
    background: #333;
    color: #00ff88;
    border-color: #00ff88;
}

.isochronic-presets {
    margin-top: 25px;
}

.isochronic-presets h3 {
    margin-bottom: 15px;
    color: #ccc;
    font-weight: 600;
}

.iso-preset-btn {
    padding: 10px 20px;
    background: #222;
    border: 1px solid #333;
    border-radius: 20px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    margin: 5px;
}

.iso-preset-btn:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}

.isochronic-info {
    margin-top: 25px;
    padding: 20px;
    background: #222;
    border-radius: 10px;
    border-left: 4px solid #00ff88;
}

.isochronic-info h4 {
    margin-bottom: 10px;
    color: #00ff88;
    font-weight: 600;
}

.isochronic-info p {
    color: #ccc;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Sacred Frequency Selection Indicator */
.current-sacred-selection {
    margin-bottom: 25px;
    padding: 20px;
    background: #222;
    border-radius: 10px;
    border: 2px solid #00ff88;
}

.current-label {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.current-sacred-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.current-freq {
    font-size: 2rem;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.current-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.current-desc {
    font-size: 0.95rem;
    color: #ccc;
}

.sacred-btn.selected {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

/* Utilities */
.utilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 30px;
    background: #111;
    border-radius: 15px;
    border: 1px solid #222;
}

.timer-control, .export-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.timer-control label, .export-controls label {
    font-weight: 600;
    color: #ccc;
}

.time-remaining {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00ff88;
    min-height: 1.5em;
}

.export-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4488ff 0%, #3366cc 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.export-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(68, 136, 255, 0.3);
}

.export-button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #222;
    color: #666;
    font-size: 0.9rem;
}

.footer-logo {
    width: 30px;
    height: 30px;
    filter: invert(0.4);
    opacity: 0.6;
    margin: 0 auto 15px;
    display: block;
}

footer a {
    color: #888;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .master-controls {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .volume-control {
        justify-content: center;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .mode-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .preset-buttons, .noise-buttons {
        justify-content: center;
    }
    
    .sacred-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Animation for active elements */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.generator-mode.active .freq-value {
    animation: pulse 2s infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}