/** ============================================
   AETHERSNAP ORCHESTRATOR - MATERIAL DESIGN 3
   Google Cloud Engineering Tool Aesthetic
   ============================================ */
@import url('styles-blocks.css');
@import url('styles-output.css');

:root {
    /* Material Design 3 - Light Theme */
    --md-sys-color-background: #F8F9FA;
    --md-sys-color-surface: #FFFFFF;
    --md-sys-color-surface-variant: #F1F3F4;
    --md-sys-color-on-surface: #202124;
    --md-sys-color-on-surface-variant: #5F6368;

    /* Google Blue Primary */
    --md-sys-color-primary: #1A73E8;
    --md-sys-color-primary-hover: #1557B0;
    --md-sys-color-primary-container: #E8F0FE;
    --md-sys-color-on-primary: #FFFFFF;

    /* Status Colors */
    --md-sys-color-success: #1E8E3E;
    --md-sys-color-success-container: #E6F4EA;
    --md-sys-color-warning: #F9AB00;
    --md-sys-color-warning-container: #FEF7E0;
    --md-sys-color-error: #D93025;
    --md-sys-color-error-container: #FCE8E6;

    /* Borders & Shadows */
    --md-sys-color-outline: #E0E2E6;
    --md-sys-color-outline-variant: #DADCE0;
    --md-sys-elevation-1: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --md-sys-elevation-2: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);

    /* Border Radius */
    --md-sys-shape-corner-sm: 4px;
    --md-sys-shape-corner-md: 8px;
    --md-sys-shape-corner-lg: 12px;
    --md-sys-shape-corner-full: 9999px;

    /* Typography */
    --md-sys-typescale-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --md-sys-typescale-mono: 'JetBrains Mono', 'Roboto Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    background: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-typescale-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Remove all animated backgrounds */
.bg-grid,
.bg-glow,
.bg-glow-1,
.bg-glow-2,
.scan-line {
    display: none !important;
}

/* ============================================
   HEADER - Cloud Shell Style
   ============================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 48px;
    background: var(--md-sys-color-surface);
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-primary);
    font-size: 16px;
}

.logo-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    letter-spacing: 0;
}

.logo-subtitle {
    display: block;
    font-size: 11px;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

/* Status Bar - Cloud Shell Style */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Header Badges - Model & Quality Indicators */
.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 11px;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    color: var(--md-sys-color-on-surface-variant);
}

.header-badge .badge-icon {
    font-size: 12px;
}

.header-badge .badge-text {
    letter-spacing: 0.3px;
}

.header-badge.model-badge {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.15) 0%, rgba(26, 115, 232, 0.1) 100%);
    border-color: rgba(66, 133, 244, 0.3);
    color: #4285f4;
}

.header-badge.quality-badge {
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.15) 0%, rgba(46, 160, 67, 0.1) 100%);
    border-color: rgba(52, 168, 83, 0.3);
    color: #34a853;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--md-sys-color-success-container);
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 12px;
    color: var(--md-sys-color-success);
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--md-sys-color-success);
    animation: none;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-container {
    display: grid;
    grid-template-columns: 320px 1fr 380px;
    gap: 16px;
    height: calc(100vh - 48px);
    padding: 16px;
    background: var(--md-sys-color-background);
}

.panel {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-lg);
    box-shadow: var(--md-sys-elevation-1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--md-sys-color-outline);
    background: var(--md-sys-color-surface);
}

.panel-header h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0;
}

.panel-icon {
    color: var(--md-sys-color-primary);
    font-size: 18px;
}

.panel-badge {
    font-size: 11px;
    padding: 4px 8px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-sm);
    font-weight: 500;
    letter-spacing: 0;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-outline-variant);
    border-radius: 4px;
    border: 2px solid var(--md-sys-color-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--md-sys-color-on-surface-variant);
}

/* ============================================
   FORM ELEMENTS - Material Design 3
   ============================================ */
.upload-zone {
    border: 2px dashed var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--md-sys-color-surface);
}

.upload-zone:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.upload-text {
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.image-preview {
    position: relative;
    border-radius: var(--md-sys-shape-corner-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--md-sys-color-outline);
}

.image-preview img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* Video Preview */
.video-preview {
    position: relative;
    border-radius: var(--md-sys-shape-corner-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--md-sys-color-outline);
    background: #000;
}

.video-preview video {
    width: 100%;
    height: 160px;
    object-fit: contain;
}

.video-info {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    display: flex;
    gap: 12px;
}

/* Media Type Badge */
.media-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: rgba(66, 133, 244, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 12px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-type-badge.video {
    background: rgba(234, 67, 53, 0.9);
}

.btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--md-sys-color-error);
    color: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.form-section {
    margin-top: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 6px;
}

.form-label .optional {
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 400;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-typescale-body);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px var(--md-sys-color-primary-container);
}

.form-textarea {
    min-height: 72px;
    resize: vertical;
}

/* Industry Selector */
.industry-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.industry-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 10px;
    font-family: var(--md-sys-typescale-body);
}

.industry-btn:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

.industry-btn.active {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.industry-icon {
    font-size: 18px;
}

/* ============================================
   CAMPAIGN CONFIGURATION - PRO PRESETS
   ============================================ */

.campaign-config {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.03) 0%, rgba(156, 39, 176, 0.03) 100%);
    border-radius: var(--md-sys-shape-corner-lg);
    padding: 16px !important;
    border: 1px solid rgba(26, 115, 232, 0.1);
}

.config-subsection {
    margin-bottom: 16px;
}

.config-subsection:last-child {
    margin-bottom: 0;
}

.config-sublabel {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 8px;
}

.hint-badge {
    padding: 2px 6px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Visual Style Dropdown */
.style-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-typescale-body);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.style-select:hover {
    border-color: var(--md-sys-color-primary);
}

.style-select:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* Style Preview Card */
.style-preview {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    padding: 12px;
    margin-top: 10px;
    margin-bottom: 16px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.preview-icon {
    font-size: 20px;
}

.preview-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
}

.preview-label {
    flex-shrink: 0;
}

.preview-value {
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.4;
}

/* Materials Grid */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.material-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.material-btn:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    transform: translateY(-1px);
}

.material-btn.active {
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #1565C0 100%);
    border-color: var(--md-sys-color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.material-btn.active .material-name {
    color: white;
}

.material-icon {
    font-size: 18px;
}

.material-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    font-family: var(--md-sys-typescale-body);
}

.materials-tip {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 10px;
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0.8;
}

/* Legacy chip styles (keep for compatibility) */
.material-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 6px 12px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-full);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--md-sys-typescale-body);
}

.chip:hover {
    border-color: var(--md-sys-color-primary);
}

.chip.active {
    background: var(--md-sys-color-primary-container);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
}

/* ============================================
   LIVE AI LOGS PANEL
   ============================================ */

.live-logs-panel {
    margin-top: 20px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: var(--md-sys-shape-corner-lg);
    overflow: hidden;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border-bottom: 1px solid #30363d;
}

.logs-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #c9d1d9;
}

.logs-icon {
    font-size: 14px;
}

.logs-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logs-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #484f58;
}

.logs-pulse.active {
    background: #3fb950;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(63, 185, 80, 0);
    }
}

.logs-status-text {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-terminal {
    height: 180px;
    overflow-y: auto;
    padding: 12px;
    background: #0d1117;
}

.logs-terminal::-webkit-scrollbar {
    width: 6px;
}

.logs-terminal::-webkit-scrollbar-track {
    background: #161b22;
}

.logs-terminal::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}

.log-entry {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    font-size: 11px;
    line-height: 1.5;
    animation: log-fade-in 0.3s ease-out;
}

@keyframes log-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-time {
    color: #484f58;
    font-size: 10px;
    flex-shrink: 0;
    min-width: 55px;
}

.log-message {
    color: #c9d1d9;
    word-break: break-word;
}

/* Log Types */
.log-entry.log-system .log-message {
    color: #8b949e;
}

.log-entry.log-info .log-message {
    color: #58a6ff;
}

.log-entry.log-success .log-message {
    color: #3fb950;
}

.log-entry.log-warning .log-message {
    color: #d29922;
}

.log-entry.log-error .log-message {
    color: #f85149;
}

.log-entry.log-ai .log-message {
    color: #a371f7;
}

.log-entry.log-imagen .log-message {
    color: #f778ba;
}

.log-entry.log-thinking .log-message {
    color: #79c0ff;
    font-style: italic;
}

/* Log Prefixes */
.log-prefix {
    font-weight: 600;
}

.log-prefix.gemini {
    color: #a371f7;
}

.log-prefix.imagen {
    color: #f778ba;
}

.log-prefix.block {
    color: #58a6ff;
}

.logs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #161b22;
    border-top: 1px solid #30363d;
}

.logs-model {
    font-size: 10px;
    color: #8b949e;
}

.logs-clear-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.logs-clear-btn:hover {
    opacity: 1;
}

/* PDF Upload Zone */
.pdf-upload-zone {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-pdf-upload {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-typescale-body);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-pdf-upload:hover {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
}

.pdf-indicator {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-indicator.loaded {
    color: var(--md-sys-color-success);
    font-weight: 500;
}

.pdf-indicator.analyzed {
    color: var(--md-sys-color-primary);
}

.pdf-indicator .analyzing {
    color: var(--md-sys-color-tertiary);
    animation: pulse 1.5s ease-in-out infinite;
}

.pdf-indicator .analyzed {
    color: var(--md-sys-color-success);
    font-size: 10px;
    opacity: 0.8;
}

.pdf-indicator .error {
    color: var(--md-sys-color-error);
    font-size: 10px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Social Scene Selector - Advanced */
.scene-category-wrapper,
.scene-select-wrapper {
    margin-bottom: 8px;
}

.scene-category-select,
.scene-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-typescale-body);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.scene-category-select:hover,
.scene-select:hover {
    border-color: var(--md-sys-color-primary);
}

.scene-category-select:focus,
.scene-select:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Custom Scene Input */
.custom-scene-wrapper {
    margin-top: 8px;
}

.custom-scene-input {
    display: flex;
    gap: 8px;
}

.custom-scene-text {
    flex: 1;
    padding: 10px 12px;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-surface);
    font-family: var(--md-sys-typescale-body);
    font-size: 13px;
}

.custom-scene-text:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.btn-ai-refine {
    padding: 10px 16px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    border: none;
    border-radius: var(--md-sys-shape-corner-md);
    color: white;
    font-family: var(--md-sys-typescale-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-ai-refine:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.btn-ai-refine:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* AI Refined Result */
.ai-refined-result {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1) 0%, rgba(123, 31, 162, 0.05) 100%);
    border: 1px solid rgba(156, 39, 176, 0.3);
    border-radius: var(--md-sys-shape-corner-md);
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #9C27B0;
}

.ai-result-actions {
    display: flex;
    gap: 6px;
}

.btn-ai-action {
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.btn-ai-action:hover {
    background: var(--md-sys-color-primary-container);
    border-color: var(--md-sys-color-primary);
}

.ai-result-preview {
    padding: 10px;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-sm);
    font-size: 11px;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface);
    max-height: 80px;
    overflow-y: auto;
}

.ai-result-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-meta-tag {
    padding: 3px 8px;
    background: var(--md-sys-color-surface-variant);
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 10px;
    color: var(--md-sys-color-on-surface-variant);
}

/* Selected Scene Preview */
.selected-scene-preview {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--md-sys-color-success-container);
    border-radius: var(--md-sys-shape-corner-sm);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-label {
    color: var(--md-sys-color-success);
    font-weight: 600;
}

.preview-text {
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Execute Button - Filled Button MD3 */
.btn-execute {
    width: 100%;
    padding: 12px 24px;
    margin-top: 20px;
    background: var(--md-sys-color-primary);
    border: none;
    border-radius: var(--md-sys-shape-corner-md);
    color: var(--md-sys-color-on-primary);
    font-family: var(--md-sys-typescale-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0;
}

.btn-execute:hover {
    background: var(--md-sys-color-primary-hover);
    box-shadow: var(--md-sys-elevation-1);
}

.btn-execute:disabled {
    background: var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface-variant);
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 280px 1fr 340px;
        gap: 12px;
    }
}

@media (max-width: 1000px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .panel {
        max-height: none;
    }
}