/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 表单容器 ==================== */
.form-all {
    max-width: 820px;
    width: 100%;
    background-color: #111111;
    border-radius: 4px;
    padding: 0 38px 38px;
}

.form-header-group {
    padding: 40px 52px;
    margin: 0 -38px;
    background-color: #111111;
    border-bottom: none;
}

.form-header-group .form-header {
    color: #f5f5f5;
    font-size: 28px;
    font-weight: bold;
}

.form-header-group .form-subHeader {
    color: #f5f5f5;
    margin-top: 10px;
    font-size: 15px;
    opacity: 0.8;
}

ul.form-section {
    list-style: none;
    padding: 0;
}

.form-line {
    padding: 16px 8px;
    margin-top: 18px;
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #f5f5f5;
    font-size: 15px;
}

.form-required {
    color: #ff6b6b;
    margin-left: 2px;
}

.form-sub-label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

/* ==================== 输入框 ==================== */
.form-textbox {
    width: 100%;
    max-width: 360px;
    height: 48px;
    padding: 10px 14px;
    background-color: #171717;
    border: 1px solid #2f2f2f;
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textbox:focus {
    border-color: #2f2f2f;
    box-shadow: 0 0 0 3px rgba(47, 47, 47, 0.25);
}

.form-textarea {
    width: 100%;
    max-width: 648px;
    height: 163px;
    padding: 12px 14px;
    background-color: #171717;
    border: 1px solid #2f2f2f;
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 15px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-textarea:focus {
    border-color: #2f2f2f;
    box-shadow: 0 0 0 3px rgba(47, 47, 47, 0.25);
}

/* ==================== 文件上传 ==================== */
.upload-wrapper {
    width: 100%;
    max-width: 648px;
}

.upload-drop-zone {
    border: 2px dashed #2f2f2f;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #171717;
    position: relative;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
    border-color: #30FF70;
    background-color: rgba(48, 255, 112, 0.05);
}

.upload-drop-zone .upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.upload-drop-zone .upload-text {
    font-size: 15px;
    color: #f5f5f5;
}

.upload-drop-zone .upload-hint {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.upload-drop-zone .upload-button {
    display: inline-block;
    padding: 10px 24px;
    background-color: #2f2f2f;
    color: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
    border: none;
    transition: background-color 0.2s;
}

.upload-drop-zone .upload-button:hover {
    background-color: #3f3f3f;
}

.upload-drop-zone input[type="file"] {
    display: none;
}

.file-list {
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #1f1f1f;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 13px;
}

.file-item .file-name {
    color: #f5f5f5;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .file-size {
    color: #888;
    margin: 0 12px;
    white-space: nowrap;
}

.file-item .file-remove {
    color: #ff6b6b;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    padding: 0 4px;
}

.file-item .file-remove:hover {
    color: #ff4444;
}

/* ==================== 提交按钮 ==================== */
.form-buttons-wrapper {
    display: flex;
    justify-content: center;
    padding: 24px 8px 8px;
}

.submit-button {
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    height: 50px;
    padding: 0 40px;
    border: 1px solid #30FF70;
    border-radius: 4px;
    background-color: #30FF70;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-button:hover {
    background-color: rgb(38, 204, 90);
}

/* ==================== 消息提示 ==================== */
.message {
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 38px 0;
    font-size: 15px;
}

.message.success {
    background-color: rgba(48, 255, 112, 0.1);
    border: 1px solid #30FF70;
    color: #30FF70;
}

.message.error {
    background-color: rgba(169, 68, 66, 0.2);
    border: 1px solid #a94442;
    color: #ff6b6b;
}

.debug-info {
    padding: 16px 20px;
    border-radius: 4px;
    margin: 10px 38px 0;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #555;
    color: #ffaa00;
    word-break: break-all;
}

/* ==================== 模态弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: #1a1a1a;
    border: 1px solid #30FF70;
    border-radius: 8px;
    padding: 40px 50px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(48, 255, 112, 0.15);
}

.modal-box p {
    color: #f5f5f5;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-btn {
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    height: 45px;
    padding: 0 50px;
    border: 1px solid #30FF70;
    border-radius: 4px;
    background-color: #30FF70;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-btn:hover {
    background-color: rgb(38, 204, 90);
}

/* 错误弹窗 */
.modal-error {
    border-color: #ff4444;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.15);
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.modal-debug {
    font-size: 13px !important;
    color: #ffaa00 !important;
    margin-bottom: 20px !important;
    word-break: break-all;
    background: rgba(255, 170, 0, 0.05);
    padding: 10px;
    border-radius: 4px;
}

.modal-btn-error {
    border-color: #ff4444;
    background-color: #ff4444;
    color: #fff;
}

.modal-btn-error:hover {
    background-color: #cc3333;
}

/* ==================== 加载沙漏动画 ==================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-overlay.active {
    display: flex;
}

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

.hourglass {
    display: inline-block;
    width: 50px;
    height: 70px;
    position: relative;
    animation: hourglassAnim 1.5s ease-in-out infinite;
}

.hourglass .top,
.hourglass .bottom {
    width: 50px;
    height: 30px;
    border: 3px solid #30FF70;
    position: relative;
}

.hourglass .top {
    border-bottom: none;
    border-radius: 25px 25px 0 0;
}

.hourglass .bottom {
    border-top: none;
    border-radius: 0 0 25px 25px;
}

.hourglass .sand-top,
.hourglass .sand-bottom {
    position: absolute;
    width: 100%;
    background: #30FF70;
}

.hourglass .sand-top {
    top: 0;
    height: 0;
    animation: sandTopAnim 1.5s ease-in-out infinite;
}

.hourglass .sand-bottom {
    bottom: 0;
    height: 100%;
    animation: sandBottomAnim 1.5s ease-in-out infinite;
}

.hourglass .neck {
    position: absolute;
    top: 27px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #30FF70;
    z-index: 2;
}

.hourglass .drop {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: #30FF70;
    border-radius: 50%;
    opacity: 0;
    animation: dropAnim 1.5s ease-in-out infinite;
}

.loading-text {
    color: #f5f5f5;
    font-size: 16px;
    margin-top: 25px;
    letter-spacing: 1px;
    animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes hourglassAnim {
    0%   { transform: rotate(0deg); }
    50%  { transform: rotate(0deg); }
    75%  { transform: rotate(180deg); }
    100% { transform: rotate(180deg); }
}

@keyframes sandTopAnim {
    0%   { height: 100%; }
    50%  { height: 100%; }
    75%  { height: 0; }
    100% { height: 0; }
}

@keyframes sandBottomAnim {
    0%   { height: 0; }
    50%  { height: 0; }
    75%  { height: 100%; }
    100% { height: 100%; }
}

@keyframes dropAnim {
    0%   { opacity: 0; transform: translateX(-50%) translateY(0); }
    25%  { opacity: 1; }
    50%  { opacity: 1; transform: translateX(-50%) translateY(5px); }
    75%  { opacity: 0; transform: translateX(-50%) translateY(10px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==================== 响应式 ==================== */
@media screen and (max-width: 768px) {
    .form-all {
        padding: 0 16px 30px;
    }
    .form-header-group {
        padding: 30px 24px;
        margin: 0 -16px;
    }
    .form-header-group .form-header {
        font-size: 22px;
    }
    .form-textbox {
        max-width: 100%;
    }
    .form-textarea {
        max-width: 100%;
    }
    .form-line {
        padding: 12px 4px;
    }
    .form-buttons-wrapper {
        flex-direction: column;
    }
    .submit-button {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .form-header-group {
        padding: 24px 16px;
    }
    .form-header-group .form-header {
        font-size: 18px;
    }
}
