:root {
    --bg-color: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent: #2997ff;
    --accent-hover: #147ce5;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-strong: rgba(255, 255, 255, 0.15);
    --radius-lg: 15pt;
    --radius-md: 10.5pt;
    --radius-pill: 750pt;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(41, 151, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(164, 69, 178, 0.06) 0%, transparent 40%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   LAYOUT
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================
   HERO
   ========================================== */
.hero {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeUp 0.8s ease-out forwards;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(135deg, #2997ff 0%, #a445b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(0.95rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

/* ==========================================
   AUTH SECTION
   ========================================== */
.auth-section {
    width: 100%;
    display: flex;
    justify-content: center;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.auth-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 36pt;
    text-align: center;
    max-width: 500px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.primary-btn {
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.user-profile {
    background: var(--glass-bg);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================
   ADVANCED SETTINGS COLLAPSIBLE
   ========================================== */
.settings-collapsible {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-collapsible[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border-strong);
}

.settings-summary {
    list-style: none;
    padding: 9pt 13.5pt;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
    transition: color 0.2s ease;
}

.settings-summary::-webkit-details-marker {
    display: none;
}

.settings-summary:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.settings-summary .chevron {
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.settings-collapsible[open] .settings-summary .chevron {
    transform: rotate(180deg);
}

.settings-content {
    padding: 18pt;
    display: flex;
    flex-direction: column;
    gap: 18pt;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ==========================================
   FORM CARD
   ========================================== */
.input-section {
    width: 100%;
    max-width: 800px;
    margin-bottom: 4rem;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.generate-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    padding: 24pt;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 6pt 24pt rgba(0, 0, 0, 0.4),
        inset 0 0.75pt 0 rgba(255, 255, 255, 0.05);
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 18pt;
    align-items: flex-end;
    /* Align inputs to bottom so labels don't throw off the line */
}

.form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-field-flex {
    flex: 1;
}

.form-field-full {
    width: 100%;
}

.field-label {
    margin-left: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    text-align: left;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.8;
}

.field-hint {
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: none;
    font-weight: 400;
}

/* Pill Inputs */
.pill-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    display: flex;
    padding: 0.4rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pill-input:focus-within {
    border-color: rgba(41, 151, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.1);
}

.pill-select {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 10.5pt;
    padding: 6pt 10.5pt;
    outline: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
}

.pill-input:has(.pill-textarea) {
    border-radius: var(--radius-lg);
    padding: 0.75rem;
}

.pill-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    line-height: 1.4;
}

.pill-text-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 10.5pt;
    padding: 6pt 12pt;
    outline: none;
    font-family: inherit;
    min-width: 0;
}

.pill-text-input::placeholder {
    color: rgba(134, 134, 139, 0.5);
}

/* URL Input Row */
.url-input-row {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    display: flex;
    padding: 0.4rem 0.4rem 0.4rem 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.url-input-row:focus-within {
    border-color: rgba(41, 151, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.1);
}

/* Generate Button — accent gradient, not white */
#generate-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
    box-shadow: 0 2px 16px rgba(41, 151, 255, 0.25);
    flex-shrink: 0;
}

#generate-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 24px rgba(41, 151, 255, 0.4);
}

#generate-btn:active {
    transform: scale(0.97);
}

/* Modal generate-btn styling (I Agree button) */
.generate-btn {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
}

.generate-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.generate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(41, 151, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   VERIFICATION BOX
   ========================================== */
.verification-box {
    background: rgba(41, 151, 255, 0.08);
    border: 1px solid rgba(41, 151, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.verify-title {
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.verify-desc {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.verify-desc code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.verify-id-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.verify-id-input {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #fff;
    border: 1px solid var(--glass-border);
    font-family: 'SF Mono', 'Fira Code', monospace;
    width: 220px;
    outline: none;
    transition: border-color 0.2s ease;
}

.verify-id-input:focus {
    border-color: var(--accent);
}

.verify-save-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
}

.verify-save-btn:hover {
    background: var(--accent-hover);
}

/* ==========================================
   STATUS
   ========================================== */
.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================
   RESULT / VIDEO
   ========================================== */
.result-section {
    width: 100%;
    max-width: 500px;
    animation: fadeUp 0.8s ease-out forwards;
}

.video-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.video-wrapper {
    aspect-ratio: 9 / 16;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    margin-bottom: 1.5rem;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Privacy Toggle */
.privacy-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-pill);
    padding: 4px;
    border: 1px solid var(--glass-border);
}

.toggle-option {
    cursor: pointer;
}

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

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    user-select: none;
}

.toggle-option input[type="radio"]:checked+.toggle-label {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* Metadata Editor */
.metadata-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.metadata-editor .field-label {
    margin-left: 0.5rem;
    opacity: 0.8;
}

.metadata-editor .pill-input {
    background: rgba(0, 0, 0, 0.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.publish-btn {
    flex: 1;
    background: #ff0033;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.publish-btn:hover {
    background: #cc0029;
    transform: scale(1.02);
}

.publish-btn:active {
    transform: scale(0.98);
}

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

.publish-btn.success {
    background: #00c853;
}

.download-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-pill);
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid var(--glass-border);
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(1.02);
}

/* ==========================================
   MODAL (TOS)
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(41, 151, 255, 0.08);
    background-image: radial-gradient(circle at 50% 0%, rgba(41, 151, 255, 0.1) 0%, transparent 80%);
    animation: modalIn 0.3s ease-out;
}

.modal h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tos-text {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-height: 40vh;
    overflow-y: auto;
}

.tos-text p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tos-text ul {
    list-style-position: inside;
    margin-left: 0.5rem;
}

.tos-text li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.tos-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: border-color 0.2s ease;
}

.tos-checkbox-container:has(input:checked) {
    border-color: rgba(41, 151, 255, 0.4);
}

.tos-checkbox-container input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.tos-checkbox-container label {
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   UTILITIES
   ========================================== */
.hidden {
    display: none !important;
}

.mb-4 {
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

/* ==========================================
   TABLET (≤ 768px)
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 3rem 1.5rem;
    }

    .hero {
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    h1 br {
        display: none;
    }

    .subtitle {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Form card — remove card on mobile for spacious feel */
    .generate-form {
        padding: 0;
        gap: 1.75rem;
        background: none;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Form stacks */
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .form-field-sm,
    .form-field-lg {
        flex: 1;
    }

    .pill-input {
        padding: 0.5rem;
    }

    .pill-select,
    .pill-text-input {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
    }

    /* URL row: pill for input, button separate below */
    .url-input-row {
        flex-direction: column;
        border-radius: var(--radius-pill);
        padding: 0;
        gap: 0.75rem;
        background: none;
        border: none;
    }

    .url-input-row .pill-text-input {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-pill);
        padding: 1rem 1.25rem;
    }

    .url-input-row:focus-within {
        box-shadow: none;
    }

    #generate-btn {
        width: 100%;
        padding: 1rem;
        border-radius: var(--radius-pill);
        font-size: 1rem;
    }

    /* Result */
    .result-section {
        max-width: 100%;
    }

    .video-container {
        border-radius: var(--radius-md);
    }

    .action-buttons {
        flex-direction: column;
    }

    .publish-btn,
    .download-btn {
        width: 100%;
    }

    /* Verification */
    .verification-box {
        font-size: 0.82rem;
        padding: 1rem;
    }

    .verify-id-input {
        width: 100%;
    }

    .verify-id-row {
        flex-direction: column;
        align-items: stretch;
    }

    .verify-save-btn {
        width: 100%;
        padding: 0.6rem;
        text-align: center;
    }

    /* Modal */
    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        border-radius: 18px;
    }

    .modal h2 {
        font-size: 1.4rem;
    }

    .tos-text {
        padding: 1rem;
        font-size: 0.85rem;
        max-height: 35vh;
    }

    .tos-checkbox-container {
        padding: 0.75rem;
    }

    .tos-checkbox-container label {
        font-size: 0.85rem;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .modal-actions .btn {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
    }
}

/* ==========================================
   SMALL PHONE (≤ 480px)
   ========================================== */
@media (max-width: 480px) {
    .container {
        padding: 2rem 1.25rem;
    }

    .hero {
        margin-bottom: 1.5rem;
        padding: 0 0.25rem;
    }

    h1 {
        font-size: 1.6rem;
        letter-spacing: -0.03em;
    }

    .subtitle {
        font-size: 0.82rem;
    }

    .generate-form {
        padding: 1.25rem;
        gap: 1rem;
        border-radius: 16px;
    }

    .input-section {
        margin-bottom: 2rem;
    }

    .field-label {
        font-size: 0.7rem;
        margin-left: 0.5rem;
    }

    .pill-select,
    .pill-text-input {
        font-size: 0.88rem;
        padding: 0.5rem 0.75rem;
    }

    #generate-btn {
        padding: 0.8rem;
        font-size: 0.88rem;
    }

    .status-message {
        font-size: 0.85rem;
    }

    .toggle-label {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .publish-btn,
    .download-btn {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    .modal-content {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .modal h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .tos-text {
        padding: 0.75rem;
        font-size: 0.8rem;
        max-height: 30vh;
    }

    .tos-text li {
        margin-bottom: 0.5rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ==========================================
   CHECKBOX & THUMBNAIL
   ========================================== */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    gap: 9pt;
    user-select: none;
    text-align: left;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.checkmark {
    height: 15pt;
    min-width: 15pt;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4.5pt;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4.5pt;
    top: 1.5pt;
    width: 3.75pt;
    height: 7.5pt;
    border: solid white;
    border-width: 0 1.5pt 1.5pt 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.thumbnail-preview {
    margin-top: 18pt;
    padding: 18pt;
    background: rgba(255, 255, 255, 0.03);
    border: 1pt dashed var(--glass-border-strong);
    border-radius: var(--radius-md);
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.thumbnail-preview img {
    max-width: 150pt;
    border-radius: 9pt;
    margin-top: 9pt;
    box-shadow: 0 11.25pt 26pt rgba(0, 0, 0, 0.4);
    border: 1pt solid var(--glass-border);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================
   PREMIUM PROGRESS OVERLAY
   ========================================== */
.generation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.generation-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.progress-container {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.progress-circle-svg {
    width: 220px;
    height: 220px;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.progress-circle-val {
    fill: none;
    stroke: url(#progress-gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 628;
    stroke-dashoffset: 628;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-percentage {
    position: absolute;
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.progress-status-container {
    text-align: center;
    max-width: 400px;
}

.progress-main-status {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    display: block;
}

.progress-sub-status {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.progress-container {
    animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px rgba(41, 151, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(41, 151, 255, 0.6)); }
    100% { filter: drop-shadow(0 0 5px rgba(41, 151, 255, 0.3)); }
}
