/* Playlist page-specific styles */

.playlist-page-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.player-section {
    background: var(--surface-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.start-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.start-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.start-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.4);
}

.start-button:active {
    transform: translateY(0);
}

.video-container {
    width: 100%;
}

.video-player {
    width: 100%;
    height: 50vh;
    min-height: 400px;
    max-height: 60vh;
    border-radius: 0.5rem;
    background: #000;
    outline: none;
    object-fit: contain;
}

.current-video-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.current-video-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.current-video-topic {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.current-video-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.current-video-description {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.45;
    margin-bottom: 0.7rem;
}

.current-video-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.88rem;
}

.current-video-duration,
.current-video-timestamp,
.current-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.current-video-duration,
.current-video-timestamp {
    color: var(--text-muted);
}

.current-video-link,
.current-video-link:link,
.current-video-link:visited {
    color: var(--primary-color);
    text-decoration: none;
}

.current-video-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.control-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.control-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    min-width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.control-btn:active {
    transform: translateY(0);
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 0.5rem;
    background: var(--border-color);
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: "Courier New", monospace;
    min-width: 100px;
}

.playlist-toolbar {
    margin-bottom: 1.15rem;
}

.playlist-filter-label {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}

.playlist-filter-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--border-color);
    border-radius: 0.7rem;
    padding: 0.6rem 0.75rem;
}

.playlist-filter-input-wrap i {
    color: var(--text-muted);
}

.playlist-filter-input-wrap:focus-within {
    border-color: #7aa2ff;
    box-shadow: 0 0 0 2px rgba(122, 162, 255, 0.18);
}

.playlist-filter-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.98rem;
}

.playlist-filter-input::placeholder {
    color: var(--text-muted);
}

/* Hide native search clear controls to keep the custom clear button consistent. */
.playlist-filter-input::-webkit-search-cancel-button,
.playlist-filter-input::-webkit-search-decoration,
.playlist-filter-input::-webkit-search-results-button,
.playlist-filter-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.playlist-filter-clear {
    border: none;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.playlist-filter-clear:hover {
    background: rgba(148, 163, 184, 0.35);
    color: var(--text-primary);
}

.playlist-filter-count {
    margin-top: 0.45rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.playlist-filter-empty {
    margin-top: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.6rem;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.36);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .player-section {
        padding: 1.5rem;
    }

    .start-button {
        padding: 1.25rem 2rem;
        font-size: 1rem;
    }

    .video-player {
        height: 40vh;
        min-height: 250px;
    }

    .control-bar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .progress-container {
        min-width: 100%;
        order: 3;
    }

    .current-video-meta {
        gap: 0.55rem;
    }
}
