/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding: 0 15px 70px;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
}

/* 顶部导航栏 */
.top-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e8e8e8;
    padding: 10px 15px;
    margin: 0 -15px 15px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.logo i {
    margin-right: 8px;
    color: #667eea;
    font-size: 18px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info {
    text-align: right;
    margin-right: 10px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.user-points {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 600;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 统计横幅 */
.stats-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.stats-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 10px;
}

.stat-item h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-item p {
    font-size: 12px;
    opacity: 0.9;
}

/* 信息卡片 */
.info-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h2 i {
    color: #667eea;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.info-icon i {
    color: white;
    font-size: 18px;
}

.info-content {
    flex: 1;
}

.info-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.info-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 奖品展示区 */
.prizes-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.prizes-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prizes-section h2 i {
    color: #f59e0b;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.prize-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.prize-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.prize-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #f8f9fa;
}

.prize-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.prize-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.prize-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.prize-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.prize-points {
    font-size: 12px;
    font-weight: 600;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prize-stock {
    font-size: 11px;
    color: #999;
}

/* 上传表单 */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.form-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-title i {
    color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: #667eea;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: white;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #999;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* 上传区域 */
.upload-box {
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-box:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #764ba2;
}

.upload-box.dragover {
    background: rgba(102, 126, 234, 0.15);
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.upload-text {
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.file-input-hidden {
    display: none;
}

/* 预览区域 */
.preview-container {
    margin-bottom: 20px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.preview-item:hover img {
    transform: scale(1.05);
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 复选框 */
.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox label {
    font-size: 14px;
    color: #666;
}

.checkbox label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox label a:hover {
    text-decoration: underline;
}

/* 底部固定按钮 */
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 15px;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.fixed-bottom .btn {
    width: 100%;
    max-width: 400px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 20px;
    color: #666;
    line-height: 1.5;
}

.modal-body p {
    margin-bottom: 10px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 上传进度模态框 */
.upload-progress-modal {
    display: flex !important;
}

.upload-progress-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 300px;
    overflow: hidden;
}

.upload-progress-header {
    padding: 20px 20px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.upload-progress-header h3 {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

.upload-progress-body {
    padding: 30px 20px;
}

.progress-container {
    text-align: center;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress-width, 0%);
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.progress-details {
    font-size: 12px;
    color: #999;
}

.upload-progress-footer {
    padding: 15px 20px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e8e8e8;
}

.upload-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* 成功消息 */
.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.success-message i {
    font-size: 18px;
}

/* 排行榜样式 */
.leaderboard {
    margin-top: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.1);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.leaderboard-dept {
    font-size: 12px;
    color: #999;
}

.leaderboard-points {
    font-size: 16px;
    font-weight: 700;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 学生个人中心样式 */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 50px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.menu-item:hover {
    background: #f0f4ff;
    color: #667eea;
    border-color: #667eea;
}

.menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

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

/* 兑换奖品容器 */
.prizes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.prize-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f8f9fa;
}

.prize-content {
    padding: 15px;
}

.prize-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.prize-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.prize-points {
    color: #f59e0b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

/* 兑换记录表格 */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.data-table td {
    font-size: 14px;
    color: #333;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge.verified {
    background: #d1fae5;
    color: #065f46;
}

.badge.pending {
    background: #fef3c7;
    color: #92400e;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #e8e8e8;
    margin-bottom: 15px;
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-state .small {
    font-size: 13px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 0 12px 70px;
    }
    
    .top-nav {
        padding: 10px 12px;
        margin: 0 -12px 12px;
    }
    
    .logo {
        font-size: 14px;
    }
    
    .logo i {
        font-size: 16px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-item h3 {
        font-size: 20px;
    }
    
    .stat-item p {
        font-size: 11px;
    }
    
    .info-card,
    .form-container,
    .prizes-section,
    .content {
        padding: 15px;
    }
    
    .prizes-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .prize-image {
        height: 100px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .menu-item {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .prizes-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .prize-img {
        height: 140px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .prizes-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .prizes-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 750px;
        margin: 0 auto;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard {
        grid-template-columns: 200px 1fr;
    }
    
    .sidebar {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .menu-item {
        justify-content: center;
    }
}