@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&family=Roboto:wght@400;700&display=swap');

/* 색상 변수 정의 */
:root {
    --main-bg-color: #002366;
    --main-text-color: #FFFFFF;
    --sub-text-color: #E0E0E0;
    --inverted-sub-text-color: #4a6a9c; /* 반전 시 부제 색상 */
}

/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    overflow: hidden;
}

/* 기본 및 반전 스타일 */
body {
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    transition: background-color 0.3s, color 0.3s;
}

body.inverted {
    background-color: var(--main-text-color);
    color: var(--main-bg-color);
}

/* 메인 컨테이너 */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 20px;
}

/* 시작 전 타이틀 화면 */
.title-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}
.title-unit {
    font-size: 1.2rem;
    color: var(--sub-text-color);
}
.title-main {
    font-size: 3.5rem;
    font-weight: bold;
}
.title-sub {
    font-size: 1.5rem;
    color: var(--sub-text-color);
}
body.inverted .title-unit,
body.inverted .title-sub {
    color: var(--inverted-sub-text-color);
}

/* 학습 콘텐츠 래퍼 */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}
.content-wrapper.visible {
    opacity: 1;
}

/* 학습 단계별 텍스트 */
.step-title {
    font-size: 1.2rem;
    color: var(--sub-text-color);
    font-weight: bold;
}
.main-text {
    font-size: 3rem;
    font-weight: bold;
}
.sub-text {
    font-size: 1.5rem;
    color: var(--sub-text-color);
}
body.inverted .step-title,
body.inverted .sub-text {
    color: var(--inverted-sub-text-color);
}

/* 리뷰 목록 */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    font-size: 1.4rem;
    text-align: left;
    width: 100%;
    max-width: 500px;
}

.review-item {
    line-height: 1.4;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
}
.review-item .review-english {
    font-weight: bold;
    font-size: 1.1em;
}
.review-item .review-korean {
    color: var(--sub-text-color);
    font-size: 0.9em;
    padding-left: 2px;
}

/* 리뷰 하이라이트 */
.review-item.highlight {
    transform: scale(1.03);
    color: gold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

/* 시작 버튼 */
#start-button {
    padding: 15px 30px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--main-bg-color);
    background-color: var(--main-text-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.5s, transform 0.2s ease;
}
#start-button:hover {
    transform: scale(1.05);
}

/* 숨김 유틸리티 클래스 */
.hidden {
    display: none !important;
}


/* 반응형 웹 (모바일) */
@media (max-width: 600px) {
    .title-main {
        font-size: 2.5rem;
    }
    .main-text {
        font-size: 2rem;
    }
    .sub-text, .title-sub {
        font-size: 1.2rem;
    }
    .review-list {
        font-size: 1.1rem;
        gap: 20px;
    }
}

/* 패턴 선택 화면 */
.pattern-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 600px;
}

.pattern-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    text-align: left;
}

.pattern-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.pattern-item .unit-name {
    font-size: 0.9rem;
    color: var(--sub-text-color);
}

.pattern-item .pattern-title {
    font-size: 1.8rem;
    font-weight: bold;
}

/* Footer 스타일 */
footer {
    position: fixed; /* 항상 화면 하단에 고정 */
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
}

footer hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* 반투명한 선 */
    margin-bottom: 10px;
}

footer a {
    color: var(--main-text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

/* 화면 반전 시 Footer 스타일 */
body.inverted footer hr {
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.inverted footer a {
    color: var(--main-bg-color);
}