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

:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --secondary: #fef9e7;
    --background: linear-gradient(135deg, #ffffff 0%, #fef3c7 50%, #fde68a 100%);
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.lang-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.lang-text {
    font-weight: 600;
}

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

.form-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--text-primary);
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid #fcd34d;
}

.form-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

form {
    padding: 32px;
}

/* Grid Layout for Side-by-Side */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
}

.form-section {
    padding: 24px;
    background: var(--secondary);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
}

.form-section.full-width {
    grid-column: 1 / -1;
}

.section-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.field-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    margin-top: -8px;
}

.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-group.horizontal {
    flex-direction: row;
}

.radio-group.inline {
    gap: 8px;
}

.radio-card {
    flex: 1;
    min-width: 120px;
}

.radio-card.small {
    flex: 0 1 auto;
    min-width: 100px;
}

.radio-card input {
    display: none;
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-card input:checked + .radio-content {
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.1);
}

.radio-content:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.radio-icon {
    font-size: 28px;
}

.radio-icon.orientation-icon {
    width: 60px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orientation-svg {
    width: 100%;
    height: 100%;
    color: var(--primary);
}

.radio-card input:checked + .radio-content .orientation-svg {
    color: var(--primary-dark);
}

.radio-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* Radio Pills */
.radio-pill {
    cursor: pointer;
}

.radio-pill input {
    display: none;
}

.radio-pill span {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.radio-pill input:checked + span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.radio-pill span:hover {
    border-color: var(--primary-light);
}

/* Sub Section */
.sub-section {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    animation: slideDown 0.3s ease;
}

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

.sub-section.hidden {
    display: none;
}

.sub-field {
    margin-bottom: 16px;
}

.sub-field:last-child {
    margin-bottom: 0;
}

.field-label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: #ef4444;
    font-weight: 600;
}

/* Text Inputs */
.text-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.text-input::placeholder {
    color: var(--text-secondary);
}

.textarea {
    min-height: 100px;
    resize: vertical;
}

/* Readonly textarea for script */
textarea[readonly] {
    background: #f8fafc;
    cursor: not-allowed;
    border-color: var(--primary);
}

.script-field {
    min-height: 200px;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
}

textarea[readonly]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.input-with-icon .text-input {
    padding-left: 50px;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
}

.info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.info-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Full-width sections spacing */
.form-section.full-width {
    margin-top: 16px;
}


.declaration-label {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.declaration-label .field-error {
    width: 100%;
    margin-left: 26px;
    margin-top: 4px;
}

.declaration-radio {
    margin-top: 3px;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.declaration-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Inline field error message */
.field-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.field-error.show {
    display: block;
}

/* Declaration spacing */
.declaration-label {
    margin-top: 32px;
    margin-bottom: 8px;
}

/* Asset Upload Section */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.upload-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-input-wrapper {
    position: relative;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: white;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-label:hover {
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.05);
}

.file-icon {
    font-size: 32px;
}

.file-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.file-name {
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 500;
    word-break: break-all;
    min-height: 1.5em;
}

/* Additive File List Styles */
.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

.file-item-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.file-item-remove {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-item-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Submit Button */
.form-actions {
    margin-top: 32px;
}

.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Success State */
.form-card.success .form-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .form-header {
        padding: 32px 24px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    form {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .radio-card {
        min-width: calc(50% - 6px);
    }

    .radio-card.small {
        min-width: calc(50% - 6px);
    }

    .radio-content {
        flex-direction: row;
        justify-content: center;
        padding: 16px;
    }

    .radio-group.inline {
        flex-wrap: wrap;
    }

    .radio-pill span {
        padding: 8px 16px;
        font-size: 14px;
    }
}
