/* 配音员入驻表单 - 干净紧凑版 */

/* 与全站 .Content 配合：避免宽块撑出横向滚动 */
.teacher-apply-layout {
    max-width: 100%;
    box-sizing: border-box;
}

/* 主容器 - 更紧凑 */
.compact-form {
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--card-border, #d4d4d8);
}

/* 表头 - 步骤说明（主标题在 Hero 区） */
.form-header {
    padding: 16px 24px 12px;
    text-align: center;
    background: #fafafa;
    border-bottom: 1px solid var(--card-border, #d4d4d8);
}

.form-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.form-nav {
    color: #6b7280;
    font-size: 12px;
    margin: 0;
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
    padding: 0 4px;
}

/* 表单主体 */
form#teacher-apply-form {
    padding: 16px 24px 8px;
}

/* 表单区块 - 紧凑 */
.form-section {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.form-section:last-of-type {
    border-bottom: none;
}

/* 区块标题 - 精简 */
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid #3b82f6;
    line-height: 1;
}

/* 表单网格 - 两列紧凑布局 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    min-width: 0;
}

/* 表单组 */
.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

/* 标签 - 小巧 */
.form-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

/* 输入框 - 紧凑 */
.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1118276b;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.form-input:hover {
    border-color: #9ca3af;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* 错误状态 */
.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.field-error {
    display: none;
    color: #dc2626;
    font-size: 11px;
    margin-top: 3px;
}

/* 下拉框 */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236b7280' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}

/* 文本域 - 紧凑 */
.form-textarea {
    min-height: 60px;
    resize: vertical;
    line-height: 1.5;
}

/* 自定义下拉多选框 */
.custom-select-dropdown {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    padding-right: 28px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    position: relative;
    min-height: 34px;
}

.select-trigger:hover {
    border-color: #9ca3af;
}

.select-trigger.active {
    border-color: #3b82f6;
}

.select-placeholder {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.select-placeholder.has-selection {
    color: #111827;
}

.select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    pointer-events: none;
}

.select-arrow::before {
    content: '';
    position: absolute;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #6b7280;
    transition: transform 0.15s;
}

.select-trigger.active .select-arrow::before {
    transform: rotate(180deg);
}

/* 下拉选项 */
.select-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    max-height: 0;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.15s;
}

.select-options.show {
    max-height: 200px;
    overflow-y: auto;
    opacity: 1;
}

.select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: #f3f4f6;
}

.option-text {
    font-size: 13px;
    color: #374151;
}

.select-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.option-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.select-option:hover .option-checkbox {
    border-color: #3b82f6;
}

.select-option input[type="checkbox"]:checked ~ .option-checkbox {
    background: #3b82f6;
    border-color: #3b82f6;
}

.select-option input[type="checkbox"]:checked ~ .option-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

/* 文件上传 - 紧凑 */
.file-upload {
    position: relative;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 16px 12px;
    border: 1.5px dashed #d1d5db;
    border-radius: 6px;
    text-align: center;
    color: #6b7280;
    background: #fafafa;
    font-size: 12px;
    line-height: 1.5;
    transition: all 0.15s;
}

.file-upload-label small {
    color: #9ca3af;
    font-size: 11px;
}

.file-upload:hover .file-upload-label {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.file-upload.file-selected .file-upload-label {
    border-color: #0f766e;
    background: #ecfdf5;
    color: #0f766e;
}

/* 文件预览 */
.file-preview {
    display: none;
    margin-top: 8px;
}

.file-preview.show {
    display: block;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 4px;
    margin-bottom: 6px;
    border: 1px solid var(--card-border, #d4d4d8);
}

.file-name {
    font-size: 12px;
    color: #374151;
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.file-size {
    font-size: 11px;
    color: #9ca3af;
}

/* 上传提示 */
.upload-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    line-height: 1.4;
}

/* 提交区域 - 紧凑 */
.submit-section {
    padding: 16px 24px 24px;
    text-align: center;
}

.submit-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.submit-btn:hover {
    background: #2563eb;
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* 弹窗样式 - 简洁 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.modal-icon.success {
    background: #0f766e;
}

.modal-icon.error {
    background: #ef4444;
}

.modal-icon.loading {
    background: #3b82f6;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.modal-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-btn:hover {
    background: #2563eb;
}

/* 响应式：与全站 768px移动端策略对齐（含大屏手机竖屏、小平板） */
@media (max-width: 768px) {
    .teacher-apply-layout .compact-form {
        margin-left: auto;
        margin-right: auto;
    }

    .compact-form {
        max-width: 100%;
        margin: 12px 0;
        border-radius: 10px;
    }
    
    .form-header {
        padding: 14px 14px 10px;
    }
    
    .form-header h1 {
        font-size: 18px;
    }

    .form-nav {
        font-size: 11px;
    }

    body.teacher-apply-page .compact-form {
        margin: 0;
    }
    
    form#teacher-apply-form {
        padding: 12px 14px 8px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-section {
        padding: 10px 0;
    }
    
    .section-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
  

    .select-trigger {
        min-height: 44px;
    }

 
    
    .submit-section {
        padding: 12px 14px 20px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px;
    }

    .file-upload-label {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .compact-form {
        margin: 8px 0;
        border-radius: 8px;
    }

    .form-header {
        padding: 16px 10px 10px;
    }
}

/* 隐藏不需要的元素 */
#scifi-canvas {
    display: none;
}
