/* 前端简约风CSS样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4a6fa5;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4a6fa5;
}

/* 统计信息 */
.stats-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.stats-info strong {
    color: #4a6fa5;
    font-weight: 600;
}

/* 主内容区域 */
.main {
    padding: 40px 0;
}

.upload-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.upload-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #4a6fa5;
    background-color: #f0f4f8;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    background-color: #3a5a85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

/* 结果显示区域 */
.result-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 30px;
}

.result-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.link-table {
    width: 100%;
    border-collapse: collapse;
}

.link-table th,
.link-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.link-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.link-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.copy-btn {
    padding: 6px 12px;
    background-color: #f8f9fa;
    color: #4a6fa5;
    border: 1px solid #4a6fa5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: #4a6fa5;
    color: white;
}

/* 公告区域 */
.announcement {
    background: #f8f9fa;
    border-left: 4px solid #4a6fa5;
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 6px 6px 0;
}

.announcement h4 {
    margin-bottom: 10px;
    color: #4a6fa5;
    font-weight: 600;
}

/* 历史记录区域 */
.history-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 30px;
}

.history-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.history-item {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.history-item img,
.history-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.history-info {
    padding: 12px;
}

.history-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.history-actions {
    display: flex;
    gap: 8px;
}

/* 底部 */
.footer {
    background: white;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 50px;
}

.footer p {
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 15px;
    }

    .upload-section,
    .result-section,
    .history-section {
        padding: 20px;
    }

    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .link-table th,
    .link-table td {
        padding: 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .upload-section h2 {
        font-size: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4a6fa5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 登录注册表单 */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.auth-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 20px;
}

.auth-input:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background-color: #3a5a85;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #4a6fa5;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}
