/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 颜色变量 */
:root {
    --primary-color: #e4393c;
    --secondary-color: #f5c518;
    --text-color: #333;
    --light-text: #666;
    --border-color: #e5e5e5;
    --bg-color: #f5f5f5;
    --white: #fff;
    --success: #52c41a;
    --warning: #faad14;
    --error: #ff4d4f;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.nav ul {
    display: flex;
    gap: 20px;
}

.nav a {
    padding: 5px 10px;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
}

.user-info {
    display: flex;
    gap: 15px;
}

/* 页脚 */
.footer {
    background-color: var(--white);
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
    color: var(--light-text);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #c13026;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #d9b46e;
}

.btn-disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 表单 */
.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.form-item input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s;
}

.form-item input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-item .error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 5px;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
}

.message-success {
    background-color: var(--success);
    color: var(--white);
}

.message-warning {
    background-color: var(--warning);
    color: var(--text-color);
}

.message-error {
    background-color: var(--error);
    color: var(--white);
}

/* 加载指示器 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 确认框 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-content {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.confirm-content h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.confirm-content p {
    margin-bottom: 20px;
    color: var(--light-text);
}

.confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header .container {
        height: 50px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .nav ul {
        gap: 10px;
    }

    .nav a {
        padding: 3px 8px;
    }
} 