/* ======================================
   内蒙古专升本志愿填报模拟系统 - 样式表
   高仿内蒙古教育考试院官方界面
   ====================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2a7cd6;
    --primary-dark: #1a5fa8;
    --primary-light: #e8f2fc;
    --primary-gradient: linear-gradient(135deg, #1a6fc4 0%, #3b8de5 50%, #2a7cd6 100%);
    --header-bg: linear-gradient(90deg, #1565c0 0%, #2196f3 40%, #1e88e5 100%);
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --text-primary: #2c3e50;
    --text-secondary: #606266;
    --text-muted: #909399;
    --border: #dcdfe6;
    --border-light: #e8eaed;
    --bg-page: #f0f2f5;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 4px;
    --radius-lg: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Noto Sans SC', 'Microsoft YaHei', '微软雅黑', sans-serif;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---------- Header ---------- */
.top-header {
    background: var(--header-bg);
    color: white;
    height: 56px;
    box-shadow: 0 2px 8px rgba(26, 95, 168, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    flex-shrink: 0;
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-link:hover {
    opacity: 1;
}

.home-icon {
    font-size: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    transition: var(--transition);
}

.user-info:hover {
    background: rgba(255,255,255,0.15);
}

.user-avatar {
    font-size: 18px;
}

.user-name {
    font-size: 14px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    background: #f5f7fa;
    border-bottom: 1px solid var(--border-light);
    height: 42px;
}

.breadcrumb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* ---------- Main Container ---------- */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 60px;
    position: relative;
}

.content-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 0;
    overflow: hidden;
}

/* ---------- Page Header ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: #fafbfc;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-dark);
}

.page-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header-right {
    display: flex;
    gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.btn-clear {
    background: var(--primary);
    color: white;
}

.btn-clear:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(42, 124, 214, 0.3);
}

.btn-submit {
    background: var(--primary);
    color: white;
}

.btn-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(42, 124, 214, 0.3);
}

/* ---------- Student Info ---------- */
.student-info {
    padding: 16px 24px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border-light);
}

.info-row {
    display: flex;
    gap: 60px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item label {
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ---------- Volunteer Section ---------- */
.volunteer-section {
    padding: 20px 24px 32px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.category-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.category-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* ---------- Volunteer Card ---------- */
.volunteer-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.volunteer-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(42, 124, 214, 0.08);
}

.volunteer-card.filled {
    border-color: var(--primary);
    background: var(--primary-light);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-header .card-dot {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.card-body {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.form-group label {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    font-weight: 500;
}

.form-group label .required {
    color: var(--danger);
    margin-right: 2px;
}

.custom-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.custom-select {
    width: 100%;
    height: 36px;
    padding: 0 30px 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23909399' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    text-overflow: ellipsis;
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(42, 124, 214, 0.15);
}

.custom-select:hover {
    border-color: #b0b6bf;
}

.custom-select option {
    padding: 8px 12px;
}

.custom-select option.option-public {
    color: var(--primary-dark);
}

.custom-select option.option-private {
    color: #e67e22;
}

/* 计划人数标签 */
.plan-tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    font-weight: 500;
}

/* ---------- Reference Panel ---------- */
.reference-panel {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    align-items: stretch;
    transition: var(--transition);
}

.reference-panel.expanded .panel-content {
    width: 520px;
    opacity: 1;
    pointer-events: auto;
}

.reference-panel.expanded .toggle-icon {
    transform: rotate(180deg);
}

.panel-toggle {
    writing-mode: vertical-lr;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    transition: var(--transition);
    box-shadow: -2px 0 12px rgba(0,0,0,0.15);
    user-select: none;
}

.panel-toggle:hover {
    background: var(--primary-dark);
}

.toggle-icon {
    writing-mode: horizontal-tb;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.toggle-text {
    writing-mode: vertical-lr;
    text-orientation: upright;
    letter-spacing: 4px;
}

.panel-content {
    width: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.panel-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.panel-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.panel-subtitle strong {
    color: var(--danger);
    font-size: 16px;
}

.filter-bar {
    display: flex;
    gap: 8px;
}

.filter-bar select,
.filter-bar input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
}

.filter-bar select {
    width: 110px;
}

.filter-bar input {
    flex: 1;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(42, 124, 214, 0.1);
}

.table-wrapper {
    overflow-y: auto;
    flex: 1;
}

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

.ref-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.ref-table th {
    background: #f0f5fa;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 8px 6px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    text-align: center;
}

.ref-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    white-space: nowrap;
}

.ref-table tr:hover {
    background: var(--primary-light);
}

.ref-table .school-name {
    text-align: left;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ref-table .major-name {
    text-align: left;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}

.type-badge.public {
    background: #e3f2fd;
    color: #1565c0;
}

.type-badge.private {
    background: #fff3e0;
    color: #e65100;
}

.score-cell {
    font-weight: 500;
}

.score-cell.high {
    color: var(--danger);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: #fafbfc;
}

.confirm-item .confirm-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.confirm-item .confirm-detail {
    flex: 1;
}

.confirm-item .confirm-school {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.confirm-item .confirm-major {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.confirm-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.toast.warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}

.toast.error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.toast.info {
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .header-title {
        font-size: 14px;
    }

    .main-container {
        padding: 12px;
    }

    .card-body {
        flex-direction: column;
        gap: 12px;
    }

    .form-group {
        width: 100%;
    }

    .info-row {
        flex-direction: column;
        gap: 8px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .page-header-right {
        align-self: flex-end;
    }

    .reference-panel .panel-content {
        width: 320px !important;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #909399;
}

/* ---------- Select 已选中状态 ---------- */
.custom-select.has-value {
    color: var(--text-primary);
    border-color: var(--primary);
    background-color: #f7fbff;
}

/* ---------- 志愿卡片序号动画 ---------- */
.volunteer-card {
    animation: cardSlideIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 每个卡片延迟 */
.volunteer-card:nth-child(1) { animation-delay: 0.05s; }
.volunteer-card:nth-child(2) { animation-delay: 0.1s; }
.volunteer-card:nth-child(3) { animation-delay: 0.15s; }
.volunteer-card:nth-child(4) { animation-delay: 0.2s; }
.volunteer-card:nth-child(5) { animation-delay: 0.25s; }
.volunteer-card:nth-child(6) { animation-delay: 0.3s; }
.volunteer-card:nth-child(7) { animation-delay: 0.35s; }
.volunteer-card:nth-child(8) { animation-delay: 0.4s; }
.volunteer-card:nth-child(9) { animation-delay: 0.45s; }
.volunteer-card:nth-child(10) { animation-delay: 0.5s; }
.volunteer-card:nth-child(11) { animation-delay: 0.55s; }
.volunteer-card:nth-child(12) { animation-delay: 0.6s; }

/* 选项中的计划人数提示 */
.option-plan-hint {
    color: var(--text-muted);
    font-size: 11px;
}

/* 模拟标签 */
.sim-badge {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(255, 152, 0, 0.3);
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}
