:root {
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(24, 24, 27, 0.6);
    --error: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    background-image: 
        radial-gradient(circle at 15% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 100%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--accent);
    background: linear-gradient(135deg, #a5b4fc, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-section {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 8px;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.drop-zone {
    width: 100%;
    height: 160px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone__prompt {
    color: var(--text-muted);
    pointer-events: none;
}

.drop-zone__input {
    display: none;
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: var(--error);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.error-msg {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    color: var(--error);
    text-align: center;
    font-size: 0.95rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.scenes-grid {
    display: grid;
    gap: 1.5rem;
}

.scene-card {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.2s ease;
}

.scene-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.scene-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.scene-time {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.9rem;
}

.scene-content h4 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
}

.scene-content p {
    font-size: 0.95rem;
    color: #e4e4e7;
}

.prompt-box {
    background: rgba(0,0,0,0.3);
    padding: 0.8rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #a5b4fc;
    border: 1px dashed rgba(99, 102, 241, 0.3);
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .app-header h1 { font-size: 2rem; }
    .input-section { padding: 1.5rem; }
    .result-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
}
