/**
 * MESH Healing Platform Styles
 * ISO 13485:2016 & IEC 62366:2015 Compliant
 *
 * MESH B.V. - Dr. Simon Haddadin, MD
 * Medical Device Class III
 * Version: 1.0.0
 */

/* === MESH BRAND FOUNDATION === */
:root {
    --mesh-teal: #02827e;
    --mesh-white: #ffffff;
    --mesh-white-90: rgba(255, 255, 255, 0.9);
    --mesh-white-60: rgba(255, 255, 255, 0.6);
    --mesh-white-30: rgba(255, 255, 255, 0.3);
    --mesh-white-10: rgba(255, 255, 255, 0.1);

    /* Usability Engineering - IEC 62366:2015 */
    --medical-touch-target: 44px;
    --medical-response-time: 100ms;
}

/* === HEALING PLATFORM LAYOUT === */
.healing-platform-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.healing-platform-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 40px;
}

/* === LEFT SIDEBAR === */
.healing-sidebar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.search-bar {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--mesh-white-30);
    border-radius: 12px;
    color: var(--mesh-white);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    min-height: var(--medical-touch-target);
    transition: all var(--medical-response-time);
}

.search-bar:focus {
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--medical-response-time);
    min-height: var(--medical-touch-target);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-item:hover,
.category-item:focus {
    background: rgba(255, 255, 255, 0.1);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

.category-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 3px solid var(--mesh-white);
}

.category-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.category-count {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* === MAIN CONTENT AREA === */
.healing-content-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* === DAILY FEED SECTION === */
.daily-feed-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--mesh-white-30);
}

.daily-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.daily-feed-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.todays-post-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--mesh-white-30);
    cursor: pointer;
    transition: all var(--medical-response-time);
    min-height: var(--medical-touch-target);
}

.todays-post-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--mesh-white);
    transform: translateY(-2px);
}

.post-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-content {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-play-btn {
    min-width: var(--medical-touch-target);
    min-height: var(--medical-touch-target);
    padding: 10px 20px;
    background: var(--mesh-white);
    color: var(--mesh-teal);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--medical-response-time);
    font-family: 'Inter', sans-serif;
}

.post-play-btn:hover,
.post-play-btn:focus {
    transform: scale(1.05);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

/* === CONTENT GRID === */
.content-grid-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--mesh-white-30);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    min-width: var(--medical-touch-target);
    min-height: var(--medical-touch-target);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--mesh-white-30);
    border-radius: 8px;
    color: var(--mesh-white);
    cursor: pointer;
    transition: all var(--medical-response-time);
}

.view-btn:hover,
.view-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

.view-btn.active {
    background: var(--mesh-white);
    color: var(--mesh-teal);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

@media (min-width: 1400px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.content-grid.list-view {
    grid-template-columns: 1fr;
}

.content-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all var(--medical-response-time);
    border: 1px solid var(--mesh-white-10);
    min-height: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-card:hover,
.content-card:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--mesh-white-30);
    transform: translateY(-2px);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

.content-card-image {
    width: 100%;
    height: 280px;
    min-height: 280px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.content-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.content-card-author {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

.content-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    opacity: 0.6;
}

.content-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* === MINI PLAYER BAR === */
.mini-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(2, 130, 126, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--mesh-white-30);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10000;
    min-height: 70px;
}

.mini-player-bar.hidden {
    display: none;
}

.mini-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.mini-player-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.mini-player-details {
    flex: 1;
    min-width: 0;
}

.mini-player-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-artist {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-player-btn {
    min-width: var(--medical-touch-target);
    min-height: var(--medical-touch-target);
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--mesh-white);
    cursor: pointer;
    transition: all var(--medical-response-time);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-player-btn:hover,
.mini-player-btn:focus {
    background: rgba(255, 255, 255, 0.3);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

.mini-player-progress {
    flex: 1;
    max-width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.mini-player-progress-fill {
    height: 100%;
    background: var(--mesh-white);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* === LOCATION COMPACT SECTION === */
.location-section-compact {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--mesh-white-30);
}

.location-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    cursor: pointer;
    min-height: var(--medical-touch-target);
}

.location-compact-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.location-compact-toggle {
    font-size: 1.5rem;
    transition: transform var(--medical-response-time);
}

.location-compact-toggle.expanded {
    transform: rotate(180deg);
}

.location-compact-content {
    display: none;
}

.location-compact-content.expanded {
    display: block;
}

.location-compact-info {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .healing-platform-main {
        grid-template-columns: 1fr;
    }

    .healing-sidebar {
        position: static;
        margin-bottom: 30px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .healing-platform-container {
        padding: 20px 16px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .mini-player-bar {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .mini-player-info {
        width: 100%;
        order: 1;
    }

    .mini-player-controls {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .mini-player-progress {
        order: 3;
        width: 100%;
        max-width: 100%;
    }
}

/* === AUDIO WAVEFORM ANIMATION === */
@keyframes wave {
    0%, 100% { height: 20%; }
    50% { height: 80%; }
}

/* === MEDIA CONTAINER === */
.media-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-element {
    width: 100%;
    display: block;
    max-height: 600px;
}

.audio-visualization {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(2, 130, 126, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.audio-waveform {
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
}

.wave-bar {
    width: 8px;
    background: var(--mesh-white);
    border-radius: 4px;
    animation: wave 1.5s ease-in-out infinite;
}

/* === VOLUME SLIDER STYLING === */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    height: 4px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mesh-white);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mesh-white);
    cursor: pointer;
    border: none;
}

/* === RESONANCE HERO SECTION (Wide-Screen Black Hole) === */
.resonance-hero-section {
    width: 100%;
    position: relative;
    margin-top: 80px;
    margin-bottom: 40px;
}

.blackhole-visualizer-fullwidth {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.resonance-title-floating {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--mesh-white);
    text-align: center;
    z-index: 100;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .blackhole-visualizer-fullwidth {
        height: 300px;
    }
    .resonance-title-floating {
        bottom: -50px;
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* === RESONANCE SPLIT-VIEW LAYOUT === */
.resonance-split-container {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 400px);
    max-height: none;
    overflow: visible;
    margin-top: 20px;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.resonance-player-side {
    width: 50%;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    height: fit-content;
    max-height: calc(100vh - 200px); /* Prevent cut-off at top/bottom */
}

.resonance-library-side {
    width: 50%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    box-sizing: border-box;
    min-height: 600px;
}

.upload-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--mesh-white-30);
}

.location-and-info-header {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.research-form-section {
    margin-top: 80px;
    margin-bottom: 40px;
    padding-top: 40px;
}

.location-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.location-info-column,
.research-info-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 1200px) {
    .location-info-grid {
        grid-template-columns: 1fr;
    }

    .resonance-split-container {
        flex-direction: column;
        max-height: none;
    }

    .resonance-player-side,
    .resonance-library-side {
        width: 100%;
    }
}

/* === COLLAPSIBLE SECTIONS === */
.collapsible-section {
    margin-bottom: 20px;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px 0;
    transition: opacity 0.2s ease;
    min-height: var(--medical-touch-target);
}

.collapsible-header:hover {
    opacity: 0.8;
}

.collapsible-header:focus {
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
    border-radius: 4px;
}

.collapse-icon {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

@media (max-width: 1024px) {
    .resonance-split-container {
        flex-direction: column;
        height: auto;
    }
    .resonance-player-side,
    .resonance-library-side {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* === BLACK HOLE VISUALIZER === */
.blackhole-visualizer-container {
    width: 100%;
    height: 300px;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.blackhole-visualizer-fullwidth .accretion-disk {
    width: 1200px;
    height: 300px;
}

.blackhole-visualizer-fullwidth .event-horizon {
    width: 250px;
    height: 250px;
}

.blackhole-visualizer-fullwidth .photon-ring {
    width: 270px;
    height: 270px;
}

.blackhole-visualizer-fullwidth .blackhole-logo {
    width: 180px;
    height: 180px;
}

.orbital-animation-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blackhole-view {
    background: radial-gradient(circle at center,
        rgba(3, 90, 87, 1) 0%,
        rgba(2, 75, 73, 1) 40%,
        rgba(2, 60, 58, 1) 70%,
        rgba(1, 45, 44, 1) 100%);
}

.event-horizon {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(2, 75, 73, 0.95) 50%,
        rgba(2, 85, 82, 0.9) 80%,
        rgba(3, 95, 92, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.3),
        inset 0 0 80px rgba(2, 75, 73, 0.8);
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.blackhole-logo {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.4));
    transition: transform 0.1s ease-out, filter 0.1s ease-out;
    will-change: transform, filter;
}

.photon-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid rgba(255, 179, 71, 0.95);
    box-shadow:
        0 0 30px rgba(255, 179, 71, 0.9),
        0 0 60px rgba(255, 179, 71, 0.7),
        0 0 90px rgba(255, 200, 100, 0.5),
        inset 0 0 30px rgba(255, 179, 71, 0.6);
    z-index: 9;
    transition: opacity 0.1s ease-out, transform 0.1s ease-out, box-shadow 0.1s ease-out;
    will-change: opacity, transform, box-shadow;
}

.accretion-disk {
    position: absolute;
    width: 700px;
    height: 180px;
    transform-style: preserve-3d;
}

.disk-top {
    transform: rotateX(75deg) translateZ(0px);
    z-index: 8;
}

.disk-bottom {
    transform: rotateX(-75deg) translateZ(0px) scaleY(-1);
    z-index: 12;
}

.disk-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.7;
    animation: disk-rotate 22s linear infinite;
    will-change: transform;
}

.layer-1 {
    border: 35px solid rgba(255, 179, 71, 0.15);
    filter: blur(10px);
    animation-duration: 28s;
}

.layer-2 {
    border: 30px solid rgba(255, 179, 71, 0.28);
    width: 88%;
    height: 88%;
    top: 6%;
    left: 6%;
    filter: blur(8px);
    animation-duration: 22s;
}

.layer-3 {
    border: 25px solid rgba(255, 200, 100, 0.42);
    width: 76%;
    height: 76%;
    top: 12%;
    left: 12%;
    filter: blur(6px);
    animation-duration: 16s;
}

.layer-4 {
    border: 20px solid rgba(255, 220, 130, 0.65);
    width: 64%;
    height: 64%;
    top: 18%;
    left: 18%;
    filter: blur(4px);
    animation-duration: 12s;
    box-shadow:
        0 0 40px rgba(255, 220, 130, 0.5),
        inset 0 0 40px rgba(255, 220, 130, 0.35);
}

@keyframes disk-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.disk-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.15) 48%,
        rgba(255, 255, 255, 0.08) 52%,
        transparent 60%,
        transparent 100%
    );
    animation: streak-flow 4s linear infinite;
    will-change: transform;
}

@keyframes streak-flow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === DRAG AND DROP ZONE === */
.drop-zone {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    min-height: var(--medical-touch-target);
}

.drop-zone.drag-over {
    border-color: var(--mesh-white);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.drop-zone.hidden {
    display: none;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.6;
    font-weight: 300;
    line-height: 1;
}

.drop-zone-text {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.drop-zone-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* === SAPIEN PLAYER SECTION === */
.sapien-player-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Playlist Panel */
.playlist-panel {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    max-height: 300px; /* Prevent excessive height */
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: var(--mesh-white);
}

.playlist-container {
    max-height: 220px; /* Fixed max height for scrolling */
    overflow-y: auto;
    overflow-x: hidden;
}

.playlist-empty {
    text-align: center;
    padding: 20px;
    color: var(--mesh-white-60);
    font-size: 14px;
}

.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--mesh-primary-50);
}

.playlist-item.active {
    background: rgba(0, 128, 255, 0.2);
    border-color: var(--mesh-primary);
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--mesh-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.playlist-item-details {
    font-size: 12px;
    color: var(--mesh-white-60);
}

.playlist-item-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.playlist-remove-btn {
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.4);
    color: #FF3B30;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-remove-btn:hover {
    background: rgba(255, 59, 48, 0.3);
    border-color: rgba(255, 59, 48, 0.6);
}

.vlc-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn {
    min-width: var(--medical-touch-target);
    min-height: var(--medical-touch-target);
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: var(--mesh-white);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--medical-response-time);
    font-family: 'Inter', sans-serif;
}

.control-btn:hover,
.control-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-container {
    flex: 1;
    position: relative;
    min-height: var(--medical-touch-target);
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--mesh-white);
    border-radius: 4px;
    transition: width 0.1s linear;
    width: 0%;
}

.time-display {
    min-width: 120px;
    text-align: center;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speed-selector {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.speed-btn {
    min-width: 50px;
    min-height: var(--medical-touch-target);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--mesh-white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--medical-response-time);
}

.speed-btn:hover,
.speed-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: 2px solid var(--mesh-white);
    outline-offset: 2px;
}

.speed-btn.active {
    background: var(--mesh-white);
    color: var(--mesh-teal);
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
