* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

body {
    background: #f8fbff;
    color: #0f172a;
    min-height: 100vh;
    overflow-x: hidden;
}

.main-wrapper {
    zoom: 0.8;
}

.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(#d1e4ff 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -2;
    opacity: 0.6;
}

.blur {
    position: fixed; width: 600px; height: 600px; border-radius: 50%;
    filter: blur(120px); z-index: -1; opacity: 0.35;
}
.blur1 { top: -150px; right: -100px; background: #1e40af; }
.blur2 { bottom: -150px; left: -100px; background: #3b82f6; }

nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 8%; background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px); border-bottom: 1px solid #dbeafe;
    position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 24px; font-weight: 800; color: #00458a; }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu a { text-decoration: none; color: #475569; font-size: 15px; font-weight: 600; }
.login-btn { 
    border: 1px solid #00458a; background: white; color: #00458a;
    padding: 8px 20px; border-radius: 999px; font-weight: 600; cursor: pointer;
}

.hero { max-width: 1200px; margin: auto; padding: 60px 24px; text-align: center; }
.top-badge { 
    display: inline-block; padding: 8px 18px; border-radius: 999px;
    background: #00458a; color: white; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.main-title { font-size: 82px; font-weight: 900; color: #00458a; letter-spacing: -2px; }
.sub-title { font-size: 32px; font-weight: 700; margin-top: 10px; color: #1e293b; }
.desc-text { color: #64748b; font-size: 20px; margin-top: 15px; }

.card-wrap {
    margin-top: 50px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
}
.glass {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 32px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 69, 138, 0.05);
}

.main-card {
    width: 540px; padding: 45px; text-align: left;
}

.main-card h3 {
    font-size: 36px; font-weight: 800; color: #00458a; margin-bottom: 15px;
}

.card-text {
    font-size: 17px; color: #475569; line-height: 1.6; margin-bottom: 25px;
}

.tag-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag {
    padding: 8px 18px; border-radius: 999px; background: #f1f7ff;
    border: 1px solid #dbeafe; color: #00458a; font-size: 14px; font-weight: 600;
}

.more-btn {
    background: #e9ecef; border: none; color: #475569;
    width: 44px; height: 38px; border-radius: 20px; cursor: pointer;
    font-weight: bold; display: flex; align-items: center; justify-content: center;
}

.start-box {
    margin: 40px auto 0; max-width: 1104px; padding: 60px;
    display: flex; flex-direction: column; align-items: center;
}
.start-title { font-size: 36px; font-weight: 800; color: #00458a; margin-bottom: 30px; }

.start-btn {
    width: 460px; padding: 22px; border: none; border-radius: 16px;
    font-size: 22px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    transition: 0.2s;
}
.blue-btn { background: #00458a; color: white; }
.blue-btn:hover { background: #003366; transform: translateY(-2px); }

.options-grid { display: flex; flex-direction: column; gap: 12px; max-width: 500px; margin: 0 auto; }
.opt-btn {
    width: 100%; padding: 18px; font-size: 18px; font-weight: 600;
    color: #00458a; border: 1px solid #dbeafe; border-radius: 16px;
    background: white; cursor: pointer; transition: 0.2s;
}
.opt-btn:hover { background: #00458a; color: white; }

.progress-container { width: 100%; max-width: 600px; height: 8px; margin: 20px auto 40px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
#progress-bar { width: 0%; height: 100%; background: #00458a; transition: 0.4s ease; }
#q-text { font-size: 28px; font-weight: 700; margin-bottom: 40px; min-height: 100px; word-break: keep-all; }

.auth-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-content { background: white; padding: 40px; border-radius: 24px; width: 90%; max-width: 450px; }
.tooltip-container { position: relative; display: inline-flex; }
.tooltip-content { 
    visibility: hidden; opacity: 0; position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
    background: #334155; color: white; padding: 8px 14px; border-radius: 8px; font-size: 13px;
    white-space: nowrap; transition: 0.2s; z-index: 10;
}
.tooltip-container:hover .tooltip-content { visibility: visible; opacity: 1; }

.hidden { display: none !important; }

.shared-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background: #eaf2ff;
    border: 1px solid #cfe1ff;
    color: #00458a;
    padding: 14px 20px;
    border-radius: 14px;
    max-width: 600px;
    margin: 0 auto 20px;
    font-size: 14px;
    font-weight: 600;
}
.shared-cta-btn {
    border: none;
    background: #00458a;
    color: white;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90%;
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fit-bar-item { margin-bottom: 16px; }
.fit-bar-item:last-child { margin-bottom: 0; }
.fit-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.fit-bar-track {
    background: #eef2f7;
    border-radius: 8px;
    height: 14px;
    overflow: hidden;
}
.fit-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease;
}
.fit-bar-item.rank-1 .fit-bar-fill { background: #00458a; }
.fit-bar-item.rank-2 .fit-bar-fill { background: #3b82f6; }
.fit-bar-item.rank-3 .fit-bar-fill { background: #93c5fd; }

.major-detail-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 26px 28px;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(0, 69, 138, 0.05);
}
.major-detail-card.is-ranked {
    border: 1px solid #bfdcff;
    background: #f6faff;
}
.major-detail-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.major-detail-head h3 {
    font-size: 22px;
    color: #00458a;
    font-weight: 800;
    margin-right: auto;
}
.major-rank-badge {
    background: #00458a;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}
.major-pct {
    font-size: 14px;
    font-weight: 700;
    color: #00458a;
}
.major-detail-desc {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 10px;
}
.major-detail-tech {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 10px;
}
.major-detail-tech strong { color: #00458a; }
.major-detail-advice {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    line-height: 1.6;
    border-top: 1px solid #eee;
    padding-top: 12px;
}
.major-icon-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.major-icon-badge {
    width: 42px; height: 42px; border-radius: 12px;
    background: #eaf2ff; color: #00458a;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.major-detail-concept {
    font-size: 15px; color: #334155; line-height: 1.7; margin-bottom: 14px;
}
.major-detail-example {
    font-size: 14px; color: #1e293b; background: #f6faff;
    border: 1px solid #dbeafe; border-radius: 12px;
    padding: 12px 14px; line-height: 1.6;
}
.major-detail-example strong { color: #00458a; margin-right: 4px; }

#info-modal .modal-content {
    max-width: 500px;   
    padding: 40px;     
}

#info-modal h2 {
    font-size: 28px !important;  
    margin-bottom: 25px !important;
}

#info-modal .modal-body, 
#info-modal div[style*="text-align:left"] {
    font-size: 18px !important; 
    line-height: 1.8 !important; 
}

#info-modal p {
    margin-bottom: 15px !important; 
}
.credit-section { font-size: 16px; line-height: 1.6; }
#btn-more {
    background: none; border: none; color: #555555;
    font-size: 12px; cursor: pointer; padding-left: 5px;
}
.hidden { display: none; }
#more-names { font-size: 14px; color: #666666; margin-top: 5px; padding-left: 10px; }

@media (max-width: 768px) {
    .main-wrapper { zoom: 1 !important; }
    #quiz-section,
    #mid-result-section,
    #result-section { zoom: 1 !important; }

    nav { padding: 14px 5%; }
    .logo { font-size: 20px; }
    .nav-menu a { font-size: 13px; }

    .hero { padding: 40px 16px; }
    .main-title { font-size: 40px; letter-spacing: -1px; }
    .sub-title { font-size: 22px; }
    .desc-text { font-size: 15px; }

    .card-wrap { flex-direction: column; gap: 16px; margin-top: 32px; }
    .main-card { width: 100%; }
    .main-card h3 { font-size: 24px; }
    .card-text { font-size: 15px; }
    .tag { font-size: 13px; padding: 6px 14px; }

    .glass { padding: 20px !important; border-radius: 22px; }

    .start-box { margin-top: 24px; }
    .start-title { font-size: 22px; margin-bottom: 20px; }
    .start-btn { width: 100% !important; font-size: 16px; padding: 16px; }

    .options-grid { max-width: 100%; }
    .opt-btn { font-size: 15px; padding: 14px; }
    #q-text { font-size: 20px; min-height: auto; margin-bottom: 24px; }
    .top-badge { font-size: 12px; padding: 6px 14px; }

    #res-major-name { font-size: 32px !important; margin-bottom: 12px !important; }
    #fit-chart, #res-desc-box { max-width: 100% !important; }
    .shared-banner { max-width: 100%; }

    .modal-content { padding: 24px; width: 90%; }
    #info-modal .modal-content { padding: 24px; }
    #info-modal h2 { font-size: 22px !important; }
    #info-modal div[style*="text-align:left"] { font-size: 15px !important; }

    .major-detail-card { padding: 18px 18px; border-radius: 16px; }
    .major-detail-head h3 { font-size: 18px; }
    #detail-major-list, #all-major-list { max-width: 100% !important; }
    #detail-fit-chart { max-width: 100% !important; }
}

@media (max-width: 420px) {
    .main-title { font-size: 32px; }
    .sub-title { font-size: 19px; }
    .main-card h3 { font-size: 21px; }
    #res-major-name { font-size: 26px !important; }
    .toast { bottom: 24px; font-size: 13px; padding: 10px 18px; }
}