/* ========== WATCH PARTY STYLES ========== */

.discord-watch-party-container {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.watch-party-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(13, 14, 16, 0.55);
    color: var(--discord-text, #dbdee1);
}

/* Player Area */
.wp-player-area {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    max-height: 50vh;
    flex-shrink: 0;
}

.wp-player-area iframe,
.wp-player-area video {
    width: 100%;
    height: 100%;
    border: none;
}

.wp-idle-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--discord-text-muted, #949ba4);
}

.wp-idle-screen .wp-idle-icon {
    font-size: 48px;
    opacity: 0.6;
}

.wp-idle-screen .wp-idle-text {
    font-size: 16px;
    font-weight: 500;
}

.wp-idle-screen .wp-idle-hint {
    font-size: 13px;
    color: var(--discord-text-faint, #6d6f78);
}

/* Now Playing Bar */
.wp-now-playing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(13, 14, 16, 0.7);
    border-bottom: 1px solid var(--discord-border, #3f4147);
    min-height: 40px;
    flex-shrink: 0;
}

.wp-now-playing-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.wp-now-playing-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-now-playing-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--discord-blurple, #5865f2);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.wp-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wp-controls button {
    background: var(--discord-input-bg, #383a40);
    border: none;
    color: var(--discord-text, #dbdee1);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.wp-controls button:hover {
    background: var(--discord-active, #404249);
}

.wp-controls .wp-btn-end {
    background: var(--discord-red, #f23f43);
    color: #fff;
}

.wp-controls .wp-btn-end:hover {
    background: #d63031;
}

/* Viewer Count */
.wp-viewer-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--discord-text-muted, #949ba4);
    padding: 0 8px;
    flex-shrink: 0;
}

.wp-viewer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--discord-red, #f23f43);
    animation: wp-pulse 1.5s ease-in-out infinite;
}

@keyframes wp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Queue Section */
.wp-queue-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.wp-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--discord-text-muted, #949ba4);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.wp-queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
}

.wp-queue-empty {
    text-align: center;
    padding: 20px;
    color: var(--discord-text-faint, #6d6f78);
    font-size: 13px;
}

.wp-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.wp-queue-item:hover {
    background: var(--discord-hover, #2a2b30);
}

.wp-queue-item.is-current {
    background: rgba(88, 101, 242, 0.15);
    border-left: 3px solid var(--discord-blurple, #5865f2);
}

.wp-queue-item-num {
    font-size: 12px;
    color: var(--discord-text-faint, #6d6f78);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.wp-queue-item-thumb {
    width: 48px;
    height: 36px;
    border-radius: 4px;
    background: #000;
    flex-shrink: 0;
    overflow: hidden;
}

.wp-queue-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.wp-queue-item-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-queue-item-meta {
    font-size: 11px;
    color: var(--discord-text-faint, #6d6f78);
}

.wp-queue-item-remove {
    background: none;
    border: none;
    color: var(--discord-text-faint, #6d6f78);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
}

.wp-queue-item:hover .wp-queue-item-remove {
    opacity: 1;
}

.wp-queue-item-remove:hover {
    color: var(--discord-red, #f23f43);
    background: rgba(242, 63, 67, 0.1);
}

/* Add to Queue Input */
.wp-add-queue {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid var(--discord-border, #3f4147);
    flex-shrink: 0;
}

.wp-add-queue input {
    flex: 1;
    background: var(--discord-input-bg, #383a40);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--discord-text, #dbdee1);
    font-size: 13px;
    outline: none;
}

.wp-add-queue input::placeholder {
    color: var(--discord-text-faint, #6d6f78);
}

.wp-add-queue input:focus {
    box-shadow: 0 0 0 2px var(--discord-blurple, #5865f2);
}

.wp-add-queue button {
    background: var(--discord-blurple, #5865f2);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
    flex-shrink: 0;
}

.wp-add-queue button:hover {
    background: #4752c4;
}

.wp-add-queue button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Start Party Button */
.wp-start-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.wp-start-btn button {
    background: var(--discord-blurple, #5865f2);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.15s, transform 0.1s;
}

.wp-start-btn button:hover {
    background: #4752c4;
    transform: translateY(-1px);
}

.wp-start-btn p {
    color: var(--discord-text-muted, #949ba4);
    font-size: 13px;
    margin: 0;
}

/* Host Badge */
.wp-host-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--discord-yellow, #f0b232);
    padding: 0 8px;
    flex-shrink: 0;
    font-weight: 600;
}

/* Vote Skip Button */
.wp-btn-vote {
    background: var(--discord-blurple, #5865f2) !important;
    color: #fff !important;
    font-weight: 600;
}

.wp-btn-vote:hover {
    background: #4752c4 !important;
}

.wp-btn-vote:disabled {
    background: var(--discord-active, #404249) !important;
    color: var(--discord-text-muted, #949ba4) !important;
    cursor: default;
}

.wp-vote-count {
    font-size: 11px;
    color: var(--discord-text-muted, #949ba4);
    font-weight: 600;
    padding: 0 4px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-player-area {
        max-height: 35vh;
    }
    
    .wp-now-playing {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .wp-controls {
        width: 100%;
        justify-content: flex-end;
    }
}
