/* ============================================
   특강 출강 지도 - Premium Design System
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&display=swap');

/* CSS Custom Properties */
:root {
    /* Primary Colors - Deep Ocean Blue to Purple */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6B8DD6 100%);
    --primary-dark: #4c5fd5;
    --primary-light: #8b9df4;

    /* Accent Colors */
    --accent-coral: #ff6b6b;
    --accent-mint: #51cf66;
    --accent-gold: #fcc419;
    --accent-cyan: #22b8cf;

    /* Glass Effect Colors */
    --glass-white: rgba(255, 255, 255, 0.85);
    --glass-light: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);

    /* Neutral Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --surface: #ffffff;
    --surface-hover: #f8fafc;

    /* Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #e8ecf3 0%, #d1d8e6 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Header - Premium Glass Design
   ============================================ */
.header {
    position: relative;
    background: var(--primary-gradient);
    padding: 0;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: patternMove 60s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.header-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 2rem;
    text-align: center;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.header h1::before {
    content: '📍';
    font-size: 1.8rem;
}

.header-decoration {
    position: relative;
    height: 6px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 80%,
        transparent 100%
    );
}

/* ============================================
   Main Layout
   ============================================ */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
}

.main-content {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   Map Container - Glass Card
   ============================================ */
#map {
    flex: 1;
    min-height: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    z-index: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ============================================
   Dashboard - Premium Glass Panel
   ============================================ */
.dashboard {
    width: 360px;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition-normal);
}

.dashboard:hover {
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transform: translateY(-2px);
}

.dashboard.hidden {
    display: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.dashboard-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
    position: relative;
    z-index: 1;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    z-index: 1;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.toggle-btn:active {
    transform: scale(0.98);
}

.dashboard-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.dashboard-content::-webkit-scrollbar {
    width: 6px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.dashboard-content.collapsed {
    display: none;
}

/* ============================================
   University Achievement - Highlight Section
   ============================================ */
.university-achievement-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.university-achievement-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.achievement-ring {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.achievement-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.achievement-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.achievement-ring .ring-progress {
    fill: none;
    stroke: #fff;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.achievement-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.achievement-rate {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.achievement-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}

.achievement-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.achievement-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.4rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.achievement-detail {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.6rem;
}

.achievement-detail .visited {
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.achievement-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.achievement-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffec8b 50%, #ffd700 100%);
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    position: relative;
}

.achievement-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* ============================================
   Stats Panel - Premium Cards
   ============================================ */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ============================================
   Chart Sections
   ============================================ */
.chart-section {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease forwards;
}

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

.chart-section h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   Vertical Bar Chart (연도별)
   ============================================ */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 160px;
    padding: 1rem 0.5rem 0.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    max-width: 45px;
    height: 100%;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    width: 100%;
}

.bar {
    width: 100%;
    max-width: 28px;
    min-height: 20px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: var(--transition-normal);
}

.bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.bar:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.bar-value {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-white);
    margin-top: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bar-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* ============================================
   Horizontal Bar Chart
   ============================================ */
.horizontal-bars {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.h-bar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
}

.h-bar-item:hover {
    transform: translateX(3px);
}

.h-bar-label {
    font-size: 0.8rem;
    color: var(--text-primary);
    width: 80px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.h-bar-track {
    flex: 1;
    height: 22px;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.h-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    position: relative;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.h-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}

.h-bar-count {
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: 32px;
    text-align: right;
}

/* ============================================
   Regional Chart (시도별 대학 출강률)
   ============================================ */
.regional-section {
    margin-bottom: 1.5rem;
}

.regional-chart {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.regional-chart::-webkit-scrollbar {
    width: 4px;
}

.regional-chart::-webkit-scrollbar-track {
    background: transparent;
}

.regional-chart::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.region-item {
    padding: 0.6rem 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: var(--transition-normal);
    opacity: 0.6;
}

.region-item.visited {
    opacity: 1;
    border-color: rgba(102, 126, 234, 0.15);
}

.region-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.region-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.region-rate {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-full);
}

.region-rate.high {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.region-rate.mid {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
}

.region-rate.low {
    background: #e2e8f0;
    color: var(--text-secondary);
}

.region-bar-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.region-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
}

.region-detail {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.3rem;
}

.toggle-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.region-item.expanded .toggle-arrow {
    transform: rotate(180deg);
}

/* 대학교 목록 (토글) */
.region-universities {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    margin-top: 0;
    padding: 0;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--radius-sm);
}

.region-item.expanded .region-universities {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.region-item.expanded .region-universities::-webkit-scrollbar {
    width: 3px;
}

.region-item.expanded .region-universities::-webkit-scrollbar-track {
    background: transparent;
}

.region-item.expanded .region-universities::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.university-item {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.university-item:last-child {
    border-bottom: none;
}

.university-item.empty {
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
}

.university-item.visited {
    color: #48bb78;
}

.university-item.not-visited {
    color: var(--text-muted);
    opacity: 0.7;
}

/* 클릭 가능한 스타일 */
.region-header {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.region-header:hover {
    opacity: 0.8;
}

.region-item.visited .region-header:active {
    opacity: 0.6;
}

/* ============================================
   Regional View (시도별 대학 출강 뷰)
   ============================================ */
.regional-panel {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    flex-direction: column;
    min-height: 600px;
}

.regional-panel.active {
    display: flex;
}

.regional-view-header {
    padding: 1.5rem 2rem;
    background: var(--primary-gradient);
    color: white;
}

.regional-view-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.regional-view-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.regional-view-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.regional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* Regional Card */
.regional-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
    transition: var(--transition-normal);
}

.regional-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.regional-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-left: 4px solid;
    background: white;
    transition: var(--transition-fast);
}

.regional-card-header:hover {
    background: #f8fafc;
}

.regional-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.region-emoji {
    font-size: 1.3rem;
}

.region-name-large {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.regional-card-stats {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.visited-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.total-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rate-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.3rem;
}

.rate-badge.high {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.rate-badge.mid {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
}

.rate-badge.low {
    background: #e2e8f0;
    color: var(--text-secondary);
}

.expand-icon {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    margin-left: 0.3rem;
}

.regional-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.regional-card-progress {
    height: 4px;
    background: #e2e8f0;
}

.regional-card-progress .progress-bar {
    height: 100%;
    transition: width 0.8s ease;
}

.regional-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.regional-card.expanded .regional-card-body {
    max-height: 500px;
    overflow-y: auto;
}

.univ-list {
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.univ-item {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.univ-item.visited {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.1) 100%);
    color: #276749;
    font-weight: 500;
}

.univ-item.not-visited {
    background: rgba(160, 174, 192, 0.1);
    color: var(--text-muted);
}

.univ-item:hover {
    transform: translateX(3px);
}

/* ============================================
   View Tabs (지도/목록 전환)
   ============================================ */
.view-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem;
    margin-bottom: 0;
}

.view-tab {
    padding: 0.75rem 1.5rem;
    background: var(--glass-white);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
    position: relative;
    top: 1px;
}

.view-tab:hover {
    background: white;
    color: var(--text-primary);
}

.view-tab.active {
    background: white;
    color: var(--primary-dark);
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: 0 -2px 10px rgba(102, 126, 234, 0.1);
}

.view-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
}

/* ============================================
   View Panels
   ============================================ */
.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

#map.view-panel.active {
    display: block;
    flex: 1;
}

/* ============================================
   List Panel (목록 뷰)
   ============================================ */
.list-panel {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    flex-direction: column;
    min-height: 600px;
}

.list-panel.active {
    display: flex;
}

.list-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.list-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.5;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    background: white;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

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

.filter-group select {
    padding: 0.65rem 2rem 0.65rem 1rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    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 fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: var(--transition-fast);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.list-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.list-info span {
    font-weight: 700;
    color: var(--primary-dark);
}

/* ============================================
   Lecture List Items
   ============================================ */
.lecture-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.lecture-list::-webkit-scrollbar {
    width: 6px;
}

.lecture-list::-webkit-scrollbar-track {
    background: transparent;
}

.lecture-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.lecture-item {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: var(--transition-normal);
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lecture-item:hover {
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.lecture-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.lecture-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lecture-region {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.lecture-institution {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.lecture-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.lecture-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.lecture-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 500;
}

.lecture-tag.type-tag {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

/* Empty State */
.list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.list-empty p {
    font-size: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-muted);
    text-align: center;
    padding: 1.25rem;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(102, 126, 234, 0.5) 50%,
        transparent 100%
    );
}

.footer p {
    position: relative;
    z-index: 1;
}

/* ============================================
   Leaflet Custom Popup
   ============================================ */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 280px;
}

.leaflet-popup-tip {
    background: var(--glass-white);
    box-shadow: var(--shadow-md);
}

.lecture-popup {
    padding: 1.25rem;
}

.lecture-popup .institution {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box,
                var(--primary-gradient) border-box;
    border-radius: 0;
}

.lecture-popup .title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-weight: 400;
}

.lecture-popup .info-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.lecture-popup .info-row .icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.lecture-popup .memo {
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 3px solid;
    border-image: var(--primary-gradient) 1;
}

.lecture-popup .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.lecture-popup .tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--primary-gradient);
    color: var(--text-white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: var(--transition-fast);
}

.lecture-popup .tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ============================================
   Custom Marker
   ============================================ */
.custom-marker {
    background: var(--primary-gradient);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(102, 126, 234, 0.3);
    transition: var(--transition-fast);
}

.custom-marker:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(102, 126, 234, 0.3);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .dashboard {
        width: 320px;
    }

    .h-bar-label {
        width: 70px;
    }
}

@media (max-width: 900px) {
    main {
        padding: 1rem;
    }

    .view-tabs {
        padding: 0 1rem;
    }

    .main-content {
        flex-direction: column;
    }

    .dashboard {
        width: 100%;
        max-height: none;
    }

    #map {
        min-height: 450px;
    }

    .list-panel {
        min-height: 500px;
    }

    .stats-panel {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 2rem 1.5rem;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .h-bar-label {
        width: 65px;
        font-size: 0.75rem;
    }

    .h-bar-track {
        height: 18px;
    }

    #map {
        min-height: 380px;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .chart-section h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.75rem;
        gap: 1rem;
    }

    .header-content {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .header h1::before {
        font-size: 1.4rem;
    }

    .dashboard {
        border-radius: var(--radius-md);
    }

    #map {
        min-height: 320px;
        border-radius: var(--radius-md);
    }

    .stats-panel {
        gap: 0.5rem;
    }

    .stat-item {
        padding: 0.75rem 0.25rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }
}

/* ============================================
   Animation Utilities
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Loading State */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth Page Load */
body {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
