/* 全局样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
}
.navbar-brand .brand-logo {
    height: 30px;
    width: auto;
    margin-right: 6px;
}


.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    transition: color 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
    color: white;
}

.hero-content {
    text-align: center;
    padding: 60px 0;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.event-card {
    border-left: 4px solid var(--primary-color);
}

/* 按钮 */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 表单 */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.6rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 表格 */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 徽章 */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
}

/* 登录/注册页面 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    max-width: 450px;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.auth-body {
    padding: 40px;
}

/* 侧边栏 */
.sidebar {
    background: white;
    min-height: calc(100vh - 56px);
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    margin: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* 统计卡片 */
.stat-card {
    border-radius: 10px;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card i {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 15px 0 5px;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-content {
        padding: 30px 15px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-headline {
        font-size: 1.35rem;
    }

    .hero-slogan {
        font-size: 1rem;
    }

    .hero-desc {
        font-size: 0.85rem;
        max-width: 100%;
    }

    .hero-banner {
        min-height: 280px;
    }

    .sidebar {
        min-height: auto;
    }

    /* 导航栏品牌缩小 */
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar-brand .brand-logo {
        height: 24px;
    }

    /* 卡片间距压缩 */
    .card {
        margin-bottom: 0.75rem;
    }

    /* 报名截止/人数限制/学分认定胶囊：手机端缩小内边距和字号 */
    .deadline-pill {
        font-size: 0.78rem !important;
        padding: 0.2rem 0.55rem !important;
    }

    /* 模态框在手机端全屏 */
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100vw - 1rem);
    }
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: calc(100vw - 1rem);
    }
    .modal-body {
        padding: 0.75rem;
    }

    /* 表格水平滚动 */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* 后台侧边栏手机端折叠 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .sidebar.show {
        transform: translateX(0);
    }

    /* 后台主内容区全宽 */
    .col-md-9.ms-sm-auto.col-lg-10 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        margin-left: 0 !important;
    }

    /* 统计卡片缩小 */
    .stat-card {
        padding: 12px;
    }
    .stat-card i {
        font-size: 2rem;
    }
    .stat-card h3 {
        font-size: 1.5rem;
    }

    /* 表单标签和输入在手机端更紧凑 */
    .form-label {
        margin-bottom: 0.2rem;
        font-size: 0.88rem;
    }
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 0.45rem 0.6rem;
    }

    /* 按钮在手机端撑满 */
    .d-flex.flex-wrap.gap-2 .btn {
        flex: 1 1 100%;
    }

    /* 登录卡片适配 */
    .auth-body {
        padding: 20px;
    }
    .auth-header {
        padding: 20px;
    }

    /* 标签芯片和候选标签 */
    .tag-chip {
        font-size: 0.75rem;
    }
    .tag-suggest {
        font-size: 0.72rem;
    }
}

/* 超小屏（≤375px）进一步压缩 */
@media (max-width: 375px) {
    .hero-content h1 {
        font-size: 1.2rem;
    }
    .hero-headline {
        font-size: 1.15rem;
        gap: 0.3rem;
    }
    .hero-slogan {
        font-size: 0.9rem;
    }
    .navbar-brand {
        font-size: 0.9rem;
    }
    .deadline-pill {
        font-size: 0.72rem !important;
    }
}

/* 后台侧边栏手机端遮罩 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
}
.sidebar-overlay.show {
    display: block;
}

/* 后台顶部手机端菜单切换按钮（仅手机端显示） */
.sidebar-toggle-btn {
    display: none;
}
@media (max-width: 768px) {
    .sidebar-toggle-btn {
        display: inline-flex;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}


/* ===== 博客式标签组件 ===== */
/* 已选中的标签胶囊 */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #5c7cfa, #4263eb);
    color: #fff;
    border-radius: 999px;
    padding: 0.22rem 0.35rem 0.22rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(66, 99, 235, 0.35);
}
.tag-chip-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}
.tag-chip-close:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* 可点选的历史/常用标签 */
.tag-suggest {
    display: inline-block;
    border: 1px solid #bac8ff;
    background: #eef2ff;
    color: #3b5bdb;
    border-radius: 999px;
    padding: 0.12rem 0.7rem;
    margin: 0 0.35rem 0.35rem 0;
    font-size: 0.78rem;
    line-height: 1.6;
    cursor: pointer;
    transition: all 0.15s;
}
.tag-suggest:hover {
    background: #dbe4ff;
    border-color: #91a7ff;
    color: #364fc7;
}
.tag-suggest.is-active {
    background: linear-gradient(135deg, #5c7cfa, #4263eb);
    border-color: #4263eb;
    color: #fff;
    box-shadow: 0 1px 3px rgba(66, 99, 235, 0.35);
}

/* 标签内嵌输入框：已选标签 chip 与输入框同处一个框内 */
.tag-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    cursor: text;
}
.tag-box:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.tag-box .tag-chip {
    padding: 0.1rem 0.3rem 0.1rem 0.55rem;
    font-size: 0.8rem;
}
.tag-box-input {
    flex: 1 1 10rem;
    min-width: 8rem;
    border: none;
    outline: none;
    padding: 0.22rem 0;
    background: transparent;
    font-size: 1rem;
    line-height: 1.5;
}
.tag-box-input:focus {
    outline: none;
    box-shadow: none;
}
.tag-box-input::placeholder {
    color: #adb5bd;
    opacity: 1;
}

/* Hero 主标题与广告语同行，广告语三字三色、小一号 */
.hero-headline {
    font-size: 1.75rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.hero-slogan {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.hero-slogan .hs-dot {
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0.1rem;
}
.hero-slogan .hs-1 { color: #f5576c; }   /* 对应后台“活动总数”卡片色 */
.hero-slogan .hs-2 { color: #43e97b; }   /* 对应后台“活动报名人数”卡片渐变（绿色端） */
.hero-slogan .hs-3 { color: #ffd43b; }   /* 精彩：金黄色，与前两色明显区分 */
.hero-desc {
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 0.35rem 0 0;
    font-weight: 400;
    max-width: 660px;
    line-height: 1.55;
}

/* 运动员文件上传要求醒目提醒 */
.upload-notice {
    background: #fff5f5;
    border: 1px solid #ffa8a8;
    border-left: 5px solid #e03131;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(224, 49, 49, 0.12);
}
.upload-notice-title {
    color: #c92a2a;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}
.upload-notice-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #862e2e;
    font-size: 0.85rem;
    line-height: 1.65;
}
.upload-notice-list li {
    margin-bottom: 0.15rem;
}
