/* roadmap.css */
:root {
    --bg-white: #ffffff;
    --text-main: #334155;
    --line-color: #cbd5e1;
    --highlight-color: #ef4444; 
    --accent-blue: #3b82f6;
    --required-bg: #fefce8; --required-border: #eab308;
    --design-bg: #f0fdf4; --design-border: #22c55e;
    --core-bg: #eff6ff; --core-border: #3b82f6;
    --advanced-bg: #faf5ff; --advanced-border: #a855f7;
    --default-border: #cbd5e1;
    --cell-w: 120px;
    --cell-h: 30px;
    --gap-x: 30px;
    --gap-y: 10px;
}

.roadmap-container {
    postion: fixed;
    transform: translate(-25%, 0%);
    background-color: #ffffff;
    display: flex; flex-direction: column; align-items: center; padding: 20px;
    overflow-x: visible;
    width:1200px;
}

.legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0;
    display: flex; flex-direction: row; gap: 20px; justify-content: space-between;
    width: 900px; margin-bottom: 20px;
}
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-main); }
.legend-color { width: 24px; height: 14px; border-radius: 3px; border: 1px solid transparent; }

.viewport {
    width: 100%; max-width: 1200px; height: 450px;
    background-color: var(--bg-white);
    border: 1px solid #e2e8f0; border-radius: 8px;
    overflow: auto; position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, var(--cell-w));
    grid-auto-rows: var(--cell-h);
    column-gap: var(--gap-x);
    row-gap: var(--gap-y);
    padding: 0px;
    margin: 0 auto; 
    flex-shrink: 0;
}

#connector-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
}

.semester-header {
    grid-row: 1; text-align: center; font-weight: 700; font-size: 0.9rem; color: var(--accent-blue);
    padding-bottom: 10px; border-bottom: 2px solid #f1f5f9; align-self: end;
}

.course-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; font-size: 0.75rem; padding: 5px; box-sizing: border-box;
    color: var(--text-main); transition: all 0.2s ease; cursor: pointer;
    z-index: 1; width: 100%; height: 100%;
}

.course-card.active {
    border-color: var(--highlight-color) !important; border-width: 2px;
    font-weight: bold; transform: scale(1.02); z-index: 10;
}

.required { background-color: var(--required-bg); border-color: var(--required-border); }
.design { background-color: var(--design-bg); border-color: var(--design-border); }
.core { background-color: var(--core-bg); border-color: var(--core-border); }
.advanced { background-color: var(--advanced-bg); border-color: var(--advanced-border); }
/* 글자색 전용 클래스 */
.text-red { 
    color: #e11d48 !important; /* 약간 진한 레드 */
    font-weight: 600; 
}

.text-blue { 
    color: #2563eb !important; /* 약간 진한 블루 */
    font-weight: 600; 
}

path { transition: stroke 0.2s, stroke-width 0.2s, opacity 0.2s; }
path.active { stroke: var(--highlight-color); stroke-width: 2.5; opacity: 1 !important; }


/* 안내사항 섹션 스타일 */
.info-section {
    width: 90%;
    max-width: 1000px;
    background: #ffffff;
}

.info-section h3 {
    margin-top: 0;
    color: var(--accent-blue);
    font-size: 1.3rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 학점 강조 스타일 */
.info-section h4 {
    margin: 20px 0 10px 0;
    color: var(--text-main);
    font-size: 1.1rem;
}

.credit-total {
    color: var(--highlight-color);
    font-weight: 800;
}

/* 리스트 스타일 커스텀 */
.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    position: relative;
    padding: 12px 15px 12px 35px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 리스트 앞 아이콘 (불렛 대신) */
.info-section li::before {
    content: '✓';
    position: absolute;
    left: 12px;
    color: var(--accent-blue);
    font-weight: bold;
}

/* 강조 텍스트 (과목명 등) */
.info-section b {
    color: #1e293b;
    font-weight: 600;
}

/* 핵심전공/설계실습 배지 스타일 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 5px;
    vertical-align: middle;
}
