/* ========== JEC郡域马术赛事计分系统 — 品牌样式 ========== */

:root {
    --jec-blue: #1E5BB8;
    --jec-red: #D9302E;
    --jec-bg: #EBF3FC;
    --jec-text: #333333;
    --jec-title: #1A2B4C;
    --jec-gray: #F0F0F0;
    --jec-border: #D0DCEE;
    --jec-green: #28A745;
    --jec-gold: #FFD700;
    --jec-silver: #C0C0C0;
    --jec-bronze: #CD7F32;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: var(--jec-bg);
    color: var(--jec-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== 导航栏 ========== */

.navbar {
    background: linear-gradient(135deg, var(--jec-title), var(--jec-blue));
    color: white;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(30, 91, 184, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .logo-shield {
    display: inline-block;
    width: 32px;
    height: 36px;
    background: var(--jec-red);
    clip-path: polygon(50% 0%, 100% 15%, 100% 65%, 50% 100%, 0% 65%, 0% 15%);
    text-align: center;
    line-height: 36px;
    font-size: 11px;
    font-weight: 900;
    color: white;
}

.navbar-links {
    display: flex;
    gap: 8px;
}

.navbar-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 6px;
    align-self: center;
}

/* ========== 二级菜单栏(页面路径) ========== */

.subnav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

.subnav a {
    color: var(--jec-blue);
    text-decoration: none;
    font-weight: 600;
}

.subnav a:hover { text-decoration: underline; }

.subnav .sep { color: #b3bdc9; }

.subnav .current { color: #7a8699; font-weight: 600; }

.navbar-links a:hover,
.navbar-links a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ========== 布局 ========== */

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

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

/* ========== 卡片 ========== */

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--jec-bg);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--jec-title);
}

/* ========== 按钮 ========== */

.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
}

.btn-primary { background: var(--jec-blue); }
.btn-primary:hover { background: #18509E; }

.btn-danger { background: var(--jec-red); }
.btn-danger:hover { background: #B82828; }

.btn-success { background: var(--jec-green); }
.btn-success:hover { background: #218838; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--jec-blue);
    color: var(--jec-blue);
}
.btn-outline:hover {
    background: var(--jec-blue);
    color: white;
}

.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }

/* ========== 表格 ========== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: var(--jec-bg);
    color: var(--jec-title);
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--jec-blue);
    white-space: nowrap;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--jec-gray);
}

.table tbody tr:hover {
    background: rgba(30, 91, 184, 0.04);
}

.table .rank-1 { background: rgba(255, 215, 0, 0.12); font-weight: 700; }
.table .rank-2 { background: rgba(192, 192, 192, 0.12); font-weight: 600; }
.table .rank-3 { background: rgba(205, 127, 50, 0.12); font-weight: 600; }
.table .eliminated { color: var(--jec-red); opacity: 0.7; }

/* ========== 表单 ========== */

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--jec-title);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--jec-border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--jec-blue);
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

/* ========== 标签 ========== */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-blue { background: var(--jec-bg); color: var(--jec-blue); }
.badge-red { background: rgba(217, 48, 46, 0.1); color: var(--jec-red); }
.badge-green { background: rgba(40, 167, 69, 0.1); color: var(--jec-green); }
.badge-gray { background: var(--jec-gray); color: #888; }

/* ========== Tab 导航 ========== */

.tab-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--jec-border);
    overflow-x: auto;
}

.tab-nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--jec-text);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-nav a:hover { color: var(--jec-blue); }
.tab-nav a.active {
    color: var(--jec-blue);
    border-bottom-color: var(--jec-blue);
}

/* ========== 模态框 ========== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: 12px;
    padding: 28px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--jec-title);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ========== 移动端适配 ========== */

@media (max-width: 768px) {
    .container, .container-wide {
        padding: 12px;
    }

    .navbar {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
    }

    .navbar-brand { font-size: 15px; }
    .navbar-links { flex-wrap: wrap; justify-content: center; }
    .navbar-links a { padding: 4px 10px; font-size: 13px; }

    .subnav { font-size: 12px; margin-bottom: 10px; }

    .card { padding: 16px; }
    .card-title { font-size: 16px; }

    .table { font-size: 13px; }
    .table th, .table td { padding: 6px 8px; }

    .form-row { flex-direction: column; }
    .form-row .form-group { min-width: 100%; }

    .tab-nav a { padding: 8px 14px; font-size: 13px; }

    .modal { padding: 20px; width: 95%; }
}

/* ========== 工具类 ========== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #999; font-size: 13px; }
.text-danger { color: var(--jec-red); }
.text-success { color: var(--jec-green); }
.text-bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.hidden { display: none; }

/* ========== 颁奖台 ========== */

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    margin: 40px 0;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 16px 18px;
    border-radius: 16px;
    background: #0e1626;
    border: 3px solid #334155;
    width: 230px;
}

.podium-1 { height: 250px; border-color: #ffd700; box-shadow: 0 0 24px rgba(255, 215, 0, 0.3); }
.podium-2 { height: 200px; border-color: #cbd5e1; }
.podium-3 { height: 165px; border-color: #f0a05a; }

.podium-item .medal {
    font-size: 48px;
    line-height: 1.1;
}

.podium-item .name {
    font-size: 25px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 12px;
}

.podium-item .horse {
    font-size: 19px;
    font-weight: 600;
    color: #dbe4f0;
    margin-top: 4px;
}
