/**
 * 大火团任务系统 - 统一样式文件
 * 合并了 index.php、admin.php、tsing.php 的所有样式
 */

/* ========== 全局重置 ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 通用组件 ========== */
/* 消息提示框 */
.msg-box {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.msg-error {
    background: #ffe6e6;
    color: #dc3545;
}

.msg-success {
    background: #e6ffed;
    color: #008c58;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th,
.table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}

.table th {
    background: #f8f9fa;
    white-space: nowrap;
}

/* 卡片容器 */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: #444;
    margin-top: 0;
    margin-bottom: 15px;
}

.card h4 {
    color: #555;
    margin: 15px 0 10px 0;
}

/* 表单元素 */
input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 链接样式 */
a {
    color: #007bff;
    text-decoration: none;
    margin-right: 10px;
}

a:hover {
    text-decoration: underline;
}

a.del {
    color: #dc3545;
}

a.warning {
    color: #ffc107;
}

a.success {
    color: #28a745;
}

/* 柔性布局 */
.flex-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========== 页脚 ========== */
.footer {
    width: 100%;
    text-align: center;
    padding: 20px 10px;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== index.php - 任务领取页面 ========== */
.receive-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.receive-box {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
    margin-bottom: 30px;
}

.receive-box h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.receive-box .form-item {
    margin-bottom: 20px;
}

.receive-box .input-tip {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.receive-box button[type="submit"] {
    width: 100%;
    padding: 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.receive-box button[type="submit"]:hover {
    background-color: #0056b3;
}

.result-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.result-error {
    background-color: #ffe6e6;
    color: #d93025;
}

.result-success {
    background-color: #e6ffed;
    color: #008c58;
}

.result-finish {
    background-color: #fff7e6;
    color: #d48806;
}

.key-content {
    margin: 15px 0;
    font-size: 22px;
    font-weight: bold;
    word-break: break-all;
    line-height: 1.6;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #eee;
}

.info-row {
    font-size: 16px;
    color: #666;
    margin: 8px 0;
    line-height: 1.5;
}

.info-label {
    color: #333;
    font-weight: 500;
}

.copy-btn {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 14px;
    background-color: #f0f7ff;
    color: #007bff;
    border: 1px solid #cce5ff;
    border-radius: 6px;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: #e6f0ff;
}

/* ========== tsing.php - 登录页面 ========== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f5f7fa;
    margin: 0;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-box h2 {
    text-align: center;
    margin: 0 0 20px 0;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.login-box input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #0056b3;
}

.login-error {
    color: #d93025;
    text-align: center;
    margin-bottom: 10px;
}

/* ========== admin.php - 管理后台页面 ========== */
.admin-page {
    background: #f5f7fa;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    position: relative;
    margin-bottom: 20px;
}

.admin-title {
    color: #333;
    margin-bottom: 20px;
}

.logout-btn {
    float: right;
    margin-bottom: 20px;
    padding: 8px 15px;
    background: #6c757d;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
}

.logout-btn:hover {
    background: #5a6268;
    text-decoration: none;
}

.batch-op {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stats-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stats-item {
    flex: 1;
    min-width: 100px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.stats-num {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stats-label {
    font-size: 12px;
    color: #666;
}
