/* Player mode styles - video container, controls, subtitle UI */

.player-view {
    display: none;
}

.player-view.active {
    display: block;
}

.player-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-container {
    background: #000;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

video {
    width: 100%;
    display: block;
    max-height: 60vh;
}

@media (max-width: 900px) {
    video {
        max-height: 40vh;
    }
}

/* Controls bar */
.controls {
    padding: 1rem;
    background: #111;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 900px) {
    .controls {
        padding: 0.75rem;
        gap: 0.5rem;
    }
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .control-group {
        gap: 0.3rem;
    }
}

.controls label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .controls label {
        font-size: 0.75rem;
    }
}

.controls select {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #222;
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 120px;
}

@media (max-width: 900px) {
    .controls select {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-width: 90px;
    }
}

.controls select:hover {
    border-color: #555;
}

.controls button {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #222;
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.controls button:hover {
    border-color: var(--color-primary);
    background: rgba(77, 171, 247, 0.1);
}

.controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status indicator */
.status {
    margin-left: auto;
    padding: 0.4rem 0.8rem;
    background: #222;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* Subtitle loading indicator (inline) */
.subtitle-loading {
    display: none;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--color-warning);
    margin-left: 0.25rem;
}

.subtitle-loading.active {
    display: inline-flex;
}

.subtitle-loading .mini-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-warning);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Subtitle progress bar (below video) */
.subtitle-progress {
    display: none;
    background: linear-gradient(135deg, rgba(255, 212, 59, 0.15), rgba(255, 146, 43, 0.15));
    border: 1px solid rgba(255, 212, 59, 0.3);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    margin-top: 0.5rem;
}

.subtitle-progress.active {
    display: block;
}

.subtitle-progress-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-warning);
    font-size: 0.85rem;
}

.subtitle-progress-header .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-warning);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.subtitle-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.subtitle-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-warning), var(--color-orange));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 1.5s ease-in-out infinite;
}

.subtitle-progress-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
}

/* Now Playing */
.now-playing {
    padding: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

.now-playing-title {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.now-playing-name {
    font-size: 1.1rem;
    font-weight: 500;
    word-break: break-word;
}
