/* ==========================================================================
   SIDE-BY-SIDE LAYOUT: PERMANENT THUMBNAIL LAB (LEFT) + EXACT YOUTUBE (RIGHT)
   ========================================================================== */

:root {
    --yt-bg: #0f0f0f;
    --yt-header-bg: #0f0f0f;
    --yt-text-primary: #f1f1f1;
    --yt-text-secondary: #aaaaaa;
    --yt-border: rgba(255, 255, 255, 0.1);
    --yt-chip-bg: rgba(255, 255, 255, 0.1);
    --yt-chip-hover: rgba(255, 255, 255, 0.2);
    --yt-search-border: #303030;
    --pro-gold: #ffbb00;
    --pro-gold-glow: rgba(255, 187, 0, 0.3);
    --font-yt: "Roboto", "YouTube Sans", "Arial", sans-serif;
    --font-cyber: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--yt-bg);
    color: var(--yt-text-primary);
    font-family: var(--font-main), 'Space Grotesk', sans-serif;
}

/* App Flex Wrapper: Side-by-Side */
.app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   TOOLYARD TOP STUDIO COMMAND BAR & TOOL DOCK
   ========================================================================== */
.toolyard-body {
    background: #09090b;
    color: #f1f1f1;
    overflow-x: hidden;
}

.toolyard-secondary-bar {
    margin-top: 86px;
    height: 56px;
    background: rgba(12, 12, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 500;
    font-family: var(--font-main), 'Space Grotesk', sans-serif;
}

.toolyard-brand-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.toolyard-title {
    font-family: var(--font-display), 'Syncopate', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
}

.toolyard-sub {
    font-size: 0.72rem;
    color: #71717a;
    letter-spacing: 1px;
}

.toolyard-meta-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    color: #cbb382;
    font-weight: 600;
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

@media (max-width: 768px) {
    .toolyard-secondary-bar {
        margin-top: 58px;
        height: auto;
        padding: 10px 16px;
        flex-direction: column;
        gap: 10px;
    }
    .toolyard-brand-tag,
    .toolyard-meta-status {
        display: none;
    }
    .toolyard-nav {
        width: 100%;
        justify-content: space-between;
    }
    .nav-segment {
        flex: 1;
        text-align: center;
        padding: 8px 4px !important;
        font-size: 0.75rem !important;
    }
}

/* Clean Segmented Switcher (Raycast/Linear aesthetic) */
.toolyard-nav {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.nav-segment {
    background: transparent;
    border: none;
    color: #888;
    padding: 6px 16px;
    border-radius: 6px;
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-segment:hover {
    color: #e4e4e7;
}

.nav-segment.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
}

.toolyard-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   SIDEBAR LAYOUT
   ========================================================================== */
.sidebar-panel {
    width: 380px;
    min-width: 360px;
    max-width: 400px;
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    background: #111114;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    padding: 20px 18px 40px;
    flex-shrink: 0;
    z-index: 300;
    font-family: var(--font-cyber);
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.sidebar-panel::-webkit-scrollbar {
    width: 6px;
}
.sidebar-panel::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.sidebar-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-brand-title span.badge {
    font-size: 0.65rem;
    background: #ff0000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.btn-back-portfolio {
    font-size: 0.72rem;
    color: #888;
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.btn-back-portfolio:hover {
    color: #fff;
    border-color: #aaa;
}

/* Tool Mode Switcher in Sidebar */
.mode-switcher-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
}

.btn-mode-tab {
    background: transparent;
    border: none;
    color: #888;
    font-family: var(--font-cyber);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-mode-tab:hover {
    color: #fff;
}
.btn-mode-tab.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.btn-mode-tab.active.compressor-tab {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
}

.slot-counter-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.slot-limit-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
}
.slot-limit-pill.pro {
    background: rgba(255, 187, 0, 0.2);
    color: var(--pro-gold);
    border: 1px solid rgba(255, 187, 0, 0.4);
}

.channel-name-field {
    margin-bottom: 16px;
}
.channel-name-field label {
    display: block;
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
}
.channel-name-field input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    font-family: var(--font-cyber);
}
.channel-name-field input:focus {
    border-color: #ff0000;
}

/* Slot Cards in Sidebar */
.slot-card-item,
.slot-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
}

.slot-card-item.locked,
.slot-item-card.locked {
    border: 1px dashed rgba(255, 187, 0, 0.35);
    background: rgba(255, 187, 0, 0.02);
    cursor: pointer;
}
.slot-card-item.locked:hover,
.slot-item-card.locked:hover {
    border-color: var(--pro-gold);
    background: rgba(255, 187, 0, 0.06);
}

.slot-card-header,
.slot-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slot-card-tag,
.slot-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slot-preview-dropzone,
.slot-thumb-preview-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: 180px;
    max-height: 190px;
    background: #1c1c1f;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.slot-preview-dropzone:hover,
.slot-thumb-preview-box:hover {
    border-color: #ff0000;
}
.slot-preview-dropzone img,
.slot-thumb-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slot-input-row,
.slot-input-group {
    margin-bottom: 10px;
}
.slot-input-row label,
.slot-input-label {
    display: block;
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}
.slot-input-row input,
.slot-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    outline: none;
    font-family: var(--font-cyber);
    box-sizing: border-box;
    display: block;
}
.slot-input-row input:focus,
.slot-input:focus {
    border-color: #ff0000;
}

.slot-metrics-row,
.slot-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-sidebar-add-slot {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e4;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    font-family: var(--font-cyber);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    transition: all 0.2s ease;
}
.btn-sidebar-add-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    transform: translateY(-1px);
}
.btn-sidebar-add-slot:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-remove-slot {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.15s ease, transform 0.15s ease;
    border-radius: 4px;
}
.btn-remove-slot:hover {
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
    transform: scale(1.08);
}

/* ==========================================================================
   RIGHT: EXACT YOUTUBE UI (NEXT TO SIDEBAR)
   ========================================================================== */
.yt-content-panel {
    flex: 1;
    min-width: 0;
    background-color: var(--yt-bg);
    display: flex;
    flex-direction: column;
}

/* 1. YouTube Top Header */
.yt-header {
    height: 56px;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--yt-header-bg);
    position: sticky;
    top: 0;
    z-index: 150;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.yt-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.yt-logo-link {
    display: flex;
    align-items: center;
    position: relative;
    text-decoration: none;
}

.yt-country-code {
    position: absolute;
    top: 1px;
    right: -16px;
    font-size: 10px;
    color: #aaa;
}

/* YouTube Search Bar */
.yt-header-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    max-width: 600px;
    margin: 0 20px;
}

.yt-search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

.yt-search-input {
    flex-grow: 1;
    height: 40px;
    background: #121212;
    border: 1px solid var(--yt-search-border);
    border-right: none;
    border-radius: 40px 0 0 40px;
    padding: 0 16px;
    color: #fff;
    font-size: 16px;
    outline: none;
    font-family: var(--font-yt);
}
.yt-search-input:focus {
    border-color: #1c62b9;
}

.yt-search-btn {
    height: 40px;
    width: 60px;
    background: #222222;
    border: 1px solid var(--yt-search-border);
    border-radius: 0 40px 40px 0;
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.yt-search-btn:hover {
    background: #272727;
}

.yt-mic-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222222;
    border: none;
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* Header Right Actions */
.yt-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-upgrade-pill {
    background: linear-gradient(135deg, #ffbb00, #ff8800);
    color: #000;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 6px 12px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-cyber);
    box-shadow: 0 0 12px var(--pro-gold-glow);
}

.yt-create-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #222222;
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 0 14px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.yt-bell-wrap {
    position: relative;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.yt-bell-badge {
    position: absolute;
    top: 5px;
    right: 3px;
    background: #cc0000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 10px;
}

.yt-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    overflow: hidden;
    cursor: pointer;
}
.yt-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Filter Chips Bar (Sticky under header) */
.yt-chips-container {
    position: sticky;
    top: 56px;
    width: 100%;
    height: 52px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background-color: var(--yt-bg);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.yt-chips-container::-webkit-scrollbar {
    display: none;
}

.yt-chip {
    background: var(--yt-chip-bg);
    color: var(--yt-text-primary);
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--font-yt);
    transition: background 0.15s ease;
}
.yt-chip:hover {
    background: var(--yt-chip-hover);
}
.yt-chip.active {
    background: #f1f1f1;
    color: #0f0f0f;
    font-weight: 600;
}

/* 3. Main YouTube Feed Grid */
.yt-feed-grid-area {
    padding: 24px 24px 80px;
    width: 100%;
}

.yt-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;
    row-gap: 36px;
    width: 100%;
}

@media (min-width: 1600px) {
    .yt-feed-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 1200px) {
    .yt-feed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 750px) {
    .yt-feed-grid {
        grid-template-columns: 1fr;
    }
}

/* Video Card */
.yt-video-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.yt-video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #1c1c1f;
    margin-bottom: 12px;
}

.yt-video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-time-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.user-variation-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff0000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.7);
    z-index: 10;
}

.yt-details-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.yt-channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.yt-channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-meta-content {
    flex-grow: 1;
    min-width: 0;
}

.yt-video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--yt-text-primary);
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.yt-channel-title {
    font-size: 13px;
    color: var(--yt-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}
.yt-channel-title i {
    font-size: 13px;
    color: #aaa;
}

.yt-stats-line {
    font-size: 13px;
    color: var(--yt-text-secondary);
}

.yt-menu-dots {
    color: var(--yt-text-primary);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.yt-video-card:hover .yt-menu-dots {
    opacity: 1;
}

/* ==========================================================================
   TOOLYARD MODULAR WORKSPACES & PDF ENGINE STYLES
   ========================================================================== */
.toolyard-workspace,
.compressor-workspace {
    display: none;
    flex: 1;
    padding: 30px 40px 80px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    font-family: var(--font-cyber);
}

.toolyard-workspace.active,
.compressor-workspace.active {
    display: block;
}

.toolyard-workspace.yt-content-panel {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   UNIFIED COMPRESSOR SIDEBAR CONTROLS
   ========================================================================== */
.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.settings-group {
    margin-bottom: 20px;
}

.group-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.setting-pills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-setting-pill,
.btn-pdf-preset-pill {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #a0a0a5;
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-setting-pill:hover,
.btn-pdf-preset-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-setting-pill.active,
.btn-pdf-preset-pill.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    font-weight: 600;
}

.toolyard-select {
    width: 100%;
    background: #141418;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ddd;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-cyber);
    outline: none;
    cursor: pointer;
}
.toolyard-select:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.settings-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 20px 0;
}

/* ==========================================================================
   WORKSPACE 1: UNIFIED FILE COMPRESSOR
   ========================================================================== */
.toolyard-workspace {
    flex-grow: 1;
    min-height: calc(100vh - 64px);
    background: #09090b;
    padding: 36px 48px;
    overflow-y: auto;
    font-family: var(--font-cyber);
}

.compressor-hero {
    margin-bottom: 26px;
}

.compressor-hero h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.compressor-hero p {
    color: #71717a;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Unified Dropzone */
.unified-dropzone {
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.015);
    border-radius: 10px;
    padding: 44px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 30px;
}

.unified-dropzone:hover,
.unified-dropzone.dragover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
}

.unified-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dropzone-icon {
    font-size: 2rem;
    color: #a1a1aa;
}

.dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropzone-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e4e4e7;
}

.dropzone-browse {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dropzone-sub {
    font-size: 0.78rem;
    color: #71717a;
}

/* Inspection Comparison Viewer */
.split-viewer-wrapper {
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 30px;
}

.split-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.split-viewer-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #d4d4d8;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.split-metrics-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--font-cyber);
}
.metric-pill.orig {
    background: rgba(255, 255, 255, 0.06);
    color: #888;
}
.metric-pill.comp {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.metric-pill.saved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.split-canvas-frame {
    position: relative;
    width: 100%;
    height: 460px;
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
}

.split-image-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.split-image-layer.after {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.split-divider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #fff;
    z-index: 10;
    pointer-events: none;
}

.split-divider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: grab;
}

.split-tag-overlay {
    position: absolute;
    bottom: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ccc;
    z-index: 5;
}
.split-tag-overlay.left { left: 12px; }
.split-tag-overlay.right { right: 12px; }

/* PDF Workspace Area */
.pdf-workspace-area {
    margin-bottom: 30px;
}

.pdf-progress-card {
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.pdf-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 10px;
}

.pdf-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.pdf-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.2s ease;
}

.pdf-result-card {
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.pdf-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pdf-file-info-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-badge-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e4e4e7;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pdf-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.pdf-result-meta {
    font-size: 0.72rem;
    color: #71717a;
    margin-top: 2px;
}

.pdf-action-row {
    margin: 18px 0;
}

.btn-download-pdf-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #000;
    font-family: var(--font-cyber);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-download-pdf-result:hover {
    background: #e4e4e7;
}

.pdf-preview-section {
    margin-top: 18px;
}

.pdf-preview-heading {
    font-size: 0.72rem;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.pdf-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.pdf-page-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 6px;
    text-align: center;
}

.pdf-page-thumb {
    width: 100%;
    aspect-ratio: 1 / 1.35;
    object-fit: contain;
    background: #fff;
    border-radius: 3px;
}

.pdf-page-num {
    font-size: 0.65rem;
    color: #71717a;
    margin-top: 4px;
    font-weight: 500;
}

/* Batch Results Queue */
.batch-queue-container {
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 18px 20px;
}

.batch-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.batch-queue-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #d4d4d8;
}

.btn-download-batch {
    background: #fff;
    color: #000;
    font-family: var(--font-cyber);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-download-batch:hover {
    background: #e4e4e7;
}

.batch-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px 14px;
    gap: 14px;
}

.batch-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.batch-thumb-mini {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: #1a1a1f;
    flex-shrink: 0;
}

.batch-badge-mini {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.batch-file-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #e4e4e7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-file-sizes {
    font-size: 0.72rem;
    color: #71717a;
    margin-top: 2px;
}

.batch-saved-tag {
    color: #4ade80;
    font-weight: 600;
}

.btn-download-single {
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-download-single:hover {
    background: #fff;
    color: #000;
}

/* ==========================================================================
   SAFE-ZONE STUDIO CONTROLS
   ========================================================================== */
.btn-platform-pill {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #a0a0a5;
    font-family: var(--font-cyber);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-platform-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-platform-pill.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    font-weight: 600;
}

.toggle-control-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #ccc;
    cursor: pointer;
    margin-bottom: 8px;
    user-select: none;
}
.toggle-control-row input[type="checkbox"] {
    accent-color: #fff;
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.slider-value-tag {
    font-size: 0.75rem;
    color: #4ade80;
    font-weight: 600;
}

.toolyard-range {
    width: 100%;
    accent-color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
}

.scale-mode-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.btn-secondary-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    font-family: var(--font-cyber);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}
.btn-secondary-action.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: 600;
}

.btn-primary-action {
    background: #fff;
    color: #000;
    font-family: var(--font-cyber);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-primary-action:hover {
    background: #e4e4e7;
}

.full-width {
    width: 100%;
}

/* ==========================================================================
   WORKSPACE 2: SOCIAL SAFE-ZONE STUDIO STYLES
   ========================================================================== */
.safezone-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.safezone-file-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #ccc;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}
.safezone-file-picker:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.safezone-file-picker input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.safezone-meta-pill {
    font-size: 0.75rem;
    color: #888;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}
.safezone-meta-pill span {
    color: #fff;
    font-weight: 600;
}

.safezone-stage-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 540px;
    background: #0d0d10;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 30px 20px;
    overflow: hidden;
}

.safezone-viewport-box {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.safezone-device-frame {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
    background: #000;
    user-select: none;
    transition: width 0.25s ease, height 0.25s ease;
}

.safezone-artwork-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.safezone-artwork-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.safezone-artwork-container.fit-contain img {
    object-fit: contain;
}

/* Safe Margin Guides Layer */
.safezone-guides-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.guide-box {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.guide-tag {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Realistic Mockup UI Layer */
.safezone-mockup-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 25;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: opacity 0.15s ease;
}

/* TikTok / Reels Mockup UI Elements */
.mockup-tt-header {
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.mockup-tt-header span.active {
    font-weight: 700;
    border-bottom: 2px solid #fff;
    padding-bottom: 2px;
}
.mockup-tt-right-actions {
    position: absolute;
    right: 12px;
    bottom: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.mockup-tt-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.mockup-tt-action-item i {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
}
.mockup-tt-action-item span {
    font-size: 0.65rem;
    font-weight: 600;
}
.mockup-tt-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #333;
    overflow: hidden;
    margin-bottom: 4px;
}
.mockup-tt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mockup-tt-disc {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #222;
    border: 5px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinDisc 4s linear infinite;
}
@keyframes spinDisc {
    100% { transform: rotate(360deg); }
}

.mockup-tt-bottom-info {
    position: absolute;
    bottom: 20px;
    left: 14px;
    right: 70px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.mockup-tt-username {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.mockup-tt-caption {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #f1f1f1;
    margin-bottom: 6px;
}
.mockup-tt-audio-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: #e5e5e5;
}

/* ==========================================================================
   FRESH EMPTY / BLANK PLACEHOLDER STATES (SAFE-ZONE & YOUTUBE SIMULATOR)
   ========================================================================== */

/* Safe-Zone Empty Canvas */
.safezone-blank-placeholder {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    padding: 24px 18px;
    background: #0c0c0e radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, rgba(10, 10, 14, 0.98) 100%);
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 45 !important;
}

.safezone-blank-placeholder:hover {
    background: radial-gradient(circle at center, rgba(203, 179, 130, 0.08) 0%, rgba(10, 10, 14, 0.96) 100%);
}

.safezone-blank-placeholder .empty-icon-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #cbb382;
    margin-bottom: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.safezone-blank-placeholder:hover .empty-icon-ring {
    transform: scale(1.08);
    border-color: #cbb382;
    background: rgba(203, 179, 130, 0.12);
}

.safezone-blank-placeholder .empty-title {
    font-family: var(--font-display), 'Syncopate', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    margin-bottom: 6px;
}

.safezone-blank-placeholder .empty-sub {
    font-family: var(--font-main), 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    color: #888892;
    line-height: 1.4;
    margin-bottom: 14px;
    max-width: 200px;
}

.safezone-blank-placeholder .empty-badge {
    font-family: var(--font-main), 'Space Grotesk', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: #cbb382;
    background: rgba(203, 179, 130, 0.08);
    border: 1px solid rgba(203, 179, 130, 0.25);
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 1px;
}

/* YouTube Simulator Sidebar Blank Slot */
.slot-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    pointer-events: none;
}

.slot-empty-content i {
    font-size: 1.8rem;
    color: #ff3333;
    margin-bottom: 6px;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.slot-thumb-preview-box:hover .slot-empty-content i {
    transform: scale(1.1);
    opacity: 1;
}

.slot-empty-content .upload-text {
    font-family: var(--font-cyber), 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.5px;
}

.slot-empty-content .upload-hint {
    font-size: 0.65rem;
    color: #71717a;
    margin-top: 3px;
    font-weight: 500;
}

/* YouTube Video Card Blank Thumb */
.yt-video-thumb-wrap.yt-blank-slot-wrap {
    background: #141416;
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.yt-video-thumb-wrap.yt-blank-slot-wrap:hover {
    border-color: #ff0000;
    background: #1c1c20;
}

.yt-blank-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    pointer-events: none;
}

.yt-blank-slot-content i {
    font-size: 2.2rem;
    color: #ff0000;
    margin-bottom: 8px;
    opacity: 0.9;
    transition: transform 0.25s ease;
}

.yt-video-thumb-wrap.yt-blank-slot-wrap:hover .yt-blank-slot-content i {
    transform: scale(1.12);
    color: #ff3333;
}

.yt-blank-slot-content .blank-slot-title {
    font-family: var(--font-cyber), 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.5px;
}

.yt-blank-slot-content .blank-slot-hint {
    font-size: 0.7rem;
    color: #888892;
    margin-top: 4px;
}
