:root {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #f2f4ff, #c7d7ff);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #000;
}

.app {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    max-width: 820px;
    width: 100%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.9rem;
    color: #000;
}

header p {
    margin: 0;
    color: #000;
    max-width: 560px;
}

.script-generator {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(74, 108, 247, 0.18);
    box-shadow: 0 6px 18px rgba(20, 37, 86, 0.08);
    color: #000;
}

.script-generator h2 {
    margin: 0;
    font-size: 1.45rem;
    color: #111;
}

.script-generator p {
    margin: 0;
    color: #000;
}

.script-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.script-generator input,
.script-generator textarea {
    border-radius: 14px;
    border: 1px solid rgba(80, 106, 149, 0.25);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: #111;
    box-shadow: inset 0 1px 4px rgba(15, 23, 40, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.script-generator input:focus,
.script-generator textarea:focus {
    border-color: #4a6cf7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
    background: #fff;
}

.script-generator textarea {
    min-height: 220px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.segment {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(80, 106, 149, 0.12);
    box-shadow: 0 4px 14px rgba(16, 35, 71, 0.08);
    color: #000;
}

.segment-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.segment-heading h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #000;
}

.segment-heading span {
    color: #000;
    font-size: 0.95rem;
    font-weight: 500;
}

label {
    font-weight: 600;
    color: #000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

textarea,
select {
    border-radius: 14px;
    border: 1px solid rgba(80, 106, 149, 0.25);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 4px rgba(15, 23, 40, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: #111;
}

textarea {
    resize: vertical;
    min-height: 130px;
}

textarea:focus,
select:focus {
    border-color: #4a6cf7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

button {
    cursor: pointer;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #5169ff, #8c68ff);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    align-self: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(81, 105, 255, 0.35);
}

#workflow-feedback {
    min-height: 1.5rem;
    color: #2f3b56;
    font-weight: 500;
}

.hint {
    margin: 0;
    color: #5a627c;
    font-size: 0.9rem;
}

#status-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#status-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#status-list li {
    background: rgba(81, 105, 255, 0.08);
    color: #1c2444;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(81, 105, 255, 0.2);
    backdrop-filter: blur(6px);
}

#final-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#final-video {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

#final-download {
    color: #5169ff;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
}

#final-download:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    body {
        padding: 1.5rem;
    }

    .app {
        padding: 1.75rem;
    }

    button {
        width: 100%;
    justify-content: center;
    }
}

textarea::placeholder,
input::placeholder {
    color: rgba(49, 64, 103, 0.75);
}
