@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0a0a0f;
    color: #d4d0c8;
    min-height: 100vh;
    padding: 20px;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(180, 155, 80, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 155, 80, 0.03) 0%, transparent 50%);
}

.container {
    max-width: 640px;
    margin: 40px auto;
    padding: 0;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(196, 170, 94, 0.15);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #c4aa5e, #a08838);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(196, 170, 94, 0.2);
}

.logo-mark svg {
    width: 24px;
    height: 24px;
}

h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: #f5f0e8;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

h1 .accent {
    background: linear-gradient(135deg, #d4b95e, #c4aa5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #7a756a;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(196, 170, 94, 0.1);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #7a756a;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.tab-btn:hover {
    color: #a09888;
}

.tab-btn.active {
    background: rgba(196, 170, 94, 0.12);
    color: #c4aa5e;
    box-shadow: 0 2px 8px rgba(196, 170, 94, 0.1);
}

/* Auto Tab Description */
.auto-description {
    text-align: center;
    padding: 24px 16px 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(196, 170, 94, 0.08);
}

.auto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(196, 170, 94, 0.15), rgba(196, 170, 94, 0.05));
    border-radius: 12px;
    margin-bottom: 16px;
    color: #c4aa5e;
}

.auto-icon svg {
    width: 24px;
    height: 24px;
}

.auto-description h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #f5f0e8;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.auto-description p {
    color: #7a756a;
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

/* Card form wrapper */
.form-card {
    background: linear-gradient(180deg, rgba(20, 18, 14, 0.8), rgba(14, 13, 10, 0.9));
    border: 1px solid rgba(196, 170, 94, 0.1);
    border-radius: 16px;
    padding: 32px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* Form groups */
.form-group {
    margin-bottom: 28px;
}

.form-group > label:first-child {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c4aa5e;
}

/* Inputs */
input[type="file"],
input[type="url"],
input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(196, 170, 94, 0.15);
    border-radius: 10px;
    color: #e8e3d8;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

input[type="file"] {
    padding: 10px 14px;
    cursor: pointer;
    color: #8a847a;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(196, 170, 94, 0.5);
    box-shadow: 0 0 0 3px rgba(196, 170, 94, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

textarea {
    resize: vertical;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

::placeholder {
    color: #4a4640;
}

.hint {
    display: block;
    color: #5a554a;
    font-size: 0.78rem;
    margin-top: 6px;
    line-height: 1.4;
}

.char-count {
    display: block;
    text-align: right;
    color: #5a554a;
    font-size: 0.78rem;
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

/* Image previews */
.image-previews {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.image-previews img {
    width: 80px;
    height: 142px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(196, 170, 94, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Radio group / Watermark toggle */
.radio-group {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(196, 170, 94, 0.1);
    border-radius: 10px;
    padding: 4px;
}

.radio-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-weight: 400;
    cursor: pointer;
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #7a756a;
    text-transform: none;
    letter-spacing: normal;
    transition: all 0.2s;
}

.radio-group label:has(input:checked) {
    background: rgba(196, 170, 94, 0.12);
    color: #c4aa5e;
}

.radio-group input[type="radio"] {
    display: none;
}

.watermark-option {
    margin-top: 10px;
}

/* Copy button */
.copy-btn {
    margin-top: 8px;
    padding: 7px 16px;
    background: rgba(196, 170, 94, 0.08);
    color: #8a847a;
    border: 1px solid rgba(196, 170, 94, 0.15);
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(196, 170, 94, 0.15);
    color: #c4aa5e;
    border-color: rgba(196, 170, 94, 0.3);
}

/* Select */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23c4aa5e' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

select optgroup {
    color: #8a847a;
    font-weight: 600;
}

select option {
    color: #e8e3d8;
    background: #14120e;
    padding: 6px;
}

/* Divider */
.form-divider {
    height: 1px;
    background: rgba(196, 170, 94, 0.08);
    margin: 32px 0;
}

/* Submit button */
button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #c4aa5e, #a08838);
    color: #0a0a0f;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(196, 170, 94, 0.2);
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #d4ba6e, #b09848);
    box-shadow: 0 6px 28px rgba(196, 170, 94, 0.3);
    transform: translateY(-1px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: rgba(196, 170, 94, 0.15);
    color: #5a554a;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Progress section */
.progress-section {
    margin-top: 24px;
    padding: 24px;
    background: rgba(20, 18, 14, 0.8);
    border: 1px solid rgba(196, 170, 94, 0.1);
    border-radius: 14px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(196, 170, 94, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a08838, #d4b95e);
    border-radius: 3px;
    transition: width 0.4s ease;
    box-shadow: 0 0 12px rgba(196, 170, 94, 0.3);
}

.progress-step {
    color: #8a847a;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.progress-percent {
    color: #c4aa5e;
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Error */
.error {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(60, 20, 20, 0.6);
    border: 1px solid rgba(180, 60, 60, 0.25);
    border-radius: 12px;
    color: #e88080;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Result */
.result {
    margin-top: 32px;
    text-align: center;
}

.result h3 {
    margin-bottom: 20px;
    color: #c4aa5e;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
}

.result video {
    width: 100%;
    max-width: 320px;
    border-radius: 14px;
    margin-bottom: 20px;
    background: #000;
    border: 1px solid rgba(196, 170, 94, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.download-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #c4aa5e, #a08838);
    color: #0a0a0f;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(196, 170, 94, 0.2);
}

.download-btn:hover {
    background: linear-gradient(135deg, #d4ba6e, #b09848);
    box-shadow: 0 6px 28px rgba(196, 170, 94, 0.3);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(196, 170, 94, 0.08);
    color: #3a3530;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 680px) {
    body {
        padding: 12px;
    }
    .container {
        margin: 20px auto;
    }
    .form-card {
        padding: 24px 20px;
        border-radius: 14px;
    }
    h1 {
        font-size: 1.7rem;
    }
}
