/* 文件柜样式 - 正式商务版 */
.file-cabinet-container {
    background: #f8f9fa;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    color: #2c3e50;
}

/* 顶部导航 */
.cabinet-header {
    background: #ffffff;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaed;
}

.header-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.5px;
}

.header-tabs {
    display: flex;
    gap: 16px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.tab-item {
    flex: 1;
    padding: 16px 18px;
    background: #ffffff;
    border: 2px solid #e8eaed;
    border-radius: 25px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    color: #5f6368;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 17px;
}

.tab-item:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

.tab-item.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
    box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3);
}

.tab-item i {
    font-size: 16px;
}

/* 内容区域 */
.upload-section, .access-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaed;
}

.upload-card, .access-card {
    max-width: 700px;
    margin: 0 auto;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #dadce0;
    border-radius: 25px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafbfc;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #1a73e8;
    background: #f8f9ff;
}

.upload-area.dragging {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.upload-icon {
    font-size: 48px;
    color: #1a73e8;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #5f6368;
}

/* 表单样式 */
.file-form, .access-form {
    margin-top: 32px;
    width: 100%;
    box-sizing: border-box;
}

.form-item {
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

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

.form-item input, .form-item select {
    width: 100%;
    padding: 16px;
    border: 1px solid #dadce0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    color: #202124;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

.form-item input:focus, .form-item select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

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

/* 按钮样式 */
.submit-btn, .access-btn {
    width: 100%;
    padding: 16px 18px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
    letter-spacing: 0.25px;
}

.submit-btn:hover, .access-btn:hover {
    background: #1765cc;
    box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3);
}

.submit-btn:disabled, .access-btn:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
}

/* 分享结果 */
.share-result {
    margin-top: 32px;
    width: 100%;
    box-sizing: border-box;
}

.share-card {
    background: #e8f5e8;
    color: #137333;
    padding: 24px;
    border-radius: 25px;
    border: 1px solid #c6f6d5;
    width: 100%;
    box-sizing: border-box;
}

.share-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
    font-weight: 500;
}

.share-info {
    width: 100%;
    box-sizing: border-box;
}

.share-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 25px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.share-item label {
    font-weight: 500;
    margin-right: 16px;
    min-width: 80px;
    flex-shrink: 0;
    color: #202124;
}

.share-code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    flex-grow: 1;
    color: #1a73e8;
}

.share-url {
    flex: 1;
    font-size: 14px;
    word-break: break-all;
    margin-right: 12px;
    min-width: 200px;
    color: #5f6368;
}

.copy-btn {
    padding: 8px 16px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-weight: 500;
    font-family: inherit;
}

.copy-btn:hover {
    background: #1765cc;
}

.share-expire {
    font-weight: 500;
    flex-grow: 1;
    color: #202124;
}

/* 文件信息显示 */
.file-info {
    margin-top: 32px;
    padding: 24px;
    background: #ffffff;
    border-radius: 25px;
    border: 1px solid #e8eaed;
    width: 100%;
    box-sizing: border-box;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
    flex-wrap: wrap;
    gap: 12px;
}

.info-header h3 {
    color: #202124;
    font-size: 20px;
    margin: 0;
    flex: 1;
    font-weight: 500;
}

.file-status {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-status:not(.expired) {
    background: #e8f5e8;
    color: #137333;
}

.file-status.expired {
    background: #fce8e6;
    color: #d93025;
}

.file-details {
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.detail-item {
    display: flex;
    margin-bottom: 16px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

.detail-item .label {
    font-weight: 500;
    color: #5f6368;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 14px;
}

.detail-item .value {
    color: #202124;
    flex: 1;
    font-size: 14px;
    word-break: break-word;
}

.file-actions {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-size: 15px;
    letter-spacing: 0.25px;
}

.download-btn:hover {
    background: #1765cc;
    color: white;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3);
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e8eaed;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 消息提示 */
.message {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    box-sizing: border-box;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message.success {
    background: #137333;
}

.message.error {
    background: #d93025;
}

.message.warning {
    background: #ea8600;
}

.message.info {
    background: #1a73e8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-cabinet-container {
        padding: 16px;
    }
    
    .cabinet-header {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .header-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .header-tabs {
        flex-direction: column;
        gap: 12px;
        max-width: none;
    }
    
    .tab-item {
        max-width: none;
        padding: 14px 20px;
    }
    
    .upload-section, .access-section {
        padding: 24px;
    }
    
    .upload-area {
        padding: 32px 20px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .share-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-url {
        margin-right: 0;
        margin-top: 8px;
        min-width: auto;
    }
    
    .info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .info-header h3 {
        font-size: 18px;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .detail-item .label {
        min-width: auto;
    }
    
    .message {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .file-cabinet-container {
        padding: 12px;
    }
    
    .cabinet-header {
        padding: 20px;
    }
    
    .upload-section, .access-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 24px 16px;
    }
    
    .form-item input, .form-item select {
        padding: 14px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .submit-btn, .access-btn {
        padding: 14px 20px;
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 图标字体 */
.icon-upload::before { content: "⬆️"; }
.icon-access::before { content: "🔓"; }
.icon-cloud-upload::before { content: "☁️"; }
.icon-download::before { content: "⬇️"; }

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .file-cabinet-container {
        background: #ffffff;
    }
    
    .cabinet-header,
    .upload-section,
    .access-section,
    .file-info {
        border: 2px solid #000000;
        box-shadow: none;
    }
    
    .upload-area {
        border: 2px solid #000000;
    }
    
    .form-item input,
    .form-item select {
        border: 2px solid #000000;
    }
}