:root {
    --primary: #9E7FFF;
    --secondary: #38bdf8;
    --accent: #f472b6;
    --background: #171717;
    --surface: #262626;
    --text: #FFFFFF;
    --text-secondary: #A3A3A3;
    --border: #2F2F2F;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family: system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

.hero { text-align: center; padding: 4rem 2rem; }

.brand-text {
    font-family: "Tac One", sans-serif;
    font-size: 5rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.1em;
}

.content-form { max-width: 800px; margin: 0 auto 3rem; }

.input-group { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }

.input-wrapper { flex: 1; min-width: 200px; }

label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); }

input, select {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.hidden { display: none; }

.section-divider { border: none; border-top: 1px solid var(--border); margin: 4rem 0; }

/* Harness Library */
.harness-library { margin-top: 2rem; margin-bottom: 4rem; opacity: 0.8; }
.harness-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.harness-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
    cursor: pointer;
}
.harness-card.selected { border-color: var(--primary); background: rgba(158,127,255,0.1); }
.harness-badge { position: absolute; top: 1rem; right: 1rem; background: var(--border); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.7rem; }
.harness-sequence { list-style: none; margin-top: 1rem; font-size: 0.85rem; color: var(--text-secondary); }
.harness-sequence li { display: flex; gap: 0.5rem; margin-bottom: 0.25rem; }
.harness-sequence span { background: var(--border); width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.7rem; }

/* Processing */
.process-status { max-width: 600px; margin: 2rem auto; padding: 1.5rem; background: var(--surface); border-radius: 8px; }
.process-step { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.step-indicator { width: 12px; height: 12px; border-radius: 50%; background: var(--text-secondary); }
.step-indicator.complete { background: var(--success); }
.step-indicator.active { background: var(--primary); animation: pulse 1s infinite; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Actors Grid */
.actors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.actor-card { background: var(--surface); border-radius: 12px; overflow: hidden; }
.actor-card img { width: 100%; object-fit: cover; }
.actor-info { padding: 1.25rem; }
.actor-info h3 { margin-bottom: 0.25rem; }
.actor-info .character { font-style: italic; color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.9rem; }

.clip-thumbnails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.clip-thumb-wrapper { display: flex; flex-direction: column; gap: 0.2rem; }
.clip-thumbnail { 
    width: 100%; 
    aspect-ratio: 16 / 9; 
    object-fit: contain; 
    border-radius: 4px; 
    background: #000; 
    border: 1px solid var(--border);
}
.clip-time { font-size: 0.6rem; color: var(--text-secondary); text-align: center; display: block; font-family: monospace; }

.generate-btn { width: 100%; padding: 0.6rem; background: var(--primary); color: white; border: none; border-radius: 4px; cursor: pointer; margin-bottom: 1rem; }

/* Export Controls - Mockitup Style */
.export-controls { display: flex; gap: 0.5rem; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.export-select { flex: 2; padding: 0.4rem; font-size: 0.85rem; }
.export-dl-btn { flex: 1; padding: 0.4rem; background: transparent; border: 1px solid var(--primary); color: var(--primary); border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.export-dl-btn:hover { background: var(--primary); color: white; }

.success-badge { background: var(--success); color: white; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--primary); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
