/**
 * Theme Name:     Quick Swing Child
 * Author:         Nilsou
 * Template:       quick-swing
 * Text Domain:	   quick-swing-child
 * Description:    Thème sur mesure ultra-léger et moderne (Block-ready). Glassmorphism, Néons et animations Anime.js.
 */

/* === Visualiseur audio ============================================ */

.qs-visualizer-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 204, 0.22);
    box-shadow: 0 0 50px rgba(0, 255, 204, 0.07);
    line-height: 0;
}

#myCanvas {
    display: block;
    width: 100%;
    background: #050508;
}

/* --- Overlay contrôles --- */

.qs-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(5, 5, 8, 0.94));
    padding: 3rem 0 0.8rem;
    transition: opacity 0.35s ease;
}

.qs-controls.qs-hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- Barre de progression --- */

.qs-progress-wrap {
    padding: 0 1rem 0.45rem;
}

.qs-progress-track {
    position: relative;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    cursor: pointer;
}

.qs-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #00ffcc;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.9);
    pointer-events: none;
    transition: width 0.1s linear;
}

.qs-seek {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 24px;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    accent-color: #00ffcc;
}

/* --- Rangée de boutons --- */

.qs-controls-row {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0 0.75rem;
    line-height: 1;
}

.qs-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    padding: 0;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: color 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.qs-btn:hover {
    color: #00ffcc;
    transform: scale(1.13);
}

.qs-volume-wrap {
    display: flex;
    align-items: center;
}

.qs-volume-slider {
    width: 64px;
    height: 3px;
    accent-color: #00ffcc;
    cursor: pointer;
    opacity: 0.75;
}

.qs-time {
    flex: 1;
    padding-left: 0.6rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
    line-height: 1;
}

.qs-fullscreen-btn {
    margin-left: auto;
}

/* --- Loading spinner --- */

.qs-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10;
    border-radius: inherit;
    pointer-events: none;
}

.qs-loading::after {
    content: '';
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: qs-spin 0.75s linear infinite;
}

@keyframes qs-spin {
    to { transform: rotate(360deg); }
}

/* --- Plein écran --- */

.qs-visualizer-wrap:fullscreen,
.qs-visualizer-wrap:-webkit-full-screen {
    border-radius: 0;
    border: none;
    background: #050508;
}

.qs-visualizer-wrap:fullscreen #myCanvas,
.qs-visualizer-wrap:-webkit-full-screen #myCanvas {
    width: 100% !important;
    height: 100% !important;
}
