/* --- SYNTHLY THEME VARIABLES --- */
:root {
    --bg-deep-black: #000000;
    --bg-dark-gray: #0a0a0c;
    --text-pure-white: #ffffff;
    --text-muted: #888888;
    
    --accent-orange: #ff6600;
    --accent-gold: #ffcc00;
    --accent-muted: #b84a00;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    
    --font-stack: 'Inter', sans-serif;
}

/* --- RESET & BASIC STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-stack); background-color: var(--bg-deep-black); color: var(--text-pure-white); overflow-x: hidden; min-height: 100dvh; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.5px; }
p { color: var(--text-muted); line-height: 1.5; }

/* --- BACKGROUND TOPOLOGY --- */
.waveform-bg-container { position: fixed; inset: 0; z-index: -1; background: var(--bg-deep-black); transform: translateZ(0); }
.waveform { position: absolute; bottom: -10%; left: 0; width: 100%; height: 120%; background-image: repeating-radial-gradient(circle at 50% 100%, transparent, transparent 60px, rgba(255, 102, 0, 0.08) 62px, rgba(255, 102, 0, 0.08) 100px); opacity: 0.3; transform-origin: bottom center; }

/* --- MOBILE-FIRST LAYOUT --- */
.app-dashboard { display: flex; flex-direction: column; min-height: 100dvh; position: relative; }
.mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--glass-border); }
.brand-container { display: flex; align-items: center; gap: 8px; }
.brand-logo { height: 28px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.2rem; }
.accent-dot { color: var(--accent-orange); }
.status-dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block;}
.status-dot.online { background-color: #00ff88; box-shadow: 0 0 8px #00ff88; }
.desktop-brand-container, .user-profile-desktop { display: none; }

.main-content { flex: 1; padding: 1rem; padding-bottom: 90px; display: flex; flex-direction: column; gap: 1.5rem; }
.glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); padding: 1.25rem; }

.studio-section { display: flex; flex-direction: column; gap: 1rem; }
.hero-layout .tagline { font-size: 0.7rem; font-weight: 800; color: var(--accent-orange); letter-spacing: 1px; display: block; margin-bottom: 0.5rem;}
.hero-layout .main-title { font-size: 2rem; line-height: 1.1; margin-bottom: 0.5rem; }
.hero-layout .sub-title { font-size: 0.9rem; }
.gradient-text { background: linear-gradient(135deg, var(--accent-orange), var(--accent-gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.control-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.control-header h2 { font-size: 1.2rem; }
.model-badge { background: var(--accent-orange); color: #000; font-size: 0.65rem; font-weight: 800; padding: 4px 8px; border-radius: 12px; }

.input-group { margin-bottom: 1.2rem; }
.input-group label { display: block; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.4rem; }
.input-group textarea { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: 12px; color: var(--text-pure-white); padding: 1rem; font-family: var(--font-stack); font-size: 16px; resize: none; height: 80px; }
.input-group textarea.lyrics-input { height: 120px; }

/* NEW: Segmented Control Styles */
.mode-toggles { display: flex; background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); border-radius: 12px; padding: 4px; gap: 4px; }
.mode-toggles label { flex: 1; cursor: pointer; text-align: center; margin: 0; }
.mode-toggles input[type="radio"] { display: none; }
.mode-toggles span { display: block; padding: 12px 5px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); transition: all 0.2s ease; }
.mode-toggles input[type="radio"]:checked + span { background: var(--accent-orange); color: var(--bg-deep-black); }

.cta-button { width: 100%; font-family: var(--font-stack); border: none; border-radius: 12px; font-weight: 800; font-size: 1rem; height: 56px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.primary-cta { background: var(--text-pure-white); color: var(--bg-deep-black); }
.secondary-cta { background: linear-gradient(135deg, var(--accent-orange), var(--accent-muted)); color: #fff; margin-top: 1rem; }

.gallery-section { display: flex; flex-direction: column; width: 100%; }
.gallery-section h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.gallery-grid { display: flex; flex-direction: column; gap: 1rem; }
.music-card { display: flex; flex-direction: column; gap: 1rem; width: 100%;}
.music-card .waveform-viz { height: 80px; background: repeating-linear-gradient(90deg, var(--bg-dark-gray), var(--bg-dark-gray) 4px, var(--glass-border) 5px, var(--glass-border) 8px); border-radius: 8px; }

.main-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 75px; background: rgba(10, 10, 12, 0.95); border-top: 1px solid var(--glass-border); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; align-items: center; padding-bottom: env(safe-area-inset-bottom); z-index: 100; }
.nav-links { list-style: none; display: flex; width: 100%; justify-content: space-around; align-items: center; height: 100%; }
.nav-links li { flex: 1; height: 100%; }
.nav-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-decoration: none; color: var(--text-muted); gap: 4px; }
.nav-icon { font-size: 1.2rem; }
.nav-text { font-size: 0.65rem; font-weight: 600; }
.nav-links li.active a { color: var(--accent-orange); }

/* --- DESKTOP LAYOUT --- */
@media screen and (min-width: 900px) {
    .app-dashboard { flex-direction: row; }
    .mobile-header { display: none; }
    .desktop-brand-container { display: flex; align-items: center; gap: 10px; margin-bottom: 3rem; }
    .user-profile-desktop { display: flex; align-items: center; gap: 10px; background: var(--bg-dark-gray); padding: 12px; border-radius: 8px; border: 1px solid var(--glass-border); margin-top: auto; }
    .main-nav { position: static; width: 280px; height: 100dvh; border-top: none; border-right: 1px solid var(--glass-border); flex-direction: column; justify-content: flex-start; padding: 2rem; }
    .nav-links { flex-direction: column; justify-content: flex-start; height: auto; margin-bottom: 2rem; }
    .nav-links li { width: 100%; margin-bottom: 0.5rem; }
    .nav-links a { flex-direction: row; justify-content: flex-start; padding: 12px 15px; border-radius: 8px; gap: 12px; }
    .nav-links li.active a { background: rgba(255, 102, 0, 0.1); }
    .nav-text { font-size: 0.95rem; }
    .main-content { padding: 3rem; gap: 3rem; }
    .glass-card { padding: 2.5rem; }
    .studio-section { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; width: 100%;}
    .hero-layout .main-title { font-size: 3rem; }
    .hero-layout .sub-title { font-size: 1.1rem; }
    .input-group textarea.lyrics-input { height: 160px; }
    .gallery-grid { flex-direction: row; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; width: 100%; }
    .music-card { transition: transform 0.2s ease; }
    .music-card:hover { transform: translateY(-5px); border-color: var(--accent-muted); }
    .music-card .waveform-viz { height: 120px; }
    .wave1 { animation: topologyRipple 15s infinite ease-in-out; }
    @keyframes topologyRipple { 0%, 100% { transform: scaleY(1) translateY(0); } 50% { transform: scaleY(1.05) translateY(-3%); } }
}
