/* Bootstrap Icons 字体引入 */
@font-face {
    font-family: "bootstrap-icons";
    src: url("bootstrap-icons/bootstrap-icons.woff2") format("woff2"),
         url("bootstrap-icons/bootstrap-icons.woff") format("woff");
}

.bi {
    font-family: "bootstrap-icons" !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #F8F9FA;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 顶部导航样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #007AFF;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* 主要内容区域 */
.main-content {
    width: 100%;
}

/* 表单区域样式 */
.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-left: 5px;
}

.form-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E5E7;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D1D6;
    border-radius: 8px;
    font-size: 16px;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

/* 上传区域样式 */
.upload-group {
    margin-bottom: 25px;
}

.upload-group:last-child {
    margin-bottom: 0;
}

.upload-group h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.upload-area {
    border: 2px dashed #D1D1D6;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background-color: #FAFAFA;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.upload-area:hover {
    border-color: #007AFF;
    background-color: #F0F8FF;
}

.upload-area.dragover {
    border-color: #007AFF;
    background-color: #E6F3FF;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 5px 0;
    color: #666;
}

.upload-hint {
    font-size: 12px !important;
    color: #999 !important;
}

/* 预览容器 */
.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E5E5E7;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #FF3B30;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.preview-remove:hover {
    background: #D70015;
}

/* 录制提示样式 */
.recording-tips {
    margin-top: 15px;
    padding: 15px;
    background-color: #F0F8FF;
    border-radius: 8px;
    border-left: 4px solid #007AFF;
}

.recording-tips h4 {
    font-size: 14px;
    font-weight: 500;
    color: #007AFF;
    margin-bottom: 8px;
}

.recording-tips ul {
    list-style: none;
    padding-left: 0;
}

.recording-tips li {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.recording-tips li:before {
    content: '•';
    color: #007AFF;
    position: absolute;
    left: 0;
}

/* 提交区域样式 */
.submit-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px 0;
}

.submit-btn {
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}

.submit-btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

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

.submit-note {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* 文档预览样式 */
.document-preview {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #F8F9FA;
    border-radius: 6px;
    border: 1px solid #E5E5E7;
    margin-bottom: 8px;
}

.document-icon {
    font-size: 24px;
    margin-right: 10px;
}

.document-info {
    flex: 1;
}

.document-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.document-size {
    font-size: 12px;
    color: #666;
}

/* 音频预览样式 */
.audio-preview {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 15px;
    padding-right: 35px; /* 为删除按钮留出空间 */
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E5E5E7;
    margin-bottom: 10px;
    width: 100%;
    min-height: 80px;
    overflow: visible; /* 确保删除按钮可见 */
}

/* 确保音频播放器不遮挡删除按钮 */
.audio-preview audio {
    width: 100%;
    height: 40px;
    position: relative;
    z-index: 1;
}

/* 音频删除按钮样式 */
.audio-delete-btn {
    background: #FF3B30;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 10px;
}

.audio-delete-btn:hover {
    background: #D70015;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 音频头部区域 */
.audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.audio-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.audio-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.audio-size {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.audio-preview audio {
    width: 100%;
    height: 40px;
}

/* AMR格式预览提示样式 */
.audio-preview-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #F0F8FF;
    border: 1px dashed #007AFF;
    border-radius: 6px;
    color: #007AFF;
    font-size: 14px;
    text-align: center;
}

.audio-preview-notice i {
    font-size: 18px;
    margin-right: 8px;
}

.audio-preview-notice span {
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .upload-area {
        padding: 20px 15px;
    }
    
    .preview-item {
        width: 80px;
        height: 80px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 12px;
    }
    
    .form-card {
        padding: 15px;
    }
    
    .upload-area {
        padding: 15px 10px;
    }
    
    .upload-icon {
        font-size: 24px;
    }
    
    .preview-container {
        gap: 8px;
    }
    
    .preview-item {
        width: 70px;
        height: 70px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功状态样式 */
.success-message {
    background: #34C759;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
}

/* 错误状态样式 */
.error-message {
    background: #FF3B30;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #E5E5E7;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #007AFF;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 用户协议样式 */
.agreement-content {
    margin-bottom: 20px;
}

.agreement-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.agreement-text {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E5E5E7;
    font-size: 14px;
    line-height: 1.6;
}

.agreement-text p {
    margin-bottom: 12px;
}

.agreement-text p:last-child {
    margin-bottom: 0;
}

.agreement-text strong {
    color: #007AFF;
    font-weight: 600;
}

/* 自定义复选框样式 */
.agreement-checkbox {
    margin-top: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    padding-left: 30px;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #FFFFFF;
    border: 2px solid #D1D1D6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #007AFF;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #007AFF;
    border-color: #007AFF;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

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

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    color: #333;
    font-weight: 500;
}

/* 提交按钮禁用状态 */
.submit-btn:disabled {
    background: #D1D1D6;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.submit-btn:disabled:hover {
    background: #D1D1D6;
    transform: none;
    box-shadow: none;
}

/* 协议区域响应式设计 */
@media (max-width: 768px) {
    .agreement-text {
        max-height: 250px;
        padding: 12px;
        font-size: 13px;
    }
    
    .checkbox-container {
        font-size: 13px;
        padding-left: 28px;
    }
    
    .checkmark {
        height: 16px;
        width: 16px;
    }
    
    .checkbox-container .checkmark:after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
    }
}