/*
Theme Name: Soft Resonant
Author: Developer
Description: A lightweight plugin-free master skeleton architecture for CalmClone.
Version: 1.0
Tags: custom-layout, plugin-free
*/

/* =========================================
   THEME VARIABLES: CALM SAAS PALETTE
   ========================================= */
   :root {
    /* Backgrounds */
    --bg-base: #f0f4f8;        
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #eef2f3 100%);
    
    /* Card/Glass Settings */
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    
    /* Text Colors */
    --text-primary: #2d3748;
    --text-muted: #718096;
    
    /* Accents */
    --accent-main: #319795; /* Teal */
    --accent-hover: #2c7a7b;
    --accent-light: #e6fffa;
    
    /* UI Elements */
    --radius-card: 24px;
    --radius-pill: 50px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   SYSTEM ALERTS & BACKGROUND
   ========================================= */
.system-alert {
    background: #e53e3e;
    color: #fff;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 100;
}

#visualizer-canvas {
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: -1;
    /* Soft fallback gradient if JS visualizer fails */
    background: var(--bg-gradient);
}

/* =========================================
   LAYOUT & HEADER
   ========================================= */
.dashboard-container {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.logo-group h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.sub-brand {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.go-pro-btn {
    background-color: var(--text-primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.go-pro-btn:hover {
    background-color: #1a202c;
}

/* =========================================
   MODULE GRID
   ========================================= */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

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

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =========================================
   PLAYER MODULE SPECIFICS
   ========================================= */
.status-indicator {
    display: flex;
    align-items: center;
    background: var(--accent-light);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    color: var(--accent-main);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pulse {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--accent-main);
    border-radius: 50%;
    margin-right: 6px;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.track-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.track-cover {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    margin: 0 auto 1rem auto;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.track-info h4 { 
    font-size: 1.25rem; 
    margin-bottom: 0.25rem; 
}

.track-info p { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
}

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

.play-btn {
    background: var(--accent-light);
    color: var(--accent-main);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: var(--accent-main);
    color: #fff;
    transform: scale(1.05);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    margin-left: 2px;
}

.api-attribution {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================
   MIXER MODULE SPECIFICS
   ========================================= */
.mixer-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.mixer-label {
    font-size: 0.95rem;
    width: 80px;
    font-weight: 500;
}

/* Custom Webkit Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin-left: 10px;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--accent-main);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 2px 5px rgba(49, 151, 149, 0.4);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--card-border);
    border-radius: 2px;
}

/* =========================================
   UTILITY MODULE SPECIFICS
   ========================================= */
.breathing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.breathing-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid var(--accent-main);
    margin: 1rem auto;
    /* JS will handle CSS scaling animation */
}

.breathing-text {
    color: var(--text-muted); 
    font-size: 0.9rem;
    font-weight: 500;
}

.sponsor-block {
    border: 2px dashed var(--card-border);
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    margin-top: auto;
}

.sponsor-block span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.sponsor-link {
    font-size: 0.95rem;
    color: var(--accent-main);
    text-decoration: none;
    font-weight: 600;
}

.sponsor-link:hover {
    text-decoration: underline;
}