/* ============================================
   AdsDial — Player Page (Rumble-style)
   ============================================ */

.player-page {
    display: grid;
    grid-template-columns: minmax(0, 880px) 340px;
    justify-content: center;     /* keep player + sidebar centered, no big right gap */
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem 3rem;
}

/* ===== MAIN PLAYER COLUMN ===== */
.player-main { min-width: 0; }

.player-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.player-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.player-video-wrap video::-internal-media-controls-download-button { display: none; }
.player-video-wrap video::-webkit-media-controls-enclosure { overflow: hidden; }
.player-video-wrap video::-webkit-media-controls-panel { width: calc(100% + 30px); }

.player-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0,0,0,0.6);
    pointer-events: none;
    user-select: none;
    z-index: 10;
    font-family: 'Segoe UI', system-ui, sans-serif;
    mix-blend-mode: difference;
}

/* Audio player — gradient background card */
.audio-player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.25rem;
    /* fixed dark cover (no random green/blue) */
    background: linear-gradient(180deg, #3a3f47 0%, #16181d 100%);
}

/* audio seek bar */
.audio-seek {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 78%;
    max-width: 520px;
    color: rgba(255,255,255,0.9);
    font-size: 0.72rem;
    font-weight: 600;
}
.audio-seek input[type="range"] {
    flex: 1;
    height: 4px;
    cursor: pointer;
    accent-color: var(--orange);
}

.audio-player-art {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.2);
    animation: spin 20s linear infinite paused;
    box-shadow: 0 0 60px rgba(250,36,23,0.3);
}

.audio-player-art.playing { animation-play-state: running; }
.audio-player-art i { font-size: 4rem; color: rgba(255,255,255,0.8); }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.4);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
}

.audio-player-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.35rem;
    transition: var(--transition);
}

.audio-player-controls button:hover { color: var(--orange); transform: scale(1.1); }
.audio-player-controls .play-main { font-size: 1.5rem; }

/* ===== VIDEO INFO ===== */
.player-info {
    padding: 1rem 0;
}

.player-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.player-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.player-channel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.channel-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.channel-details { display: flex; flex-direction: column; gap: 0.1rem; }

.channel-name {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.verified-badge { color: var(--orange); font-size: 0.72rem; }
.channel-sub { font-size: 0.72rem; color: var(--text-muted); }

/* Follow button */
.follow-btn {
    background: var(--orange);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 0.5rem;
}

.follow-btn:hover { background: var(--orange-dark); transform: scale(1.03); }
.follow-btn.following { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }

/* Action pills */
.player-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

.player-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.player-btn:hover { border-color: var(--orange); color: var(--orange); }
.player-btn i { font-size: 0.82rem; }

.player-btn.liked { border-color: var(--orange); color: var(--orange); background: rgba(250,36,23,0.1); }

.player-btn-primary {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

.player-btn-primary:hover { background: var(--orange-dark); color: white; }

/* Premium button */
.premium-btn {
    background: linear-gradient(135deg, #ffd700, #ff9500) !important;
    color: #000 !important;
    border-color: transparent !important;
}

.premium-btn:hover {
    filter: brightness(1.15);
    color: #000 !important;
}

/* Tip button */
.tip-btn i { color: var(--orange); }

/* Combined Like/Dislike pill */
.like-pill {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    transition: var(--transition);
}

.like-pill:hover { border-color: var(--orange); }

.like-half {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0.55rem 0.95rem;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.like-half:hover { color: var(--orange); background: rgba(250,36,23,0.08); }
.like-half.liked { color: var(--orange); }

.like-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

/* Description */
.player-description {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.player-stats-row {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.player-description-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    white-space: pre-wrap;
}

.player-tags {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.player-tag {
    font-size: 0.7rem;
    color: var(--blue-light);
    background: rgba(4,101,178,0.1);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
}

/* Category + language badges shown next to the service-type badge */
.player-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.85rem; }
.info-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.22rem 0.6rem; border-radius: 20px;
    font-size: 0.72rem; font-weight: 600; white-space: nowrap; line-height: 1;
    border: 1px solid transparent;
}
.info-badge i { font-size: 0.62rem; }
.info-badge-cat  { color: var(--blue-light); background: rgba(4,101,178,0.12); border-color: rgba(4,101,178,0.35); }
.info-badge-lang { color: #1aa179; background: rgba(26,161,121,0.12); border-color: rgba(26,161,121,0.35); }

/* ===== COMMENTS ===== */
.comments-section {
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.comments-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.comment-form {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.comment-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.comment-form-body { flex: 1; }

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--orange); }
.comment-form textarea { min-height: 60px; resize: vertical; }

.comment-submit {
    background: var(--orange);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.comment-submit:hover { background: var(--orange-dark); }

.comment-list { display: flex; flex-direction: column; gap: 1rem; }

.comment-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.comment-author { font-weight: 600; font-size: 0.82rem; color: var(--text-primary); }
.comment-time { font-size: 0.7rem; color: var(--text-muted); }

.comment-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
}

.comment-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    margin-top: 0.3rem;
    padding: 0;
}

.comment-delete:hover { color: #ff4444; }

/* ===== UP NEXT SIDEBAR ===== */
.player-sidebar {
    min-width: 0;
}

.up-next-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.up-next-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.up-next-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.up-next-item:hover { background: var(--bg-input); }

.up-next-thumb {
    width: 160px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
    background: #111;
    position: relative;
}

.up-next-thumb img,
.up-next-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.up-next-thumb-audio {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
}

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

.up-next-title-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.up-next-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ===== NOT FOUND ===== */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-muted);
    text-align: center;
}

.not-found i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .player-page { grid-template-columns: 1fr; }
    .up-next-thumb { width: 180px; }
}

@media (max-width: 768px) {
    .player-page { padding: 0.75rem; gap: 1rem; }
    .player-title { font-size: 1rem; }
    .player-actions { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .player-actions::-webkit-scrollbar { display: none; }
    .player-btn { flex-shrink: 0; padding: 0.45rem 0.75rem; font-size: 0.72rem; }

    .up-next-item { padding: 0.3rem; }
    .up-next-thumb { width: 130px; }
    .up-next-title-text { font-size: 0.75rem; }

    .audio-player-art { width: 140px; height: 140px; }
    .audio-player-art i { font-size: 3rem; }

    .comment-form { flex-direction: column; }
    .comment-form-avatar { display: none; }
}

@media (max-width: 480px) {
    .player-page { padding: 0.5rem; }
    .player-title { font-size: 0.92rem; }
    .channel-avatar-lg { width: 36px; height: 36px; font-size: 0.85rem; }
    .player-description { padding: 0.7rem 0.85rem; }
    .up-next-thumb { width: 110px; }
}
