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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 登录/注册页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 12px;
    background: #2575fc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #1b65d6;
}

.error {
    color: red;
    margin-top: 10px;
    text-align: center;
}

/* 头部样式 */
header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.logo h1 {
    color: #2575fc;
    text-align: center;
}

nav {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

nav a:hover {
    color: #2575fc;
}

/* 主内容区域 */
main {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* 功能网格 */
.function-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.function-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.function-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.function-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.use-btn {
    background: #28a745;
    margin-top: 10px;
}

.use-btn:hover {
    background: #218838;
}

.use-btn.disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* 底部导航 */
footer {
    background: white;
    padding: 15px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
}

.bottom-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.bottom-nav a:hover {
    color: #2575fc;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

/* 用户信息样式 */
.user-info {
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.announcements h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.announcement {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.announcement h4 {
    margin-bottom: 10px;
    color: #2575fc;
}
/* 状态样式 */
.status-待处理 { color: #ffc107; font-weight: bold; }
.status-已处理 { color: #17a2b8; font-weight: bold; }
.status-已完成 { color: #28a745; font-weight: bold; }
.status-未使用 { color: #28a745; font-weight: bold; }
.status-已使用 { color: #6c757d; font-weight: bold; }
.status-禁用 { color: #dc3545; font-weight: bold; }

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2575fc;
    margin: 10px 0;
}

/* 警告框 */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 参数行 */
.param-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.param-row input[type="text"] {
    flex: 1;
}

/* 生成的卡密 */
.generated-keys {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.generated-keys code {
    display: block;
    margin-bottom: 5px;
    padding: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
}
/* 账号统计 */
.account-stats {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.account-stats p {
    margin: 0;
    font-size: 1.1em;
}

/* 激活的导航链接 */
nav a.active {
    color: #2575fc;
    border-bottom: 2px solid #2575fc;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .admin-table {
        font-size: 0.9em;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }
    
    .function-grid {
        grid-template-columns: 1fr;
    }
}