*{box-sizing:border-box}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:radial-gradient(circle at top left,rgba(37,99,235,.25),transparent 35%),linear-gradient(135deg,#020617,#0f172a);
    color:#fff;
    min-height:200vh;
}

.page{
    max-width:1180px;
    margin:35px auto;
    padding:16px;
}

.player-card{
    position:relative;
    background:rgba(15,23,42,.94);
    border:1px solid rgba(255,255,255,.08);
    border-radius:26px;
    padding:18px;
    box-shadow:0 25px 80px rgba(0,0,0,.42);
}

.player-header{
    margin-bottom:16px;
}

.player-header h1{
    margin:0;
    font-size:26px;
    font-weight:800;
}

.player-header p{
    margin:6px 0 0;
    color:#94a3b8;
    font-size:14px;
}

.player-tools{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:14px;
}

.tool-btn{
    border:0;
    border-radius:12px;
    padding:10px 14px;
    cursor:pointer;
    color:#fff;
    background:#2563eb;
    font-weight:700;
}

.tool-btn.secondary{
    background:#334155;
}

.video-placeholder{
    position:relative;
    width:100%;
}

.video-area{
    position:relative;
    width:100%;
    height:520px;
    max-height:70vh;
    border-radius:20px;
    overflow:hidden;
    background:#000;
    transition:.25s ease;
}

.video-area.audio-mode{
    height:360px;
    max-height:420px;
}

.video-area .plyr,
.video-area .youtube-frame{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
}

.plyr{
    width:100%;
    height:100%;
    border-radius:20px;
}

.youtube-frame{
    display:none;
    z-index:12;
    border:0;
    background:#000;
}

.youtube-frame.show{
    display:block;
}

.video-area.youtube-mode .plyr{
    display:none!important;
}

.video-area.youtube-mode .youtube-frame{
    display:block;
}

.video-area.youtube-mode .audio-poster,
.video-area.youtube-mode .big-toggle{
    display:none!important;
}

.audio-poster{
    position:absolute;
    inset:0;
    z-index:5;
    display:none;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    background:linear-gradient(135deg,#020617,#111827);
    pointer-events:none;
}

.audio-poster.show{
    display:flex;
}

.audio-poster img{
    width:220px;
    height:220px;
    max-width:55%;
    max-height:55%;
    object-fit:cover;
    border-radius:24px;
    box-shadow:0 25px 80px rgba(0,0,0,.55);
}

.audio-poster-title{
    margin-top:18px;
    font-size:18px;
    font-weight:800;
    color:#fff;
    text-align:center;
    padding:0 20px;
}

.big-toggle{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%) scale(.92);
    z-index:20;
    width:86px;
    height:86px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.25);
    background:rgba(15,23,42,.76);
    color:#fff;
    font-size:34px;
    cursor:pointer;
    opacity:0;
    pointer-events:none;
    transition:.2s ease;
    backdrop-filter:blur(12px);
}

.video-area:hover .big-toggle{
    opacity:1;
    pointer-events:auto;
    transform:translate(-50%,-50%) scale(1);
}

.playlist{
    margin-top:18px;
    display:grid;
    gap:12px;
}

.playlist-item{
    display:flex;
    align-items:center;
    gap:14px;
    width:100%;
    padding:12px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    background:rgba(30,41,59,.92);
    color:#fff;
    cursor:pointer;
    text-align:left;
    transition:.2s ease;
}

.playlist-item:hover{
    background:rgba(51,65,85,.95);
    transform:translateY(-1px);
}

.playlist-item.active{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    border-color:rgba(255,255,255,.22);
}

.playlist-thumb-wrap{
    position:relative;
    width:118px;
    height:68px;
    flex-shrink:0;
}

.playlist-thumb{
    width:118px;
    height:68px;
    border-radius:14px;
    object-fit:cover;
    background:#020617;
}

.playlist-percent{
    position:absolute;
    left:7px;
    bottom:7px;
    font-size:11px;
    background:rgba(0,0,0,.65);
    color:#fff;
    padding:3px 7px;
    border-radius:999px;
}

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

.playlist-title{
    display:block;
    font-size:15px;
    font-weight:800;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.playlist-meta{
    display:block;
    margin-top:5px;
    font-size:12px;
    color:#cbd5e1;
}

.playlist-duration{
    font-size:12px;
    color:#fff;
    background:rgba(0,0,0,.35);
    padding:6px 10px;
    border-radius:999px;
    white-space:nowrap;
}

.progress-line{
    width:100%;
    height:5px;
    margin-top:9px;
    background:rgba(255,255,255,.14);
    border-radius:999px;
    overflow:hidden;
}

.progress-line span{
    display:block;
    height:100%;
    width:0%;
    background:#22c55e;
    border-radius:999px;
}

.next-popup{
    position:absolute;
    right:18px;
    bottom:18px;
    z-index:30;
    width:280px;
    padding:16px;
    border-radius:18px;
    background:rgba(15,23,42,.94);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 18px 55px rgba(0,0,0,.45);
    display:none;
}

.next-popup.show{
    display:block;
}

.next-popup-title{
    font-weight:800;
    font-size:15px;
    margin-bottom:6px;
}

.next-popup-text{
    font-size:13px;
    color:#cbd5e1;
    margin-bottom:12px;
}

.next-popup-actions{
    display:flex;
    gap:8px;
}

.next-popup-actions button{
    border:0;
    border-radius:10px;
    padding:9px 11px;
    cursor:pointer;
    color:#fff;
    background:#334155;
}

.next-popup-actions button.primary{
    background:#2563eb;
}

.error{
    margin-top:14px;
    padding:14px;
    border-radius:14px;
    background:#7f1d1d;
    color:#fff;
}

.loading{
    margin-top:14px;
    color:#94a3b8;
}

.shortcut-hint{
    margin-top:14px;
    color:#94a3b8;
    font-size:12px;
}

.light-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.86);
    z-index:9000;
    opacity:0;
    visibility:hidden;
    transition:.25s ease;
}

body.lights-off .light-overlay{
    opacity:1;
    visibility:visible;
}

body.lights-off .player-card{
    position:relative;
    z-index:9010;
}

.video-area.mini-player{
    position:fixed!important;
    right:24px;
    bottom:24px;
    width:420px!important;
    height:236px!important;
    max-height:none!important;
    z-index:9999;
    border-radius:18px;
    box-shadow:0 25px 90px rgba(0,0,0,.75);
}

.video-area.mini-player .big-toggle{
    width:58px;
    height:58px;
    font-size:24px;
}

.mini-close{
    display:none;
    position:absolute;
    right:10px;
    top:10px;
    z-index:10001;
    width:34px;
    height:34px;
    border:0;
    border-radius:999px;
    background:rgba(0,0,0,.72);
    color:#fff;
    font-size:24px;
    line-height:34px;
    cursor:pointer;
}

.video-area.mini-player .mini-close{
    display:block;
}

@media(max-width:768px){
    .page{
        margin:10px auto;
        padding:10px;
    }

    .player-card{
        padding:12px;
        border-radius:20px;
    }

    .player-header h1{
        font-size:21px;
    }

    .video-area{
        height:260px;
    }

    .video-area.audio-mode{
        height:300px;
    }

    .video-area.mini-player{
        right:10px!important;
        bottom:10px!important;
        width:260px!important;
        height:146px!important;
    }

    .playlist-item{
        gap:10px;
        padding:10px;
    }

    .playlist-thumb-wrap,
    .playlist-thumb{
        width:84px;
        height:52px;
    }

    .playlist-title{
        font-size:14px;
    }

    .playlist-duration{
        display:none;
    }

    .next-popup{
        left:12px;
        right:12px;
        bottom:12px;
        width:auto;
    }
}

/* Vimuse-like compact skin */
:root{
    --skin-page:#101010;
    --skin-panel:#0b1220;
    --skin-panel-soft:#111827;
    --skin-panel-mid:#1f2937;
    --skin-line:rgba(255,255,255,.09);
    --skin-text:#f8fafc;
    --skin-muted:#a7a7a7;
    --skin-accent:#0ea5e9;
    --skin-accent-strong:#0284c7;
}

body{
    min-height:100vh;
    background:
        linear-gradient(120deg,rgba(14,165,233,.12),transparent 28%),
        linear-gradient(210deg,rgba(34,197,94,.08),transparent 24%),
        var(--skin-page);
}

.page{
    max-width:820px;
    margin:24px auto;
}

.player-card{
    padding:0;
    overflow:hidden;
    border-radius:18px;
    background:var(--skin-panel);
    border:1px solid var(--skin-line);
    box-shadow:0 18px 45px rgba(0,0,0,.28);
}

.player-header{
    margin:0;
    padding:11px 15px;
    background:linear-gradient(90deg,#111827,#1f2937);
}

.player-header h1{
    font-size:15px;
    line-height:1.35;
}

.player-header p{
    margin-top:4px;
    color:var(--skin-muted);
    font-size:12px;
    line-height:1.35;
}

.player-tools{
    margin:0;
    padding:9px 10px;
    gap:8px;
    background:var(--skin-panel-soft);
}

.tool-btn{
    min-height:32px;
    padding:7px 10px;
    border-radius:9px;
    background:#374151;
    font-size:12px;
    line-height:1.2;
}

.tool-btn:hover,
.tool-btn:focus{
    background:var(--skin-accent);
    outline:none;
}

.tool-btn.secondary{
    background:#374151;
}

.video-area{
    height:360px;
    max-height:62vh;
    border-radius:0;
    background:#020617;
}

.video-area.audio-mode{
    height:360px;
    max-height:62vh;
}

.plyr{
    border-radius:0;
}

.audio-poster{
    background:radial-gradient(circle at center,#1f2937 0%,#020617 72%);
}

.audio-poster img{
    width:150px;
    height:150px;
    max-width:42%;
    max-height:42%;
    border-radius:18px;
    box-shadow:0 12px 30px rgba(0,0,0,.35);
}

.audio-poster-title{
    font-size:15px;
    line-height:1.35;
}

.big-toggle{
    width:64px;
    height:64px;
    min-width:64px;
    min-height:64px;
    padding:0;
    border:0;
    border-radius:50%;
    background:rgba(15,23,42,.82);
    font-size:25px;
    line-height:64px;
    opacity:1;
    pointer-events:auto;
    backdrop-filter:blur(8px);
    transition:background .18s ease,opacity .28s ease,transform .18s ease;
}

.big-toggle:hover,
.big-toggle:focus{
    background:rgba(14,165,233,.94);
    outline:none;
}

.video-area.is-playing:not(:hover) .big-toggle{
    opacity:0;
    pointer-events:none;
}

.playlist{
    display:block;
    max-height:210px;
    margin:0;
    padding:0;
    overflow:auto;
    background:var(--skin-panel-mid);
    scrollbar-width:thin;
}

.playlist::-webkit-scrollbar{
    width:8px;
}

.playlist::-webkit-scrollbar-track{
    background:#111827;
}

.playlist::-webkit-scrollbar-thumb{
    background:#9ca3af;
    border-radius:10px;
}

.playlist-item{
    min-height:54px;
    gap:9px;
    padding:6px 9px;
    border:0;
    border-bottom:1px solid rgba(255,255,255,.08);
    border-radius:0;
    background:#2b3038;
    transition:background .18s ease;
}

.playlist-item:hover,
.playlist-item.active{
    background:linear-gradient(90deg,var(--skin-accent-strong),var(--skin-accent));
    transform:none;
}

.playlist-thumb-wrap,
.playlist-thumb{
    width:36px;
    height:36px;
}

.playlist-thumb{
    border-radius:50%;
}

.playlist-percent{
    left:auto;
    right:-5px;
    bottom:-4px;
    padding:2px 4px;
    font-size:9px;
    background:rgba(0,0,0,.72);
}

.playlist-title{
    font-size:12px;
    line-height:1.15;
}

.playlist-meta{
    margin-top:2px;
    color:rgba(255,255,255,.72);
    font-size:10px;
    line-height:1.1;
}

.playlist-duration{
    padding:4px 7px;
    border-radius:8px;
    background:#111827;
    color:rgba(255,255,255,.8);
    font-size:11px;
}

.progress-line{
    height:3px;
    margin-top:5px;
    background:rgba(255,255,255,.16);
}

.progress-line span{
    background:#22c55e;
}

.next-popup{
    right:12px;
    bottom:12px;
    border-radius:14px;
    background:rgba(17,24,39,.96);
}

.message,
.loading,
.error,
.shortcut-hint{
    margin:0;
}

#message.loading,
.shortcut-hint{
    padding:10px 12px;
    background:#111827;
}

#message.error{
    margin:0;
    border-radius:0;
}

.video-area.mini-player{
    right:22px!important;
    bottom:22px!important;
    width:360px!important;
    height:190px!important;
    border-radius:16px;
}

.video-area.mini-player .big-toggle{
    width:52px;
    height:52px;
    min-width:52px;
    min-height:52px;
    font-size:21px;
    line-height:52px;
}

.video-area.mini-player + .playlist,
.video-area.mini-player .playlist{
    display:none!important;
}

@media(max-width:768px){
    .page{
        margin:10px auto;
    }

    .video-area,
    .video-area.audio-mode{
        height:280px;
        max-height:none;
    }

    .playlist{
        max-height:180px;
    }
}

@media(max-width:576px){
    .player-card{
        border-radius:15px;
    }

    .player-header p{
        display:none;
    }

    .video-area,
    .video-area.audio-mode{
        height:230px;
    }

    .big-toggle{
        width:54px;
        height:54px;
        min-width:54px;
        min-height:54px;
        font-size:22px;
        line-height:54px;
    }

    .video-area.mini-player{
        width:280px!important;
        height:155px!important;
        right:10px!important;
        bottom:10px!important;
    }

    .playlist-duration{
        display:none;
    }
}

.resume-popup{
    position:absolute;
    left:12px;
    bottom:12px;
    z-index:35;
    width:300px;
    padding:15px;
    border-radius:14px;
    background:rgba(17,24,39,.96);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:0 18px 55px rgba(0,0,0,.45);
    display:none;
}

.resume-popup.show{
    display:block;
}

.resume-title{
    font-weight:800;
    font-size:15px;
    margin-bottom:6px;
}

.resume-text{
    font-size:13px;
    color:#cbd5e1;
    margin-bottom:12px;
}

.resume-actions{
    display:flex;
    gap:8px;
}

.resume-actions button{
    border:0;
    border-radius:10px;
    padding:9px 11px;
    cursor:pointer;
    color:#fff;
    background:#334155;
}

.resume-actions button.primary{
    background:#2563eb;
}

@media(max-width:576px){
    .resume-popup{
        left:12px;
        right:12px;
        bottom:12px;
        width:auto;
    }
}

/* MP3 / Audio modunda poster üstte, kontroller altta görünsün */
.video-area.audio-mode .audio-poster{
    top:0 !important;
    bottom:72px !important;
    height:auto !important;
    z-index:2 !important;
}

.video-area.audio-mode .plyr{
    z-index:5 !important;
}

.video-area.audio-mode .plyr__controls{
    position:absolute !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    z-index:20 !important;
}

/* Audio modunda ortadaki büyük play butonu da görünsün */
.video-area.audio-mode .big-toggle{
    z-index:25 !important;
}
