/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
    padding: 20px 0;
}

/* 卡片容器 */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.card-header h3 i {
    margin-right: 8px;
    color: #6c63ff;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #6c63ff;
    color: #fff;
}

.btn-primary:hover {
    background: #5a52d5;
}

.btn-default {
    background: #f0f0f0;
    color: #666;
}

.btn-default:hover {
    background: #e0e0e0;
}

.btn-outline {
    background: #fff;
    color: #6c63ff;
    border: 1px solid #6c63ff;
}

.btn-outline:hover {
    background: #f8f7ff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* 文本颜色 */
.text-success { color: #22c55e; }
.text-danger { color: #ef4444; }
.text-muted { color: #999; }
.text-purple { color: #6c63ff; }

/* 输入框 */
.textarea-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.textarea-input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* 统计行 */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.toast-success { background: #22c55e; }
.toast-error { background: #ef4444; }
.toast-info { background: #6c63ff; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 响应式 */
@media (max-width: 600px) {
    body { padding: 12px; }
    .card-header { padding: 14px 16px; }
    .card-body { padding: 16px; }
    .stats-row { flex-direction: column; }
    .btn-group { flex-direction: column; }
}


/* ========== 公告组件 ========== */

/* 通知栏 */
.ann-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(108, 99, 255, 0.25);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ann-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ann-banner-inner > i {
    font-size: 18px;
    flex-shrink: 0;
}

.ann-banner-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
}

.ann-banner-text strong { font-size: 14px; }

.ann-banner-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ann-banner-close:hover { background: rgba(255, 255, 255, 0.3); }

body:has(.ann-banner) { padding-top: 60px; }

/* 全屏弹窗 */
.ann-modal-mask {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ann-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ann-modal-header {
    background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
    color: #fff;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ann-modal-body {
    padding: 24px 20px;
    color: #444;
    font-size: 14px;
    line-height: 1.7;
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.ann-modal-footer {
    padding: 12px 20px 20px;
    text-align: center;
}

.ann-modal-ok {
    min-width: 120px;
    justify-content: center;
}

@media (max-width: 600px) {
    .ann-banner-inner { padding: 10px 14px; gap: 8px; }
    .ann-banner-text { font-size: 12px; }
    body:has(.ann-banner) { padding-top: 80px; }
}
