/* 文件快递取件柜系统 - 响应式样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --success-color: #52c41a;
    --danger-color: #ff4d4f;
    --warning-color: #faad14;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    background: var(--primary-color);
    color: var(--white);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #389e0d;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #cf1322;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.captcha-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.captcha-group .form-control {
    flex: 1;
}

.captcha-img {
    height: 40px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: 8px;
    margin: 30px 0;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    min-width: 150px;
    background: var(--white);
    color: var(--primary-color);
}

.hero-buttons .btn:hover {
    background: rgba(255,255,255,0.9);
}

/* 取件页面 */
.pickup-form {
    max-width: 500px;
    margin: 40px auto;
}

.pickup-code-input {
    font-size: 24px;
    text-align: center;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

.content-display {
    margin-top: 30px;
}

.content-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.content-video {
    width: 100%;
    max-width: 800px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.content-text {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.content-info {
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.content-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.content-info-item:last-child {
    border-bottom: none;
}

/* 上传页面 */
.upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 内容列表 */
.content-list {
    list-style: none;
}

.content-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.content-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.content-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.content-item-title {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-color);
    flex: 1;
}

.content-item-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
}

.content-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending {
    background: #fff7e6;
    color: #d46b08;
}

.badge-approved {
    background: #f6ffed;
    color: #389e0d;
}

.badge-rejected {
    background: #fff1f0;
    color: #cf1322;
}

/* 用户中心 */
.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
}

/* 提示消息 */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.alert-error {
    background: #fff1f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.alert-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .pickup-code-input {
        font-size: 20px;
        letter-spacing: 3px;
    }
    
    .user-stats {
        grid-template-columns: 1fr;
    }
    
    .content-item-header {
        flex-direction: column;
    }
    
    .content-item-actions {
        flex-wrap: wrap;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    .captcha-img {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .hero {
        padding: 40px 15px;
    }
    
    .file-upload-area {
        padding: 20px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
