/* Google Fonts - Inter and Outfit */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-sidebar: rgba(15, 23, 42, 0.85);
    
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.35);
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.25);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #6b7280;
    
    /* Risk evaluation colors */
    --risk-chong: #ef4444; /* 冲 - Red */
    --risk-wen: #f59e0b;   /* 稳 - Orange/Amber */
    --risk-bao: #10b981;   /* 保 - Green */
    
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism utility class */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Main Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    height: 100vh;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: auto;
    }
}

.main-content {
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100%;
}

@media (max-width: 1200px) {
    .main-content {
        height: auto;
    }
}

/* Header styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.taomi-logo {
    display: flex;
    align-items: baseline;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
    cursor: default;
}

.taomi-logo:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

.taomi-logo-dot {
    color: #3b82f6;
    -webkit-text-fill-color: #3b82f6;
    font-size: 2rem;
    margin-left: 0.05rem;
}

.score-widget {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-input-container {
    position: relative;
}

.score-input-container label {
    font-size: 0.75rem;
    color: var(--text-muted);
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--bg-dark);
    padding: 0 6px;
    font-weight: 500;
}

.score-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    width: 150px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: var(--transition-smooth);
}

.score-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Map Dashboard Section */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.map-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 400px;
}

.map-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.map-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-color.zero { background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255,255,255,0.05); }
.legend-color.low { background: rgba(14, 165, 233, 0.25); }
.legend-color.med { background: rgba(14, 165, 233, 0.5); }
.legend-color.high { background: rgba(14, 165, 233, 0.85); }

#map-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-height: 380px;
}

/* China SVG Map custom styles */
#map-container svg {
    width: 100%;
    height: 100%;
    max-height: 360px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

#map-container svg path {
    stroke: #1e293b;
    stroke-width: 0.8px;
    transition: fill 0.3s ease, stroke 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

#map-container svg path.zero { fill: rgba(30, 41, 59, 0.4); }
#map-container svg path.low { fill: rgba(14, 165, 233, 0.25); }
#map-container svg path.med { fill: rgba(14, 165, 233, 0.5); }
#map-container svg path.high { fill: rgba(14, 165, 233, 0.85); }

/* Province hover states and interactive fills */
#map-container svg path:hover {
    stroke: #0ea5e9;
    stroke-width: 1.5px;
    filter: drop-shadow(0 0 4px var(--primary));
    opacity: 0.95;
    z-index: 10;
}

/* Active selected province */
#map-container svg path.active {
    stroke: #a855f7 !important;
    stroke-width: 2px !important;
    fill: #a855f7 !important;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6)) !important;
}

/* Filter controls panel */
.controls-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: white;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
    color: white;
}

.filter-tag.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Sort dropdown styling */
.sort-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

.sort-select:focus {
    border-color: var(--primary);
}

/* Stats panel */
.stats-strip {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* University card grid */
.university-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.uni-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.uni-card:hover {
    transform: translateY(-6px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(14, 165, 233, 0.15);
}

/* Card highlight dynamic ribbon */
.uni-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.7;
}

.uni-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.uni-badge-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.uni-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.uni-title-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
}

.uni-title-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rank-badge {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--primary);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.uni-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.uni-tag {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 500;
}

.uni-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uni-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.uni-score {
    display: flex;
    flex-direction: column;
}

.uni-score-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.uni-score-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Recommendation indicators (冲稳保 badge) */
.recommend-badge {
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.recommend-badge.chong {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--risk-chong);
}

.recommend-badge.wen {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--risk-wen);
}

.recommend-badge.bao {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--risk-bao);
}

.recommend-badge.none {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Volunteer Sheet sidebar (志愿表) */
.volunteer-sidebar {
    border-left: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100vh;
}

.volunteer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.volunteer-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

.volunteer-header span {
    font-size: 0.75rem;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

/* Empty list container */
.volunteer-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.25rem;
}

.empty-volunteer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-dark);
    gap: 0.75rem;
    padding: 3rem 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: auto 0;
}

.empty-volunteer svg {
    width: 48px;
    height: 48px;
    stroke: rgba(255, 255, 255, 0.1);
}

/* Volunteer Item card */
.volunteer-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.volunteer-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(14, 165, 233, 0.2);
}

.vol-index {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.vol-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 0.25rem;
}

.vol-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.vol-major {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.vol-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vol-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.vol-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.vol-btn.delete:hover {
    color: var(--risk-chong);
    background: rgba(239, 68, 68, 0.1);
}

/* Sidebar action buttons */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.85rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.85rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* Modal Drawer container (School details panel) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-content {
    width: 600px;
    max-width: 90vw;
    height: 100%;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.open .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.drawer-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.drawer-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.drawer-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.drawer-uni-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 800;
}

.drawer-uni-info h2 {
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.drawer-uni-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    border-left: 3px solid var(--primary);
    padding-left: 0.5rem;
    margin-bottom: 0.25rem;
}

.drawer-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Major list table in drawer */
.major-table {
    width: 100%;
    border-collapse: collapse;
}

.major-table th, .major-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.major-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.major-table td {
    font-size: 0.85rem;
}

.major-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.major-rank-badge {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--accent);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    display: inline-block;
}

.add-major-btn {
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.add-major-btn:hover {
    background: var(--primary);
    color: white;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tooltip on SVG map */
.map-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s ease;

}

/* Tabs Navigation in Header */
.tabs-navigation {
    display: flex;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.2rem;
    border-radius: 10px;
    backdrop-filter: var(--glass-blur);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    outline: none;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

/* Major Explorer View Styles */
.major-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

.major-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    justify-content: space-between;
}

.major-card:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.15);
}

.major-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a855f7);
    opacity: 0.7;
}

.major-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.major-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(14, 165, 233, 0.15));
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    flex-shrink: 0;
}

.major-card-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.major-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.major-school-count {
    font-size: 0.72rem;
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.major-arrow-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition-smooth);
}

.major-card:hover .major-arrow-hint {
    color: white;
    transform: translateX(3px);
}



/* Major Categorization Detail View Layout */
.major-intro-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

.intro-sidebar {
    padding: 1.25rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.intro-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.intro-cat-btn {
    background: transparent;
    border: none;
    padding: 0.65rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    text-align: left;
    outline: none;
    line-height: 1.4;
}

.intro-cat-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.intro-cat-btn.active {
    color: var(--accent);
    background: rgba(168, 85, 247, 0.08);
    font-weight: 700;
    border-left: 3px solid var(--accent);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Right Detail Major Card */
.intro-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    opacity: 0.6;
}

.intro-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.intro-card-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.focus-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.focus-badge.wenli {
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.focus-badge.like {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent);
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.focus-badge.wenke {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.intro-card-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.15);
}

.intro-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.intro-body-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.intro-body-col-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.intro-body-col-text {
    font-size: 0.84rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8);
}

.intro-card-note {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.intro-card-note strong {
    color: var(--risk-chong);
    font-weight: 700;
}

.intro-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.intro-card-footer-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 60%;
}

.cross-link-btn {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 8px;
    padding: 0.45rem 1.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    outline: none;
}

.cross-link-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Responsive columns for mobile */
@media (max-width: 992px) {
    .major-intro-layout {
        grid-template-columns: 1fr;
    }
    .intro-sidebar {
        position: static;
    }
    .intro-category-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.35rem;
    }
    .intro-card-body {
        grid-template-columns: 1fr;
    }
}

/* Guide Page Layout */
.guide-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

.guide-sidebar {
    padding: 1.25rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guide-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.guide-cat-btn {
    background: transparent;
    border: none;
    padding: 0.65rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    text-align: left;
    outline: none;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-cat-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.guide-cat-btn.active {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.08);
    font-weight: 700;
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.guide-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.6;
}

.guide-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.guide-card-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

.guide-card-content {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

/* Custom Table for Guide Comparison */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.82rem;
}

.guide-table th, .guide-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.guide-table th {
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.02);
}

.guide-table td {
    color: rgba(255, 255, 255, 0.8);
}

.guide-card-num-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

@media (max-width: 992px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }
    .guide-sidebar {
        position: static;
    }
    .guide-chapter-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.35rem;
    }
}

/* Policy Page Layout */
.policy-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

.policy-sidebar {
    padding: 1.25rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.policy-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.policy-cat-btn {
    background: transparent;
    border: none;
    padding: 0.65rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    text-align: left;
    outline: none;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.policy-cat-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.policy-cat-btn.active {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.08);
    font-weight: 700;
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.policy-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.policy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.6;
}

.policy-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.policy-card-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

.policy-card-content {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 992px) {
    .policy-layout {
        grid-template-columns: 1fr;
    }
    .policy-sidebar {
        position: static;
    }
    .policy-chapter-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.35rem;
    }
}
