/**
 * ============================================================================
 * THUMBNAILBUILDER COMMAND CENTER - Premium UI Styles
 * Version: 1.0.0
 * ============================================================================
 *
 * Design Specification:
 * - 3-Column Layout: Left (240px) | Center (flex) | Right (320px)
 * - Glassmorphism with blur(12px) and subtle borders
 * - Neon glow effects on active states
 * - Smooth transitions: 300ms cubic-bezier(0.4, 0, 0.2, 1)
 * - WCAG AA Compliant
 */

/* ============================================================================
   CUSTOM PROPERTIES - Command Center Specific
   ============================================================================ */

:root {
    /* Command Center Colors */
    --cc-bg-primary: #0A0E27;
    --cc-bg-panel: #141B3D;
    --cc-bg-panel-glass: rgba(20, 27, 61, 0.6);
    --cc-bg-input: rgba(10, 14, 39, 0.8);

    --cc-primary: #FF6600;
    --cc-purple: #9B59B6;
    --cc-cyan: #00D4FF;

    /* Creator Style Accents */
    --cc-auto: #00D4FF;
    --cc-mrbeast: #FFFF00;
    --cc-hormozi: #F7C204;
    --cc-gadzhi: #FFFFFF;
    --cc-magnates: #FF0000;

    /* Borders */
    --cc-border: rgba(255, 255, 255, 0.1);
    --cc-border-glow: rgba(0, 212, 255, 0.5);

    /* Header Height */
    --cc-header-height: 64px;

    /* Sidebar Widths */
    --cc-sidebar-left: 240px;
    --cc-sidebar-right: 320px;

    /* Transitions */
    --cc-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --cc-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   HEADER - 64px Fixed
   ============================================================================ */

.cc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--cc-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-5);
    background: var(--cc-bg-panel-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cc-border);
    z-index: var(--z-sticky);
}

.cc-header__left,
.cc-header__center,
.cc-header__right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.cc-header__left {
    flex: 0 0 auto;
}

.cc-header__center {
    flex: 1 1 auto;
    justify-content: center;
}

.cc-header__right {
    flex: 0 0 auto;
}

/* Logo */
.cc-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.cc-logo__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cc-purple), #6C3483);
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
}

.cc-logo__text {
    font-family: 'Montserrat', var(--font-sans);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cc-logo__primary {
    color: var(--color-text-primary);
}

.cc-logo__accent {
    color: var(--cc-purple);
}

.cc-header__divider {
    width: 1px;
    height: 24px;
    background: var(--cc-border);
}

.cc-header__mode {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Credits Display */
.cc-credits {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--cc-bg-input);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-full);
}

.cc-credits__icon {
    width: 16px;
    height: 16px;
    color: var(--cc-cyan);
}

.cc-credits__value {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.cc-credits__label {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.cc-credits__add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: var(--space-2);
    background: var(--cc-cyan);
    border: none;
    border-radius: var(--radius-full);
    color: var(--cc-bg-primary);
    cursor: pointer;
    transition: transform var(--cc-transition-fast), box-shadow var(--cc-transition-fast);
}

.cc-credits__add:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

/* Header Buttons */
.cc-header__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--cc-transition-fast);
}

.cc-header__btn:hover {
    background: var(--cc-bg-panel-glass);
    border-color: var(--cc-border);
    color: var(--color-text-primary);
}

/* User Menu */
.cc-user-menu__trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1);
    background: transparent;
    border: none;
    cursor: pointer;
}

.cc-user-menu__avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cc-primary), #E64D00);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: white;
}

.cc-user-menu__chevron {
    color: var(--color-text-tertiary);
    transition: transform var(--cc-transition-fast);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.cc-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
}

.cc-badge--version {
    background: linear-gradient(135deg, var(--cc-purple), #6C3483);
    color: white;
}

.cc-badge--new {
    background: linear-gradient(135deg, #00C853, #00A042);
    color: white;
}

.cc-badge--engagement {
    background: rgba(255, 255, 0, 0.2);
    color: var(--cc-mrbeast);
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.cc-badge--professional {
    background: rgba(247, 194, 4, 0.2);
    color: var(--cc-hormozi);
    border: 1px solid rgba(247, 194, 4, 0.3);
}

.cc-badge--premium {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cc-gadzhi);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cc-badge--cinematic {
    background: rgba(255, 0, 0, 0.2);
    color: var(--cc-magnates);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* ============================================================================
   MAIN LAYOUT - 3 Column Grid
   ============================================================================ */

.cc-layout {
    display: grid;
    grid-template-columns: var(--cc-sidebar-left) 1fr var(--cc-sidebar-right);
    gap: var(--space-5);
    min-height: 100vh;
    padding: calc(var(--cc-header-height) + var(--space-5)) var(--space-5) var(--space-5);
    background: var(--cc-bg-primary);
}

@media (max-width: 1400px) {
    .cc-layout {
        grid-template-columns: 200px 1fr 300px;
        gap: var(--space-4);
    }
}

@media (max-width: 1200px) {
    .cc-layout {
        grid-template-columns: 1fr 300px;
    }
    .cc-sidebar-left {
        display: none;
    }
}

@media (max-width: 900px) {
    .cc-layout {
        grid-template-columns: 1fr;
    }
    .cc-sidebar-right {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        z-index: var(--z-overlay);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        overflow-y: auto;
    }
}

/* ============================================================================
   LEFT SIDEBAR - Projects & Library
   ============================================================================ */

.cc-sidebar-left {
    position: sticky;
    top: calc(var(--cc-header-height) + var(--space-5));
    height: fit-content;
    max-height: calc(100vh - var(--cc-header-height) - var(--space-10));
    overflow-y: auto;
}

/* ============================================================================
   PANELS - Glassmorphism
   ============================================================================ */

.cc-panel {
    position: relative;
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.cc-panel--glass {
    background: var(--cc-bg-panel-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Subtle noise texture */
.cc-panel--glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Top highlight */
.cc-panel--glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.cc-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--cc-border);
}

.cc-panel__title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: 'Montserrat', var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cc-panel__title-icon {
    color: var(--cc-purple);
}

/* ============================================================================
   STEPPER NAVIGATION
   ============================================================================ */

.cc-stepper {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
}

.cc-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--cc-transition-fast);
    text-align: left;
    width: 100%;
}

.cc-step:hover:not(.cc-step--active) {
    background: rgba(255, 255, 255, 0.03);
}

.cc-step__indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--cc-bg-input);
    border: 2px solid var(--cc-border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-text-tertiary);
    transition: all var(--cc-transition);
    flex-shrink: 0;
}

.cc-step--active .cc-step__indicator {
    background: var(--cc-cyan);
    border-color: var(--cc-cyan);
    color: var(--cc-bg-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.cc-step__content {
    flex: 1;
    min-width: 0;
}

.cc-step__title {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-tertiary);
    transition: color var(--cc-transition-fast);
}

.cc-step--active .cc-step__title {
    color: var(--color-text-primary);
}

.cc-step__description {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    opacity: 0;
    transition: opacity var(--cc-transition-fast);
}

.cc-step--active .cc-step__description {
    opacity: 1;
}

/* Connector line */
.cc-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(var(--space-3) + 13px);
    top: calc(100% - 2px);
    width: 2px;
    height: calc(var(--space-1) + 4px);
    background: var(--cc-border);
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.cc-section {
    margin-bottom: var(--space-4);
}

.cc-section__title {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
}

.cc-project-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cc-project-item {
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--cc-transition-fast);
}

.cc-project-item:hover {
    border-color: var(--cc-border);
    background: rgba(255, 255, 255, 0.05);
}

.cc-project-item--empty {
    cursor: default;
}

.cc-project-item--empty:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: transparent;
}

.cc-project-item__text {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ============================================================================
   MAIN CANVAS AREA
   ============================================================================ */

.cc-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    min-height: 0;
}

.cc-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--cc-bg-panel-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.cc-canvas__wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    min-height: 500px;
}

/* Preview Frame */
.cc-preview-frame {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: var(--cc-bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cc-preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.cc-preview-placeholder__icon {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.cc-preview-placeholder__text {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.cc-preview-placeholder__hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.cc-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Safe Frame Overlay */
.cc-safe-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--cc-transition);
}

.cc-safe-frame.visible {
    opacity: 1;
}

.cc-safe-frame__border {
    position: absolute;
    top: 5%;
    left: 3%;
    right: 3%;
    bottom: 5%;
    border: 1px dashed rgba(255, 102, 0, 0.4);
    border-radius: var(--radius-sm);
}

.cc-safe-frame__corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--cc-primary);
    opacity: 0.6;
}

.cc-safe-frame__corner--tl {
    top: 5%;
    left: 3%;
    border-right: none;
    border-bottom: none;
}

.cc-safe-frame__corner--tr {
    top: 5%;
    right: 3%;
    border-left: none;
    border-bottom: none;
}

.cc-safe-frame__corner--bl {
    bottom: 5%;
    left: 3%;
    border-right: none;
    border-top: none;
}

.cc-safe-frame__corner--br {
    bottom: 5%;
    right: 3%;
    border-left: none;
    border-top: none;
}

.cc-safe-frame__danger {
    position: absolute;
    bottom: 8%;
    right: 4%;
    padding: 4px 8px;
    background: rgba(255, 61, 113, 0.2);
    border: 1px dashed var(--color-error);
    border-radius: var(--radius-xs);
    font-size: 9px;
    color: var(--color-error);
    text-transform: uppercase;
}

/* Heuristics Toggle */
.cc-heuristics-toggle {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: all var(--cc-transition-fast);
}

.cc-heuristics-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-text-primary);
}

.cc-heuristics-toggle[aria-pressed="true"],
.cc-heuristics-toggle.active {
    background: var(--cc-cyan);
    border-color: var(--cc-cyan);
    color: var(--cc-bg-primary);
}

/* Heuristics Overlay */
.cc-heuristics-overlay {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-md);
    min-width: 200px;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all var(--cc-transition);
    z-index: 10;
}

.cc-heuristics-overlay.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.cc-heuristics-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--cc-border);
}

.cc-heuristics-overlay__title {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-text-primary);
}

.cc-heuristics-overlay__score {
    padding: 2px 8px;
    background: var(--color-success);
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-weight: var(--weight-semibold);
    color: white;
}

.cc-heuristics-overlay__score.warning {
    background: var(--color-warning);
}

.cc-heuristics-overlay__score.error {
    background: var(--color-error);
}

.cc-heuristics-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) 0;
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.cc-heuristics-item__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.cc-heuristics-item__icon--pass {
    color: var(--color-success);
}

.cc-heuristics-item__icon--warn {
    color: var(--color-warning);
}

.cc-heuristics-item__icon--fail {
    color: var(--color-error);
}

/* Variant Strip */
.cc-variant-strip {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--cc-border);
}

.cc-variant-strip__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
}

.cc-variant-strip__title {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
}

.cc-variant-strip__count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.cc-variant-strip__track {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5) var(--space-4);
    overflow-x: auto;
    scrollbar-width: none;
}

.cc-variant-strip__track::-webkit-scrollbar {
    display: none;
}

.cc-variant-strip__empty {
    width: 100%;
    padding: var(--space-4);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.cc-variant-card {
    flex-shrink: 0;
    width: 160px;
    aspect-ratio: 16 / 9;
    background: var(--cc-bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--cc-transition-fast);
}

.cc-variant-card:hover {
    border-color: var(--cc-border);
    transform: translateY(-2px);
}

.cc-variant-card.active {
    border-color: var(--cc-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.cc-variant-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Buttons */
.cc-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--cc-bg-panel-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-lg);
}

/* ============================================================================
   RIGHT SIDEBAR - Controls
   ============================================================================ */

.cc-sidebar-right {
    position: sticky;
    top: calc(var(--cc-header-height) + var(--space-5));
    height: fit-content;
    max-height: calc(100vh - var(--cc-header-height) - var(--space-10));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--cc-border) transparent;
}

.cc-sidebar-right::-webkit-scrollbar {
    width: 6px;
}

.cc-sidebar-right::-webkit-scrollbar-track {
    background: transparent;
}

.cc-sidebar-right::-webkit-scrollbar-thumb {
    background: var(--cc-border);
    border-radius: var(--radius-full);
}

/* ============================================================================
   CREATOR STYLE CARDS
   ============================================================================ */

.cc-creator-styles {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cc-creator-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: transparent;
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--cc-transition);
    width: 100%;
    text-align: left;
}

.cc-creator-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.cc-creator-card--active {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--cc-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.cc-creator-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cc-creator-card__icon--auto {
    background: rgba(0, 212, 255, 0.15);
    color: var(--cc-auto);
}

.cc-creator-card__icon--mrbeast {
    background: rgba(255, 255, 0, 0.15);
    color: var(--cc-mrbeast);
}

.cc-creator-card__icon--hormozi {
    background: rgba(247, 194, 4, 0.15);
    color: var(--cc-hormozi);
}

.cc-creator-card__icon--gadzhi {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cc-gadzhi);
}

.cc-creator-card__icon--magnates {
    background: rgba(255, 0, 0, 0.15);
    color: var(--cc-magnates);
}

.cc-creator-card__content {
    flex: 1;
    min-width: 0;
}

.cc-creator-card__name {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-primary);
}

.cc-creator-card__desc {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.cc-creator-card__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--cc-cyan);
    border-radius: var(--radius-full);
    color: var(--cc-bg-primary);
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--cc-transition);
}

.cc-creator-card--active .cc-creator-card__check {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================================
   CONTROL GROUPS
   ============================================================================ */

.cc-control-group {
    margin-bottom: var(--space-5);
}

.cc-control-group:last-child {
    margin-bottom: 0;
}

.cc-control-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.cc-control-group__label {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cc-control-group__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.cc-control-group--inline {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ============================================================================
   POSITION GRID (9-cell)
   ============================================================================ */

.cc-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--cc-bg-input);
    border-radius: var(--radius-md);
}

.cc-position-btn {
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--cc-transition-fast);
}

.cc-position-btn::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-text-muted);
    border-radius: var(--radius-full);
    opacity: 0.4;
}

/* Position indicators */
.cc-position-btn[data-position="top-left"]::after { top: 20%; left: 20%; }
.cc-position-btn[data-position="top-center"]::after { top: 20%; left: 50%; transform: translateX(-50%); }
.cc-position-btn[data-position="top-right"]::after { top: 20%; right: 20%; }
.cc-position-btn[data-position="middle-left"]::after { top: 50%; left: 20%; transform: translateY(-50%); }
.cc-position-btn[data-position="middle-center"]::after { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.cc-position-btn[data-position="middle-right"]::after { top: 50%; right: 20%; transform: translateY(-50%); }
.cc-position-btn[data-position="bottom-left"]::after { bottom: 20%; left: 20%; }
.cc-position-btn[data-position="bottom-center"]::after { bottom: 20%; left: 50%; transform: translateX(-50%); }
.cc-position-btn[data-position="bottom-right"]::after { bottom: 20%; right: 20%; }

.cc-position-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cc-position-btn--active,
.cc-position-btn.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--cc-cyan);
}

.cc-position-btn--active::after,
.cc-position-btn.active::after {
    background: var(--cc-cyan);
    opacity: 1;
    box-shadow: 0 0 8px var(--cc-cyan);
}

/* ============================================================================
   SLIDERS
   ============================================================================ */

.cc-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.cc-slider-label {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.cc-slider-value {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.cc-slider-value--accent {
    color: var(--cc-purple);
}

.cc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--cc-bg-input);
    border-radius: var(--radius-full);
    border: 1px solid var(--cc-border);
    cursor: pointer;
}

.cc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--color-text-primary), var(--color-text-secondary));
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--cc-bg-primary);
    transition: transform var(--cc-transition-fast), box-shadow var(--cc-transition-fast);
}

.cc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 12px var(--cc-cyan);
}

.cc-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.cc-slider--purple::-webkit-slider-thumb:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 12px var(--cc-purple);
}

/* ============================================================================
   TOGGLE SWITCH
   ============================================================================ */

.cc-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.cc-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-toggle__track {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--cc-bg-input);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-full);
    transition: all var(--cc-transition-fast);
}

.cc-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--color-text-secondary);
    border-radius: 50%;
    transition: all var(--cc-transition);
}

.cc-toggle__input:checked + .cc-toggle__track {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--cc-cyan);
}

.cc-toggle__input:checked + .cc-toggle__track .cc-toggle__thumb {
    transform: translateX(20px);
    background: var(--cc-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

.cc-toggle__input:focus-visible + .cc-toggle__track {
    outline: 2px solid var(--cc-cyan);
    outline-offset: 2px;
}

.cc-toggle-inline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.cc-toggle-inline__label {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.cc-toggle-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* ============================================================================
   OUTFIT SECTION
   ============================================================================ */

.cc-panel--outfit {
    background: linear-gradient(135deg, var(--cc-bg-panel-glass), rgba(155, 89, 182, 0.05));
}

.cc-outfit-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.cc-outfit-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-3);
    background: var(--cc-bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--cc-transition-fast);
}

.cc-outfit-preset:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--cc-border);
}

.cc-outfit-preset--selected,
.cc-outfit-preset.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--cc-cyan);
}

.cc-outfit-preset.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.cc-outfit-preset__icon {
    font-size: 20px;
}

.cc-outfit-preset__label {
    font-size: 10px;
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    text-align: center;
}

.cc-outfit-custom {
    display: none;
    margin-bottom: var(--space-4);
}

.cc-outfit-custom--visible,
.cc-outfit-custom.visible {
    display: block;
}

.cc-outfit-colors {
    display: flex;
    gap: var(--space-2);
}

.cc-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--cc-transition-fast);
}

.cc-color-swatch:hover {
    transform: scale(1.1);
}

.cc-color-swatch--selected,
.cc-color-swatch.selected {
    border-color: white;
    box-shadow: 0 0 0 2px var(--cc-cyan);
}

/* ============================================================================
   GLASSY MODE SECTION
   ============================================================================ */

.cc-panel--glassy {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(0, 212, 255, 0.05));
}

.cc-glassy-presets {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.cc-glassy-preset {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    background: var(--cc-bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all var(--cc-transition-fast);
}

.cc-glassy-preset:hover {
    border-color: var(--cc-border);
}

.cc-glassy-preset--selected,
.cc-glassy-preset.selected {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(0, 212, 255, 0.2));
    border-color: var(--cc-purple);
    color: white;
}

/* ============================================================================
   GLASSY MODE PREVIEW FILTERS
   Real-time CSS filters to preview glassy mode effects on thumbnails
   ============================================================================ */

/* Base preview frame setup for glassy mode */
.cc-preview-frame {
    --glassy-intensity: 0.5;
}

/* Glassy Mode: Off / None */
.cc-preview-frame[data-glassy="off"] img,
.cc-preview-frame[data-glassy="none"] img {
    filter: none;
}

/* Glassy Mode: Subtle (intensity ~25%) */
.cc-preview-frame[data-glassy="subtle"] img {
    filter: contrast(1.05) saturate(1.05);
}

/* Glassy Mode: Balanced (intensity ~50%) */
.cc-preview-frame[data-glassy="balanced"] img {
    filter: contrast(1.1) saturate(1.08) brightness(1.02);
}

/* Glassy Mode: Cinematic (intensity ~75%) */
.cc-preview-frame[data-glassy="cinematic"] img {
    filter: contrast(1.15) saturate(1.1);
}

/* Glassy Mode: Dramatic (intensity ~100%) */
.cc-preview-frame[data-glassy="dramatic"] img {
    filter: contrast(1.2) saturate(1.15) brightness(0.98);
}

/* Glassy mode cinematic overlay effect (color tint simulation) */
.cc-preview-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: background 0.3s ease, opacity 0.3s ease;
    border-radius: inherit;
    opacity: calc(var(--glassy-intensity) * 0.8);
}

/* Cinematic purple-gold gradient overlay */
.cc-preview-frame[data-glassy="cinematic"]::after {
    background: linear-gradient(135deg, rgba(100, 80, 200, 0.05) 0%, rgba(200, 150, 100, 0.05) 100%);
}

/* Dramatic warm-to-cool gradient overlay */
.cc-preview-frame[data-glassy="dramatic"]::after {
    background: linear-gradient(180deg, rgba(255, 200, 150, 0.08) 0%, rgba(100, 50, 150, 0.08) 100%);
}

/* Balanced subtle warmth overlay */
.cc-preview-frame[data-glassy="balanced"]::after {
    background: linear-gradient(135deg, rgba(255, 250, 245, 0.03) 0%, rgba(245, 240, 255, 0.03) 100%);
}

/* Subtle minimal overlay */
.cc-preview-frame[data-glassy="subtle"]::after {
    background: transparent;
}

/* No overlay for off/none */
.cc-preview-frame[data-glassy="off"]::after,
.cc-preview-frame[data-glassy="none"]::after {
    background: transparent;
    opacity: 0;
}

/* Vignette effect simulation for higher intensities */
.cc-preview-frame[data-glassy="cinematic"]::before,
.cc-preview-frame[data-glassy="dramatic"]::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 100px 20px rgba(0, 0, 0, calc(var(--glassy-intensity) * 0.3));
    z-index: 1;
}

/* ============================================================================
   SUMMARY SECTION
   ============================================================================ */

.cc-panel--summary {
    padding: var(--space-4);
}

.cc-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cc-summary__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--cc-bg-input);
    border-radius: var(--radius-md);
}

.cc-summary__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 16px;
}

.cc-summary__content {
    flex: 1;
}

.cc-summary__label {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.cc-summary__value {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-primary);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--cc-transition-fast);
    min-height: 44px;
}

.cc-btn:focus-visible {
    outline: 2px solid var(--cc-cyan);
    outline-offset: 2px;
}

.cc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cc-btn--primary {
    background: linear-gradient(135deg, var(--cc-primary), #E64D00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.cc-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.cc-btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

.cc-btn--secondary {
    background: var(--cc-bg-panel-glass);
    color: var(--color-text-primary);
    border: 1px solid var(--cc-border);
}

.cc-btn--secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.cc-btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.cc-btn--ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.cc-btn--icon {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
    min-height: 36px;
}

/* ============================================================================
   INPUT
   ============================================================================ */

.cc-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--cc-bg-input);
    border: 1px solid var(--cc-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    transition: all var(--cc-transition-fast);
    min-height: 44px;
}

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

.cc-input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.cc-input:focus {
    outline: none;
    border-color: var(--cc-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: var(--space-3) var(--space-4);
    background: var(--cc-cyan);
    color: var(--cc-bg-primary);
    font-weight: var(--weight-medium);
    z-index: var(--z-max);
    transition: top var(--cc-transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard navigation */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--cc-cyan);
    outline-offset: 2px;
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .cc-header,
    .cc-sidebar-left,
    .cc-sidebar-right,
    .cc-nav-buttons {
        display: none !important;
    }

    .cc-layout {
        display: block;
        padding: 0;
    }

    .cc-main {
        width: 100%;
    }
}

/* ============================================================================
   THUMBNAIL INSPIRATION SECTION
   ============================================================================ */

.cc-panel--inspiration {
    margin-top: 24px;
}

.cc-panel-subtitle {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin: 0 0 var(--space-4) 0;
}

.cc-inspiration-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cc-filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cc-filter-chip.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
}

.cc-inspiration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.cc-inspiration-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
}

.cc-inspiration-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cc-inspiration-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.cc-inspiration-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.cc-inspiration-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.cc-inspiration-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.cc-inspiration-tag {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
}

.cc-inspiration-card.selected {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
}

/* Placeholder images */
.cc-inspiration-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2a2a4e 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* Loading spinner for inspiration grid */
.cc-loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-6);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* Empty state for inspiration grid */
.cc-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-6);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* Error state for inspiration grid */
.cc-error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-6);
    color: var(--color-error);
    font-size: var(--text-sm);
}
