/* Variable Mapping for Homepage vs Room styles compatibility */
:root {
    --bg-page: var(--bg, #f4f5f7);
    --bg-card: var(--glass-card, #ffffff);
    --bg-input: var(--bg, #f4f5f7);
    --text-primary: var(--text, #1a1a1a);
    --text-secondary: var(--muted, #444);
    --text-tertiary: var(--muted, #888);
    --text-muted: var(--muted, #999);
    --border-light: var(--glass-border, rgba(0,0,0,0.06));
    --border-card: var(--border-subtle, rgba(0,0,0,0.04));
    --shadow-card: var(--shadow, 0 8px 30px rgba(0,0,0,0.04));
    --shadow-sm: var(--shadow, 0 2px 10px rgba(0,0,0,0.04));
    --primary: var(--red, #E31B23);
    --primary-hover: var(--red-h, #C1151B);
    --primary-bg: rgba(227,27,35,0.1);
}

[data-theme="dark"] {
    --bg-page: var(--bg, #0f0f0f);
    --bg-card: var(--glass-card, #1a1a1a);
    --bg-input: var(--bg, #252525);
    --text-primary: var(--text, #f0f0f0);
    --text-secondary: var(--muted, #b0b0b0);
    --text-tertiary: var(--muted, #777);
    --text-muted: var(--muted, #666);
    --border-light: var(--glass-border, rgba(255,255,255,0.06));
    --border-card: var(--glass-border, rgba(255,255,255,0.06));
    --shadow-card: var(--shadow, 0 8px 30px rgba(0,0,0,0.3));
    --shadow-sm: var(--shadow, 0 2px 10px rgba(0,0,0,0.2));
    --primary: var(--red, #E31B23);
    --primary-hover: var(--red-h, #ff3b43);
    --primary-bg: rgba(227,27,35,0.15);
}

/* Scoped Overlays */
#homepageMediaPickerModal, #addVideoModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

#homepageMediaPickerModal .modal-content, #addVideoModal .modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.15);
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.2, 0.8, 0.4, 1);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

@keyframes modalIn { 
    from { transform: scale(0.95) translateY(20px); opacity: 0; } 
    to { transform: scale(1) translateY(0); opacity: 1; } 
}

#homepageMediaPickerModal .modal-header, #addVideoModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

#homepageMediaPickerModal .modal-header h2, #addVideoModal .modal-header h2 { 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--text-primary); 
    margin: 0;
}

#homepageMediaPickerModal .modal-close, #addVideoModal .modal-close { 
    background: transparent; 
    border: none; 
    font-size: 20px; 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: color 0.2s; 
}

#homepageMediaPickerModal .modal-close:hover, #addVideoModal .modal-close:hover { 
    color: var(--text-primary); 
}

/* Large Modal layout (Expanded Video Modal & Dashboard) */
#homepageMediaPickerModal .modal-content.large, #addVideoModal .modal-content.large {
    max-width: 900px !important;
    width: 95vw !important;
    height: 85vh !important;
    max-height: 750px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

#homepageMediaPickerModal .modal-content.large .modal-header h2, #addVideoModal .modal-content.large .modal-header h2 {
    color: var(--text-primary);
}

#homepageMediaPickerModal .modal-content.large .platform-btn, #addVideoModal .modal-content.large .platform-btn {
    background: var(--bg-input);
    border: 2px solid var(--border-light);
    color: var(--text-secondary);
}

#homepageMediaPickerModal .modal-content.large .platform-btn.active, #addVideoModal .modal-content.large .platform-btn.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    color: var(--text-primary);
}

#homepageMediaPickerModal .modal-content.large .platform-btn.active i, #addVideoModal .modal-content.large .platform-btn.active i {
    color: var(--primary);
}

/* Tab Views */
.tab-view {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    margin-top: 16px;
}
.tab-view.active {
    display: flex;
}

/* Platform selector grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
}

.platform-item {
    padding: 24px 16px;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 700;
    font-size: 15px;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.platform-item i {
    font-size: 40px;
    transition: transform 0.3s ease;
}

.platform-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}

.platform-item:hover i {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .platform-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .platform-item {
        padding: 16px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
    }
    .platform-item i {
        font-size: 28px;
    }
}

/* YouTube Channel Search Card */
.yt-channel-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-bg);
    border: 1px solid rgba(227,27,35,0.25);
    border-radius: 20px;
    padding: 16px 24px;
    margin-bottom: 16px;
    grid-column: 1 / -1;
    gap: 16px;
    transition: all 0.2s ease;
}
.yt-channel-search-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.yt-channel-search-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.yt-channel-search-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}
.yt-channel-search-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.yt-channel-search-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}
.yt-channel-search-subs {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.yt-channel-search-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.yt-channel-search-btn:hover {
    background: var(--primary-hover);
}
@media (max-width: 600px) {
    .yt-channel-search-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }
    .yt-channel-search-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Web browser tab bar */
.web-tab-bar {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    padding: 8px 16px 0 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 8px;
    flex-shrink: 0;
}
.web-tabs-container {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
}
.web-tabs-container::-webkit-scrollbar {
    display: none;
}
.web-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 180px;
    white-space: nowrap;
    position: relative;
    border-bottom: 1px solid transparent;
}
.web-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.web-tab.active {
    color: var(--primary);
    background: var(--bg-card);
    border-color: var(--primary) var(--border-light) transparent var(--border-light);
    box-shadow: 0 -2px 8px rgba(227,27,35,0.05);
    border-bottom: 1px solid var(--bg-card);
}
.web-tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.web-tab-media-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(227,27,35,0.3);
}
.web-tab-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.web-tab-close:hover {
    background: rgba(227,27,35,0.1);
    color: var(--primary);
}
.web-new-tab-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}
.web-new-tab-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}

/* YouTube search components styling */
.yt-search-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    padding: 4px 0;
}
.yt-search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: 16px;
    border: 2px solid var(--border-light);
    padding: 0 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.yt-search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(227, 27, 35, 0.2);
}
.yt-search-wrapper input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 14px 0 14px 10px;
    color: var(--text-primary);
    outline: none;
    font-size: 14px;
    font-weight: 500;
}
.yt-search-wrapper .search-icon {
    color: var(--text-tertiary);
    font-size: 16px;
}
.yt-search-wrapper button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
}

.yt-playlist-btn {
    background: var(--bg-input);
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    border-radius: 16px;
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}
.yt-playlist-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.yt-modal-body {
    display: flex;
    flex: 1;
    gap: 20px;
    overflow: hidden;
}
.yt-main-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-behavior: smooth;
}
.yt-playlist-drawer {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-input);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
}

.yt-dashboard-section h3, .web-section h3 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.yt-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}
.yt-video-card {
    background: var(--bg-input);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.yt-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--primary);
}
.yt-video-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}
.yt-video-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.yt-video-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.yt-video-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yt-video-channel {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: auto;
}
.yt-video-views {
    font-size: 10px;
    color: var(--text-tertiary);
}

.yt-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,15,15,0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}
.yt-video-card:hover .yt-card-overlay {
    opacity: 1;
    pointer-events: auto;
}
.yt-overlay-btn {
    width: 85%;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
.yt-overlay-btn.play {
    background: var(--primary);
    color: #fff;
}
.yt-overlay-btn.play:hover {
    background: var(--primary-hover);
}
.yt-overlay-btn.queue {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}
.yt-overlay-btn.queue:hover {
    background: rgba(255,255,255,0.25);
}

.yt-horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 12px 0;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}
.yt-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}
.yt-horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}
.yt-horizontal-scroll .yt-video-card {
    width: 180px;
    flex-shrink: 0;
}

.yt-channels-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 0 16px 0;
    scrollbar-width: none;
}
.yt-channels-row::-webkit-scrollbar {
    display: none;
}
.yt-channel-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    width: 80px;
    text-align: center;
}
.yt-channel-logo-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-light);
    transition: all 0.2s;
    background: #000;
}
.yt-channel-bubble:hover .yt-channel-logo-wrapper {
    border-color: var(--primary);
    transform: scale(1.05);
}
.yt-channel-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.yt-channel-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

.yt-playlist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
}
.yt-playlist-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    position: relative;
}
.yt-playlist-item img {
    width: 60px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
}
.yt-playlist-item-info {
    flex: 1;
    overflow: hidden;
}
.yt-playlist-item-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.yt-playlist-item-channel {
    font-size: 10px;
    color: var(--text-secondary);
}
.yt-playlist-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    transition: color 0.2s;
}
.yt-playlist-item-remove:hover {
    color: var(--primary);
}

/* Web Search Tab direct styling */
.web-search-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

/* Spinner */
.spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    #homepageMediaPickerModal .modal-content.large, #addVideoModal .modal-content.large {
        height: 90vh !important;
        max-height: none !important;
    }
    .yt-modal-body {
        flex-direction: column;
        overflow-y: auto;
    }
    .yt-playlist-drawer {
        width: 100%;
        max-height: 200px;
        flex-shrink: 0;
        margin-top: 10px;
    }
    .yt-search-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .yt-playlist-btn {
        justify-content: center;
    }
}

/* Extracted Item for Google Proxy page scan links */
.extracted-item {
    padding: 14px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.extracted-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
}
.extracted-item-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.extracted-item-url {
    font-size: 10px;
    color: var(--text-tertiary);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.extracted-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.extracted-action-btn {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.extracted-action-btn.play {
    background: var(--primary);
    color: #fff;
}
.extracted-action-btn.play:hover {
    background: var(--primary-hover);
}
.extracted-action-btn.queue {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.extracted-action-btn.queue:hover {
    background: var(--bg-hover);
}

/* Media Detected Alert Banner overlay */
.media-detected-alert {
    position: absolute;
    top: 55px;
    left: 16px;
    right: 16px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    border: 1.5px solid var(--primary);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 10px 30px rgba(227, 27, 35, 0.35);
    z-index: 9999;
    animation: alertIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.media-detected-alert .alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    width: 100%;
}

.media-detected-alert .magic-icon {
    font-size: 20px;
    color: var(--primary);
    animation: magicPulse 1.5s infinite alternate;
}

@keyframes magicPulse {
    from { transform: scale(1); filter: drop-shadow(0 0 2px var(--primary)); }
    to { transform: scale(1.15); filter: drop-shadow(0 0 8px var(--primary)); }
}

.media-detected-alert .alert-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    text-align: left;
}

.media-detected-alert .alert-title {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-detected-alert .alert-url {
    font-size: 11px;
    color: #ccc;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.media-detected-alert .alert-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.media-detected-alert .alert-btn {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.media-detected-alert .alert-btn.play {
    background: var(--primary);
    color: #fff;
}

.media-detected-alert .alert-btn.play:hover {
    background: var(--primary-hover);
}

.media-detected-alert .alert-btn.queue {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-detected-alert .alert-btn.queue:hover {
    background: rgba(255, 255, 255, 0.25);
}

.media-detected-alert .alert-btn.dismiss {
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px;
}

.media-detected-alert .alert-btn.dismiss:hover {
    color: #fff;
}

.modal-back {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}
.modal-back:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Homepage Wizard large modal support */
#createRoomModal.large {
    max-width: 900px !important;
    width: 95vw !important;
    height: 85vh !important;
    max-height: 750px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#createRoomModal.large .wizard-content,
#createRoomModal.large #step3 {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Warning cards for extension download */
.warning-card-option {
    border: 2px solid var(--border-light);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}
.warning-card-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.warning-card-option.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 12px rgba(227, 27, 35, 0.15);
}

/* ===== PLATFORM THEME OVERRIDES ===== */
.wz-theme-twitch {
    --wz-accent: #9146FF;
    --wz-accent-hover: #7B2FFF;
    --wz-accent-bg: rgba(145, 70, 255, 0.08);
    --wz-accent-glow: 0 0 20px rgba(145, 70, 255, 0.25);
}
.wz-theme-kick {
    --wz-accent: #53FC18;
    --wz-accent-hover: #44D813;
    --wz-accent-bg: rgba(83, 252, 24, 0.08);
    --wz-accent-glow: 0 0 20px rgba(83, 252, 24, 0.25);
}
.wz-theme-twitch .yt-search-wrapper:focus-within,
.wz-theme-kick .yt-search-wrapper:focus-within {
    border-color: var(--wz-accent);
    box-shadow: var(--wz-accent-glow);
}
.wz-theme-twitch .btn-primary,
.wz-theme-kick .btn-primary {
    background: var(--wz-accent);
}
.wz-theme-twitch .btn-primary:hover,
.wz-theme-kick .btn-primary:hover {
    background: var(--wz-accent-hover);
    box-shadow: var(--wz-accent-glow);
}
.wz-theme-twitch .progress-bar,
.wz-theme-kick .progress-bar { background: var(--wz-accent); }

/* ===== STREAM CARDS (Twitch/Kick) ===== */
.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.stream-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}
.stream-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.stream-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1a2e;
    overflow: hidden;
}
.stream-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stream-card-thumb .live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #E31B23;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wz-theme-twitch .live-badge { background: #9146FF !important; }
.wz-theme-kick .live-badge { background: #53FC18 !important; color: #000 !important; }
.stream-card-thumb .viewers-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stream-card-thumb .viewers-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E31B23;
}
.wz-theme-twitch .viewers-badge::before { background: #9146FF !important; }
.wz-theme-kick .viewers-badge::before { background: #53FC18 !important; }
.stream-card-info {
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.stream-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-hover);
}
.stream-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stream-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stream-card-channel {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.stream-card-game {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stream-card-thumb .stream-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.stream-card:hover .stream-overlay { opacity: 1; }
.stream-overlay-btn {
    padding: 8px 16px;
    background: #E31B23;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.wz-theme-twitch .stream-overlay-btn { background: #9146FF !important; }
.wz-theme-kick .stream-overlay-btn { background: #53FC18 !important; color: #000 !important; }
.streamer-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-width: 80px;
    max-width: 80px;
    transition: transform 0.2s;
}
.streamer-bubble:hover { transform: translateY(-3px); }
.streamer-bubble-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}
.wz-theme-twitch .streamer-bubble-avatar { border-color: rgba(145, 70, 255, 0.3); }
.wz-theme-kick .streamer-bubble-avatar { border-color: rgba(83, 252, 24, 0.3); }
.streamer-bubble-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}
