/**
 * Description: Player CSS V4.1 "Full Restore".
 * - FONTTI: Vaihdettu 'Outfit'.
 * - KORJAUS: Soittimen korkeus (80px) ja elementtien skaalaus.
 * - DYNYT: Mukana SVG-tyylit.
 * - SLIDER: Korjattu !important-määreillä.
 * Author: Markus Haapasaari / Kaupunkilehti Kalajokinen
 * Version: 4.1
 */

/* Ladataan uusi fontti: Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* --- FOOTER --- */
.site-footer {
    background: var(--surface-color);
    padding: 0 0 40px;
    text-align: center;
    position: relative;
    margin-top: 80px;
    font-family: 'Outfit', sans-serif;
}

/* DYYNIT (SVG) */
.footer-dunes {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
    pointer-events: none;
}

.footer-dunes svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* Dyynien värit */
.dune-layer-1 { fill: var(--primary-color); opacity: 0.15; }
.dune-layer-2 { fill: var(--primary-color); opacity: 0.3; }
.dune-layer-3 { fill: var(--surface-color); }

@media (prefers-color-scheme: dark) {
    .dune-layer-1 { fill: #2c2c2c; opacity: 1; }
    .dune-layer-2 { fill: #252525; opacity: 1; }
    .dune-layer-3 { fill: var(--surface-color); opacity: 1; }
}

.footer-content {
    position: relative;
    z-index: 2;
    padding-top: 20px;
}

.footer-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-links a {
    color: var(--text-muted);
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--primary-color); }

.footer-copy {
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 0.8rem;
}

/* --- DOCK PLAYER (STICKY) - KOMPAKTI VERSIO --- */
.superior-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; /* MADALLETTU */
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.25);
    overflow: visible;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: #121212;
    font-family: 'Outfit', sans-serif;
}

.dock-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #121212, #1e1e1e, #2a2216, #121212);
    background-size: 300% 100%;
    animation: bgSlide 20s linear infinite;
    z-index: 1;
}

@keyframes bgSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.dock-interface {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #ffffff;
    justify-content: space-between;
}

.dock-visual-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* KANSIKUVA */
.dock-art-section {
    width: 56px; /* PIENENNETTY */
    height: 56px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.dock-img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.dock-vinyl {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #111111;
    border: 2px solid #333333;
    position: relative;
    animation: spinVinyl 6s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-grooves {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px dashed #222222;
}

.vinyl-center {
    width: 35%;
    height: 35%;
    background: #F5A623;
    border-radius: 50%;
}

@keyframes spinVinyl { 100% { transform: rotate(360deg); } }

/* JUONTAJAKUVAT */
.host-silhouette-layer {
    position: absolute;
    bottom: 0;
    left: 40px;
    height: 90px; /* PIENENNETTY */
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.5));
    display: flex;
    align-items: flex-end;
}

.host-silhouette-layer img {
    height: 100%;
    width: auto;
    display: block;
}

.host-silhouette-layer.double { left: 25px; }
.host-silhouette-layer.double img { height: 85px; margin-right: -40px; }
.host-silhouette-layer.double img:last-child { margin-right: 0; }
.host-silhouette-layer.double .host-img-0 { z-index: 1; filter: brightness(0.9); }
.host-silhouette-layer.double .host-img-1 { z-index: 2; }

/* INFO-OSIO */
.dock-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 2;
    transition: margin-left 0.3s;
}

.dock-info-section.has-host { margin-left: 90px; }
.dock-info-section.has-double-host { margin-left: 140px; }

.info-top {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.live-badge {
    background: #e53935;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

.program-name {
    font-size: 0.8rem; /* PIENENNETTY */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.7);
}

.info-track {
    font-size: 1rem; /* PIENENNETTY */
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    margin-bottom: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    letter-spacing: 0.3px;
}

.info-host {
    font-size: 0.75rem; /* PIENENNETTY */
    color: #F5A623;
    font-weight: 500;
    display: block;
}

/* KONTROLLIT */
.dock-controls-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
    position: relative;
    z-index: 10;
}

.play-btn {
    width: 42px; /* PIENENNETTY */
    height: 42px;
    border-radius: 50%;
    background: #F5A623;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000000;
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.play-btn svg { width: 18px; height: 18px; }

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(245, 166, 35, 0.7);
    background: #ffb340;
}

.play-btn.playing {
    background: #ffffff;
    color: #F5A623;
}

.volume-wrapper {
    display: flex;
    align-items: center;
}

/* SLIDER FIX (!important) */
.dock-controls-section input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: rgba(255,255,255,0.2) !important;
    height: 4px !important;
    border-radius: 2px !important;
    outline: none !important;
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
    width: 70px !important;
    max-width: 70px !important;
    box-shadow: none !important;
}

.dock-controls-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #F5A623 !important;
    cursor: pointer !important;
    border: none !important;
    margin-top: 0 !important;
    box-shadow: none !important;
}

.control-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s, transform 0.2s;
}

.control-icon-btn svg { width: 18px; height: 18px; }

.control-icon-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.eq-visualizer {
    display: flex;
    align-items: flex-end;
    height: 20px;
    gap: 3px;
}

.eq-visualizer span {
    width: 3px;
    background: #F5A623;
    height: 4px;
    transition: height 0.2s;
}

.eq-visualizer.active span {
    animation: eqBounce 1s infinite ease-in-out;
}

.eq-visualizer span:nth-child(1) { animation-duration: 0.6s; }
.eq-visualizer span:nth-child(2) { animation-duration: 0.8s; }
.eq-visualizer span:nth-child(3) { animation-duration: 1.0s; }
.eq-visualizer span:nth-child(4) { animation-duration: 0.7s; }

@keyframes eqBounce {
    0%, 100% { height: 20%; opacity: 0.5; }
    50% { height: 100%; opacity: 1; }
}

@media (max-width: 768px) {
    .superior-dock {
        height: auto;
        padding: 10px 0;
        overflow: visible;
    }

    .dock-interface {
        flex-direction: column;
        padding: 0 15px;
    }

    .dock-visual-wrapper {
        margin-right: 0;
        margin-bottom: 5px;
        margin-top: -30px;
    }

    .dock-art-section {
        width: 50px;
        height: 50px;
    }

    .host-silhouette-layer {
        left: 50%;
        transform: translateX(-50%);
        bottom: -8px;
        height: 70px;
    }

    .host-silhouette-layer.double img {
        height: 60px;
        margin-right: -25px;
    }

    .dock-info-section {
        text-align: center;
        margin-bottom: 10px;
        width: 100%;
        margin-left: 0 !important;
    }

    .info-track { font-size: 0.9rem; }
    .program-name { font-size: 0.75rem; }

    .dock-controls-section {
        width: 100%;
        margin: 0;
        justify-content: space-between;
        gap: 10px;
    }

    .volume-wrapper, .eq-visualizer {
        display: none;
    }
}
