:root { --bg-color: #22252a; --surface-color: #2a2d32; --primary-color: #00aaff; --text-color: #e0e0e0; --text-muted-color: #aaa; --danger-color: #e74c3c; --success-color: #2ecc71; --info-color: #3498db; --border-color: #444; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 20px; display: flex; justify-content: center; }
.app-container { width: 100%; max-width: 1200px; display: flex; flex-direction: column; gap: 20px; }
#start-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); z-index: 1000; display: flex; justify-content: center; align-items: center; text-align: center; cursor: pointer; }
#start-overlay .start-box { border: 2px solid var(--primary-color); padding: 30px 50px; border-radius: 10px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 170, 255, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(0, 170, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 170, 255, 0); } }
#start-overlay h1 { font-size: 3em; color: white; margin: 0; }
#start-overlay p { font-size: 1.2em; color: var(--text-muted-color); margin-top: 10px; }
.app-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 15px; }
.title-section { flex-grow: 1; text-align: center; }
#app-logo { height: 40px; margin-bottom: 10px; }
.title-section h1 { margin: 0; font-size: 2em; }
.title-section p { margin: 5px 0 0 0; color: var(--text-muted-color); font-size: 1.1em; }
.settings-section { align-self: center; }
.header-buttons { display: flex; align-items: center; gap: 10px; }
.settings-section .btn { padding: 12px 20px; }
.freq-display { font-family: 'Courier New', Courier, monospace; font-size: clamp(40px, 10vw, 90px); font-weight: bold; text-align: center; color: var(--primary-color); padding: 10px; }
.btn { padding: 20px; font-size: 1em; font-weight: bold; border: 1px solid var(--border-color); border-radius: 5px; cursor: pointer; transition: transform 0.1s, filter 0.2s; text-align: center; white-space: pre-wrap; line-height: 1.4; color: white; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }
.btn:disabled { background-color: #555 !important; color: #999; cursor: not-allowed; transform: none; filter: brightness(0.7);}
.btn-danger { background-color: var(--danger-color); border-color: var(--danger-color); }
.btn-success { background-color: var(--success-color); border-color: var(--success-color); }
.btn-info { background-color: var(--surface-color); border-color: var(--info-color); }
.button-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.tabs { display: flex; border-bottom: 1px solid var(--border-color); }
.tab-link { padding: 10px 20px; cursor: pointer; background-color: transparent; border: 1px solid transparent; border-bottom: none; color: var(--text-muted-color); font-size: 1em; }
.tab-link.active { color: var(--primary-color); font-weight: bold; border: 1px solid var(--border-color); border-bottom: 1px solid var(--bg-color); border-radius: 5px 5px 0 0; transform: translateY(1px); background-color: var(--bg-color); }
.tab-content { display: none; padding: 20px 0; }
.tab-content.active { display: block; }
.control-frame { display: flex; align-items: center; gap: 15px; padding: 10px 0; }
input[type="range"] { flex-grow: 1; accent-color: var(--primary-color); }
#fade-label { width: 60px; text-align: right; }
.timeline-container { display: flex; align-items: center; gap: 20px; height: 70px; box-sizing: border-box; padding: 10px 0; }
#timeline-canvas { flex-grow: 1; height: 100%; background-color: var(--surface-color); border-radius: 4px; }
.clock-display { font-family: 'Courier New', monospace; font-size: clamp(24px, 5vw, 40px); font-weight: bold; color: #ccc; }
.visualizer-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.vis-box { background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; display: flex; flex-direction: column; aspect-ratio: 1 / 1; }
.vis-title { text-align: center; margin: 0 0 10px 0; color: var(--text-muted-color); font-weight: normal; }
.vis-box canvas { width: 100%; flex-grow: 1; background-color: #000; border-radius: 4px; }

/* -- Custom Fullscreen Overlay Styles -- */
#fullscreen-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 2000; background-color: #000; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 20px; box-sizing: border-box; }
#fullscreen-cymatics-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
#fullscreen-top-container, #fullscreen-bottom-container { position: relative; z-index: 2; width: 100%; max-width: 1200px; }
#fullscreen-top-container .freq-display { color: white; text-shadow: 2px 2px 8px rgba(0,0,0,0.9); }
#fullscreen-bottom-container .timeline-container { background-color: rgba(0,0,0,0.5); padding: 15px; border-radius: 12px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.1); }
#fullscreen-bottom-container .clock-display { color: white; }
#fullscreen-bottom-container #timeline-canvas { background-color: rgba(42, 45, 50, 0.7); }

@media (max-width: 768px) { 
    .visualizer-container { grid-template-columns: 1fr; } 
    .app-header { flex-direction: column; align-items: center; text-align: center; gap: 15px; } 
    .settings-section { width: 100%;} 
    .header-buttons { justify-content: center; width: 100%;} 
}