@charset "utf-8";
/* =========================================================
   CODE : RSWP 스타일
   [색상 규칙]
   - 메인 파랑  #2f6bff   - 하늘 #22b8ee   - 포인트 라임 #c6ff3d
   - 글자 남색  #0f1b33   - 회색 글자 #5b6780  - 배경 #f5f8ff
   ========================================================= */

/* ---------- 1. 기본 초기화 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

body {
    font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", sans-serif;
    color: #0f1b33;
    background: #f5f8ff;
    line-height: 1.6;
    word-break: keep-all;
    overflow-x: hidden;
}

/* ---------- 2. 전체 틀 ---------- */
.wrap { width: 100%; }
.inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 3. 헤더 ---------- */
#header {
    position: relative;
    z-index: 10;
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#header h1 img { height: 48px; }

#nav > ul { display: flex; }
#nav > ul > li { position: relative; width: 150px; text-align: center; }
#nav > ul > li > a { display: block; line-height: 100px; font-size: 18px; font-weight: 700; }
#nav > ul > li > a:hover { color: #2f6bff; }

/* 서브메뉴: 처음엔 숨김 → 메뉴에 마우스를 올리면 그 메뉴의 서브만 slideDown */
.sub {
    display: none;
    position: absolute;
    top: 80px;
    left: 50%;
    width: 160px;
    margin-left: -80px;       /* 가운데 정렬 (폭의 절반만큼 왼쪽으로) */
    padding: 10px 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 15px 30px rgba(30, 60, 130, 0.12);
    z-index: 2;
}
.sub li a { display: block; line-height: 40px; font-size: 15px; color: #5b6780; }
.sub li a:hover { color: #2f6bff; font-weight: 700; background: #f2f6fd; }

.mbtn { display: none; } /* 모바일 메뉴 버튼 (아래 반응형에서 보임) */

/* ---------- 4. 메인 슬라이드 ---------- */
.slide {
    width: 100%;
    height: 440px;
    overflow: hidden;           /* 영역 밖 슬라이드는 안 보이게 */
    border-radius: 24px;
}
.slide ul { display: flex; width: 300%; height: 100%; }   /* 슬라이드 3장을 가로로 나란히 */
.slide li { width: 33.3333%; height: 100%; }
.slide li a { display: flex; align-items: center; height: 100%; padding: 0 60px; color: #fff; }
.slide .s1 { background: linear-gradient(120deg, #2f6bff, #22b8ee); }
.slide .s2 { background: linear-gradient(120deg, #0ea5a4, #62c94a); }
.slide .s3 { background: linear-gradient(120deg, #6d5cff, #b56cf5); }
.slide h2 { max-width: 760px; font-size: 46px; line-height: 1.3; }
.slide h2 span {
    display: table;
    margin-bottom: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 18px;
}

/* ---------- 6. 푸터 ---------- */
#footer {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    padding: 30px 0 40px;
    border-top: 1px solid #e3e9f5;
}
.flogo img { height: 40px; }
.fmenu { display: flex; gap: 20px; margin-bottom: 6px; }
.fmenu a { font-size: 14px; color: #5b6780; }
.fcopy { font-size: 13px; color: #97a1b5; }

/* ---------- 7. 팝업 ---------- */
.popup {
    display: none;                      /* 처음엔 숨김 → .pop 클릭하면 show() */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 27, 51, 0.5);
    z-index: 100;
}
.popcon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 90%;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}
.popcon h2 { font-size: 22px; }
.popcon .img { margin: 16px 0; }
.popcon .img img { border-radius: 14px; }
.popcon .text { color: #5b6780; }
.popcon .text strong { color: #2f6bff; }
.close button { margin-top: 18px; padding: 10px 22px; border-radius: 8px; background: #eef3fc; font-weight: 700; }
.close button:hover { background: #c6ff3d; }

/* =========================================================
   서브 페이지 공통
   ========================================================= */
.page { display: none; }   /* 모든 페이지 숨김 → JS가 eq(번호).show()로 하나만 보여줌 */

.page-title {
    padding: 40px 48px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(120deg, #2f6bff, #22b8ee);
}
.page-title span { font-size: 13px; font-weight: 700; letter-spacing: 3px; }
.page-title h2 { font-size: 34px; margin-top: 6px; }
.page-title p { margin-top: 4px; opacity: 0.92; }

.sub-title { margin: 40px 0 14px; font-size: 22px; }
.box { padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(30, 60, 130, 0.08); }
.box h3 { font-size: 18px; margin-bottom: 6px; }
.box p { color: #5b6780; font-size: 15px; }
.grid3 { display: flex; gap: 16px; }
.grid3 .box { flex: 1; }
.caution { margin-top: 20px; padding: 12px 16px; border-radius: 10px; background: #fffbea; color: #7a5a00; font-size: 14px; }

/* 버튼 */
.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 22px;
    border-radius: 10px;
    background: #eef3fc;
    font-weight: 700;
}
.btn-blue { background: #2f6bff; color: #fff; }

/* ---------- 페이지 1 : AI 상담소 ---------- */
.ai-box {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 24px;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(30, 60, 130, 0.08);
}
.ai-box img { width: 260px; border-radius: 14px; }
.ai-box h3 { font-size: 24px; margin-bottom: 8px; }
.ai-box b { color: #2f6bff; }
.ai-note { margin-top: 10px; font-size: 14px; color: #97a1b5; }
.sub-title small { margin-left: 8px; font-size: 14px; font-weight: 400; color: #97a1b5; }
.chat-box { flex: 1; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(30, 60, 130, 0.08); overflow: hidden; }
.log { height: 340px; padding: 20px; overflow-y: auto; }
.log p { max-width: 75%; margin-bottom: 12px; padding: 11px 15px; border-radius: 14px; font-size: 15px; }
.log .bot { background: #eef3fc; }
.log .me { margin-left: auto; background: #2f6bff; color: #fff; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eef2f9; }
.chat-text { flex: 1; height: 46px; padding: 0 14px; border: 1px solid #d6dff0; border-radius: 10px; }
.chat-send { padding: 0 22px; border-radius: 10px; background: #2f6bff; color: #fff; font-weight: 700; }

/* ---------- 페이지 2 : 커리큘럼 (학년 탭) ---------- */
.ytab { display: flex; gap: 8px; margin: 24px 0 16px; }
.ytab a { display: block; padding: 8px 20px; border: 1px solid #d6dff0; border-radius: 20px; font-weight: 700; background: #fff; }
.ytab li.on a { background: #c6ff3d; border-color: #c6ff3d; }
.ycon { display: none; }

/* ---------- 페이지 3~5 : 문제 공통 ---------- */
.question-area { max-width: 760px; margin: 24px auto 0; }
.test-q, .quiz-q, .code-q { display: none; }   /* 문제는 하나씩 eq(번호).show() */
.test-q, .quiz-q { padding: 28px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(30, 60, 130, 0.08); }
.num { font-size: 14px; font-weight: 700; color: #2f6bff; }
.test-q h3, .quiz-q h3 { margin: 8px 0 18px; font-size: 21px; }
.choice button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid #d6dff0;
    border-radius: 10px;
    background: #f7f9fd;
}
.choice button:hover { border-color: #2f6bff; }
.choice button.ok { border-color: #22c55e; background: #e9f9ef; }   /* 정답 */
.choice button.bad { border-color: #ff4d6d; background: #fff0f3; }  /* 오답 */
.explain { display: none; padding: 14px 16px; border-left: 4px solid #2f6bff; border-radius: 8px; background: #eef3fc; }
.now-score { margin-bottom: 10px; text-align: right; font-weight: 700; }
.now-score b { color: #2f6bff; }
.quiz-next { display: none; float: right; }

/* 결과 박스 */
.result { display: none; padding: 34px; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 10px 30px rgba(30, 60, 130, 0.08); }
.result-label { font-weight: 700; color: #5b6780; }
.result-score { font-size: 22px; }
.result-score b { font-size: 56px; color: #2f6bff; }
.result-msg { margin: 6px 0 10px; }

/* ---------- 페이지 5 : 코딩 터미널 ---------- */
.terminal { padding: 24px; border-radius: 16px; background: #0f1b33; color: #e8eefa; }
.terminal .num { color: #c6ff3d; }
.terminal h3 { margin: 6px 0 12px; font-size: 19px; }
.terminal pre {
    padding: 16px;
    border-radius: 10px;
    background: #1a2945;
    font-family: Consolas, "D2Coding", monospace;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: auto;
}
.code-msg { margin: 16px 0 10px; font-family: Consolas, monospace; color: #9aa8c4; }
.code-input-area { display: flex; align-items: center; gap: 10px; }
.code-input-area span { color: #c6ff3d; font-weight: 700; }
.code-input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #33456b; border-radius: 8px; background: #1a2945; font-family: Consolas, monospace; }
.code-check { padding: 0 20px; height: 44px; border-radius: 8px; background: #c6ff3d; color: #0f1b33; font-weight: 800; }

/* ---------- 페이지 6 : 합격 패스 ---------- */
.pass-area { display: flex; gap: 30px; margin-top: 24px; }
.pass-form { width: 320px; padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(30, 60, 130, 0.08); align-self: flex-start; }
.label { font-weight: 700; margin-bottom: 6px; }
.pass-name-input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #d6dff0; border-radius: 10px; }
.pass-msg { margin-top: 12px; color: #ff4d6d; font-size: 14px; }
.pass-result { display: none; flex: 1; }
.pass-card {
    position: relative;
    max-width: 520px;
    height: 300px;
    margin-bottom: 20px;
    padding: 28px;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 20px 40px rgba(15, 27, 51, 0.2);
}
.pass-card.c0 { background: linear-gradient(135deg, #2f6bff, #22b8ee); }   /* 블루 */
.pass-card.c1 { background: linear-gradient(135deg, #0ea5a4, #62c94a); }   /* 그린 */
.pass-card.c2 { background: linear-gradient(135deg, #6d5cff, #b56cf5); }   /* 퍼플 */
.pass-card.c3 { background: linear-gradient(135deg, #0f1b33, #2b3f6b); }   /* 네이비 */
.pass-top { font-size: 13px; font-weight: 700; letter-spacing: 3px; }
.pass-name { margin-top: 50px; font-size: 38px; font-weight: 900; }
.pass-detail, .pass-total { font-size: 15px; opacity: 0.92; }
.pass-grade { position: absolute; right: 30px; bottom: 16px; font-size: 90px; font-weight: 900; color: #c6ff3d; }
.color { display: flex; gap: 8px; margin-bottom: 14px; }
.color button { padding: 8px 16px; border-radius: 20px; color: #fff; font-weight: 700; }
.color .c0 { background: #2f6bff; }
.color .c1 { background: #0ea5a4; }
.color .c2 { background: #6d5cff; }
.color .c3 { background: #0f1b33; }
.capture { font-size: 14px; color: #5b6780; }

/* ---------- 페이지 7 : 비하인드 ---------- */
.log-list p { margin-bottom: 8px; }
.log-list b { color: #2f6bff; margin-right: 8px; }

/* =========================================================
   반응형 (화면 폭 900px 이하 : 태블릿·휴대폰)
   ========================================================= */
@media (max-width: 900px) {
    #header { height: 70px; }
    #header h1 img { height: 38px; }

    /* 메뉴 버튼을 누르면 nav가 아래로 펼쳐짐 */
    .mbtn { display: block; padding: 8px 14px; border-radius: 8px; background: #eef3fc; font-weight: 700; }
    #nav { display: none; position: absolute; top: 70px; left: 0; width: 100%; padding: 10px 20px; background: #fff; box-shadow: 0 15px 30px rgba(30, 60, 130, 0.1); }
    #nav.open { display: block; }   /* 메뉴 버튼을 누르면 open 클래스가 붙어서 보임 */
    #nav > ul { display: block; }
    #nav > ul > li { width: 100%; text-align: left; border-bottom: 1px solid #eef2f9; }
    #nav > ul > li > a { line-height: 50px; }
    .sub { display: block !important; position: static; width: auto; margin: 0; padding: 0 0 10px; height: auto !important; background: none; box-shadow: none; }
    .sub li { display: inline-block; margin-right: 14px; }

    .slide { height: 260px; }
    .slide li a { padding: 0 28px; }
    .slide h2 { font-size: 26px; }

    .ai-box, .pass-area, .grid3 { flex-direction: column; }
    .ai-box img { width: 100%; }
    .pass-form { width: 100%; }
    .page-title { padding: 30px 24px; }
    .page-title h2 { font-size: 26px; }
    #footer { flex-direction: column; align-items: flex-start; gap: 14px; }
    .fmenu { flex-wrap: wrap; }
}
