/* 基础设置 */
:root {
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e7e9;
    --error-color: #e74c3c;
    --spacing-unit: 1rem;
}

/* 隐藏原生文件输入 */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.main-container {
    width: 100%;
    max-width: 600px;
    padding: var(--spacing-unit);
    margin: 0 auto;
}

/* 系统标识 */
.system-brand {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.system-brand i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.system-brand h1 {
    color: var(--text-dark);
    font-size: 1.8rem;
}

/* 表单卡片 */
.form-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 文件上传区域 */
.upload-wrapper {
    display: block;
    position: relative;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 2);
    text-align: center;
    transition: all 0.3s;
}

.upload-area.dragover {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.upload-text p {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.file-meta {
    display: none;
    align-items: center;
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(46, 204, 113, 0.08);
    border-radius: 6px;
}

.file-meta i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* 密码输入区域 */
.password-field {
    position: relative;
    margin-bottom: 1.5rem;
}

/* 新增关键样式 */
.password-field input {
    padding-right: 45px; /* 给切换按钮留出空间 */
}

.dragover {
    border-color: #2ecc71 !important;
    background: rgba(46, 204, 113, 0.05);
}

.file-meta {
    display: none; /* 初始隐藏文件信息 */
    animation: fadeIn 0.3s ease;
}

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

/* 响应式优化 */
@media (max-width: 480px) {
    .password-requirements {
        font-size: 0.75rem;
    }
    
    .upload-text p {
        font-size: 0.9rem;
    }
}

/* 新增密码可见性切换按钮样式 */
.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    color: #95a5a6; /* 默认灰色 */
}

.pw-toggle:hover {
    color: #2ecc71; /* 悬停绿色 */
    transform: translateY(-50%) scale(1.1);
}

.pw-toggle i {
    font-size: 18px; /* 调大图标尺寸 */
    vertical-align: middle;
}

/* 密码输入框调整 */
.password-field input {
    padding-right: 45px; /* 增加右侧间距 */
}

/* 文件显示区域优化 */
.file-meta .name {
    max-width: 250px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 在pro-theme.css中添加以下样式 */
select {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: 2px solid #e0e7e9;
    border-radius: 6px;
    font-size: 14px;
    background: white url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 1rem center/12px auto;
    appearance: none;
    transition: border-color 0.3s;
}

select:focus {
    border-color: #2ecc71;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.password-field input {
    width: calc(100% - 40px);
    padding: 0.8rem 40px 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
}

.password-requirements {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 提交按钮 */
.primary-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

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

/* 响应式设计 */
@media (max-width: 480px) {
    .main-container {
        padding: 0.5rem;
    }
    
    .form-card {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 1.5rem;
    }
    
    .password-requirements {
        font-size: 0.75rem;
    }
}