:root {
    /* 기존에 요청하신 색감 */
    --color-ivory: #fff4f3;
    --color-pink: #FFB6C1;
    --color-pink-hover: #FF9EAB;
    --color-blue: #ADD8E6;
    --color-blue-hover: #96C8DB;
    --color-green: #90EE90;

    --color-text-main: #2C3E50;
    --color-text-muted: #7F8C8D;
    --color-border: #EAEAEA;
    --color-white: #FFFFFF;

    --analysis-high-bg: rgba(255, 159, 171, .45);
    --analysis-high-text: #B03050;
    --analysis-wrong-bg: rgba(255, 159, 171, .15);
    --analysis-wrong-text: #D84B6B;
    --analysis-pair-bg: rgba(255, 182, 193, .12);

    --bg-battle-total: #FFF8DC;
    --text-battle-total: #B8860B;
    --bg-battle-win: #FFF0E6;
    --text-battle-win: #FF7043;
    --bg-battle-wpm: #F0F8FF;
    --text-battle-wpm: #4A90D9;

    --bg-quiz-total: #E6F4EA;
    --text-quiz-total: #1E8E3E;
    --bg-quiz-correct: #FCE8E6;
    --text-quiz-correct: #D93025;
    --bg-quiz-rate: #F3E8FD;
    --text-quiz-rate: #9334E6;

    --hm-high-bg: rgba(255, 182, 193, .35);
    --hm-high-text: #D84B6B;
    --hm-med-bg: rgba(255, 197, 130, .35);
    --hm-med-text: #A0600A;
    --hm-low-bg: rgba(168, 216, 168, .35);
    --hm-low-text: #2F6A2F;

    /* Theme colors (Light Mode) */
    --theme-bg-main: var(--color-ivory);
    --theme-bg-card: var(--color-white);
    --theme-bg-hover: #f5f5f5;
    --theme-border: var(--color-border);

    --theme-text-main: var(--color-text-main);
    --theme-text-sub: #555555;
    --theme-text-muted: var(--color-text-muted);
}

[data-theme="dark"] {
    --theme-bg-main: #0F172A;
    --theme-bg-card: #1E293B;
    --theme-bg-hover: #334155;
    --theme-border: #475569;

    --theme-text-main: #F8FAFC;
    --theme-text-sub: #CBD5E1;
    --theme-text-muted: #94A3B8;

    --color-pink: #3B82F6;
    --color-pink-hover: #2563EB;
    --color-blue: #38BDF8;
    --color-blue-hover: #0EA5E9;
    --color-green: #22C55E;
    --color-white: #1E293B;

    --analysis-high-bg: rgba(59, 130, 246, 0.45);
    --analysis-high-text: #93C5FD;
    --analysis-wrong-bg: rgba(59, 130, 246, 0.15);
    --analysis-wrong-text: #60A5FA;
    --analysis-pair-bg: rgba(59, 130, 246, 0.15);

    --bg-battle-total: rgba(184, 134, 11, 0.2);
    --text-battle-total: #FCD663;
    --bg-battle-win: rgba(255, 112, 67, 0.2);
    --text-battle-win: #FFAB91;
    --bg-battle-wpm: rgba(74, 144, 217, 0.2);
    --text-battle-wpm: #8AB4F8;

    --bg-quiz-total: rgba(30, 142, 62, 0.2);
    --text-quiz-total: #81C995;
    --bg-quiz-correct: rgba(217, 48, 37, 0.2);
    --text-quiz-correct: #F28B82;
    --bg-quiz-rate: rgba(147, 52, 230, 0.2);
    --text-quiz-rate: #C589F9;

    --hm-high-bg: rgba(255, 182, 193, 0.2);
    --hm-high-text: #FFB6C1;
    --hm-med-bg: rgba(255, 197, 130, 0.2);
    --hm-med-text: #FFD29D;
    --hm-low-bg: rgba(168, 216, 168, 0.2);
    --hm-low-text: #A8D8A8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--theme-bg-main);
    color: var(--theme-text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: scroll;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background-color: var(--theme-bg-card);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.nav-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--theme-text-main);
    cursor: pointer;
    margin-right: 20px;
    white-space: nowrap;
}

.logo-img {
    height: 44px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--theme-text-muted);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--theme-text-main);
    background-color: var(--theme-border);
}

.nav-links a.active {
    color: var(--color-pink);
    background-color: rgba(255, 182, 193, 0.15);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--theme-bg-hover);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    gap: 10px;
    cursor: pointer;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    width: 140px;
    color: var(--theme-text-sub);
    cursor: pointer;
}

.search-bar .shortcut {
    font-size: 0.75rem;
    color: var(--theme-text-muted);
    background: transparent;
    padding: 0;
    font-weight: 600;
    border: none;
}

.auth-group {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.auth-login {
    background-color: var(--theme-bg-hover);
    color: var(--theme-text-main);
    padding: 8px 18px;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
}

.auth-login:hover {
    background-color: var(--theme-bg-hover);
}

.auth-signup {
    background-color: var(--color-pink);
    color: white;
    padding: 8px 18px;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
}

.auth-signup:hover {
    background-color: var(--color-pink-hover);
}

/* ── 로그인 후: 프로필 아이콘 & 드롭다운 ──────────────────── */
.nav-profile-wrap {
    position: relative;
    margin-right: 15px;
}

.nav-profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--color-pink), var(--color-blue));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.35);
}

.nav-profile-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 182, 193, 0.5);
}

.nav-avatar {
    font-size: 1rem;
    font-weight: 900;
    color: var(--theme-bg-card);
    line-height: 1;
    pointer-events: none;
}

/* 드롭다운 */
.nav-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--theme-bg-card);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px;
    min-width: 220px;
    z-index: 200;
    display: none;
    animation: dropdownFadeIn 0.18s ease;
}

.nav-profile-dropdown.open {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 12px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-pink), var(--color-blue));
    color: var(--theme-bg-card);
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--theme-text-main);
}

.dropdown-email {
    font-size: 0.78rem;
    color: var(--theme-text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--theme-border);
    margin: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-text-main);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: rgba(255, 182, 193, 0.12);
    color: var(--color-pink-hover);
}

.dropdown-logout {
    color: #e74c3c;
}

.dropdown-logout:hover {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
}

.btn {
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-outline {
    background-color: transparent;
    color: var(--theme-text-main);
    border: 1px solid var(--theme-border);
}

.btn-outline:hover {
    background-color: var(--theme-bg-card);
    border-color: var(--theme-text-muted);
}

.btn-pink {
    background-color: var(--color-pink);
    color: var(--theme-text-main);
}

.btn-pink:hover {
    background-color: var(--color-pink-hover);
    color: var(--theme-bg-card);
}

.btn-large {
    padding: 16px 35px;
    font-size: 1.1rem;
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px var(--theme-border);
    white-space: nowrap;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--theme-border);
}

.btn-blue-outline {
    background-color: var(--theme-bg-card);
    color: var(--theme-text-main);
    border: 2px solid var(--color-blue);
}

.btn-blue-outline:hover {
    background-color: var(--color-blue);
    color: var(--theme-bg-card);
    border-color: var(--color-blue-hover);
}

/* Hero Section */
.hero {
    margin-top: 70px;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 80px 40px;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    background: transparent;
    overflow: visible;
    min-height: calc(100vh - 70px);
    gap: 80px;
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-right {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-anime-girl {
    position: absolute;
    bottom: -150px;
    right: -450px;
    width: 1100px;
    z-index: 0;
    opacity: 1;
    pointer-events: none;
}

.badge {
    background-color: rgba(144, 238, 144, 0.2);
    /* Light Green with opacity */
    color: #2F7A2F;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 30px;
    border: 1px solid var(--color-green);
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--theme-text-main);
    z-index: 1;
    word-break: keep-all;
}

.hero-title .highlight {
    color: var(--color-pink);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 18px;
    background-color: rgba(255, 182, 193, 0.4);
    z-index: -1;
    border-radius: 5px;
}

.jp-typing-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-right: 100px;
    margin-bottom: 100px;
    z-index: 1;
}

.jp-typing-bg {
    position: absolute;
    top: -40px;
    right: -50px;
    background: rgba(30, 30, 30, 0.7);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    font-family: 'Noto Sans KR', sans-serif;
    width: 100%;
    text-align: left;
    filter: blur(1.5px);
    opacity: 0.85;
    z-index: -1;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95) rotate(4deg);
}

.jp-typing-bg2 {
    top: -110px;
    left: -70px;
    right: auto;
    filter: blur(2.5px);
    opacity: 0.75;
    z-index: -2;
    transform: scale(0.9) rotate(-5deg);
}

.jp-typing-bg3 {
    top: 90px;
    left: -40px;
    right: auto;
    filter: blur(2px);
    opacity: 0.8;
    z-index: -3;
    transform: scale(0.92) rotate(-3deg);
}

.jp-typing-box {
    position: relative;
    z-index: 1;
    background: var(--theme-text-main);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: 'Noto Sans KR', sans-serif;
    width: 100%;
    opacity: 0.9;
    text-align: left;
    border: 2px solid var(--theme-text-main);
}

.jp-line {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--theme-text-muted);
    letter-spacing: 1px;
}

.hiragana-line {
    font-weight: bold;
}

.romaji-line {
    font-size: 1.2rem;
    color: var(--theme-text-sub);
}

.kanji-line {
    color: #e0e0e0;
    margin-top: 25px;
    font-size: 1.3rem;
}

.typed-text {
    color: #e8c678;
}

.romaji-line .typed-text {
    color: var(--theme-text-muted);
}

.jp-typing-box .cursor,
.jp-typing-bg .cursor {
    color: #ece7dd;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--theme-text-muted);
    line-height: 1.6;
    margin-bottom: 50px;
    font-weight: 500;
    z-index: 1;
    word-break: keep-all;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 70px;
    z-index: 1;
}

.stats-section {
    display: flex;
    gap: 80px;
    margin-top: 20px;
    z-index: 1;
}

.stat-item h3 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--theme-text-main);
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 1.05rem;
    color: var(--theme-text-muted);
    font-weight: 600;
}

.scroll-down {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    gap: 12px;
    animation: bounce 2s infinite;
    z-index: 1;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Background floating particles effect */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: rgba(255, 182, 193, 0.15);
    /* Soft pink blur */
    filter: blur(60px);
    z-index: 0;
}

.hero::before {
    top: 10%;
    left: -5%;
    background-color: rgba(173, 216, 230, 0.2);
    /* Soft blue blur */
}

.hero::after {
    bottom: -10%;
    right: -5%;
    background-color: rgba(144, 238, 144, 0.15);
    /* Soft green blur */
}

/* Content Sections (Cards) */
.content-section {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--theme-text-main);
}

.section-header .view-all {
    text-decoration: none;
    color: var(--theme-text-muted);
    font-weight: 600;
    transition: color 0.2s;
}

.section-header .view-all:hover {
    color: var(--color-pink);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.card-slider {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-top: 15px;
    padding-bottom: 30px;
    /* space for hover animation */
    scroll-behavior: smooth;
    /* Custom scrollbar */
    scrollbar-width: none;
    /* Firefox */
}

.card-slider::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar completely */
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: var(--color-pink);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-btn:hover {
    background: var(--color-pink);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.05);
}

.slider-btn.prev-btn {
    left: -55px;
}

.slider-btn.next-btn {
    right: -55px;
}

@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }
}

.card-slider .card {
    min-width: 270px;
    max-width: 270px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.card {
    background: var(--theme-bg-card);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px var(--theme-border);
    border: 1px solid var(--theme-border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--color-pink);
}

.card-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    align-self: flex-start;
}

.card-badge.pink {
    background-color: rgba(255, 182, 193, 0.2);
    color: #D84B6B;
}

.card-badge.blue {
    background-color: rgba(173, 216, 230, 0.25);
    color: #3C7A92;
}

.card-badge.green {
    background-color: rgba(144, 238, 144, 0.2);
    color: #2F7A2F;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--theme-text-main);
    line-height: 1.4;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--theme-text-muted);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--theme-border);
    padding-top: 15px;
}

.card-footer .plays {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background-color: var(--theme-bg-card);
    border-top: 1px solid var(--theme-border);
    padding: 60px 40px 20px;
    margin-top: 60px;
    flex-shrink: 0;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col {
    flex: 1;
    min-width: 150px;
}

.brand-col {
    flex: 1.5;
    min-width: 250px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--theme-text-main);
    margin-bottom: 15px;
}

.footer-logo img {
    height: 36px;
    width: auto;
}

.footer-desc {
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 280px;
    word-break: break-word;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--theme-bg-hover);
    border-radius: 8px;
    color: var(--theme-text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s;
    border: 1px solid var(--theme-border);
}

.social-links a:hover {
    background-color: var(--theme-bg-hover);
}

.footer-col h4 {
    color: var(--theme-text-main);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 14px;
}

.footer-col ul li a {
    color: var(--theme-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s;
}

.footer-col ul li a:hover {
    color: var(--color-pink);
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid var(--theme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--theme-text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom-slogan {
    letter-spacing: 1px;
}

/* --- Footer Terms and Privacy Modal ------------------------------ */
.terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.terms-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.terms-modal-card {
    background: var(--theme-bg-card);
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    height: 80%;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--theme-bg-card);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.terms-modal-overlay.active .terms-modal-card {
    transform: scale(1) translateY(0);
}

.terms-modal-header {
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--theme-border);
}

.terms-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--theme-text-main);
    margin: 0;
}

.terms-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--theme-text-muted);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.terms-modal-close-btn:hover {
    color: var(--color-pink-hover);
    transform: rotate(90deg);
}

.terms-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--theme-text-muted);
}

/* Scrollbar styling */
.terms-modal-body::-webkit-scrollbar {
    width: 8px;
}

.terms-modal-body::-webkit-scrollbar-track {
    background: var(--theme-bg-hover);
    border-radius: 4px;
}

.terms-modal-body::-webkit-scrollbar-thumb {
    background: var(--color-pink);
    border-radius: 4px;
}

.terms-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-pink-hover);
}

.terms-modal-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--theme-text-main);
    margin: 20px 0 10px;
}

.terms-modal-body h3:first-of-type {
    margin-top: 0;
}

.terms-modal-body p {
    margin-bottom: 12px;
    text-align: justify;
}

.terms-modal-body ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.terms-modal-body li {
    margin-bottom: 6px;
}

.terms-modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--theme-border);
    display: flex;
    justify-content: flex-end;
    background-color: var(--theme-bg-hover);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.btn-terms-modal-confirm {
    background: linear-gradient(135deg, var(--color-pink) 0%, #FFD6DC 100%);
    color: var(--theme-text-main);
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.35);
}

.btn-terms-modal-confirm:hover {
    background: linear-gradient(135deg, var(--color-pink-hover) 0%, var(--color-pink) 100%);
    color: var(--theme-bg-card);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 182, 193, 0.45);
}

/* --- Result Modal ------------------------------ */
.result-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.result-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.result-modal-card {
    background: linear-gradient(145deg, var(--theme-bg-card), var(--theme-bg-hover));
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 182, 193, 0.5);
    transform: scale(0.8) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-modal-overlay.active .result-modal-card {
    transform: scale(1) translateY(0);
}

.result-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--color-pink);
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(255, 182, 193, 0.4);
    letter-spacing: 1px;
}

.result-score-container {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    padding: 20px;
    background: var(--theme-bg-hover);
    border-radius: 16px;
    border: 1px solid rgba(255, 182, 193, 0.2);
}

.result-score-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--theme-text-muted);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.result-score-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--theme-text-main);
    line-height: 1;
}

.result-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 35px;
}

.result-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--theme-bg-hover);
    border-radius: 12px;
}

.result-stat-box .stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--theme-text-muted);
    margin-bottom: 5px;
}

.result-stat-box .stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-blue);
}

.result-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

.result-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.result-actions .btn-primary {
    background: linear-gradient(135deg, var(--color-pink) 0%, #ff8599 100%);
    color: var(--theme-bg-card);
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.4);
}

.result-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.6);
}

.result-actions .btn-secondary {
    background: #f1f3f5;
    color: var(--theme-text-main);
}

.result-actions .btn-secondary:hover {
    background: var(--theme-bg-hover);
    transform: translateY(-2px);
}

.result-actions .btn-analysis {
    background: linear-gradient(135deg, #add8e6 0%, #87ceeb 100%);
    color: #2C5F75;
    box-shadow: 0 4px 15px rgba(173, 216, 230, 0.4);
}

.result-actions .btn-analysis:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(173, 216, 230, 0.6);
    background: linear-gradient(135deg, #96c8db 0%, #73bdd8 100%);
    color: var(--theme-bg-card);
}

/* --- Responsive Styles --- */
@media screen and (max-width: 992px) {
    .navbar {
        padding: 12px 20px;
    }

    .hero {
        flex-direction: column;
        padding: 60px 20px 40px;
        gap: 40px;
    }

    .jp-typing-wrapper {
        margin-right: 0;
    }

    .footer-container {
        gap: 30px;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        position: static;
        /* 모바일에서 네비게이션바 고정 해제하여 겹침 방지 */
        padding: 20px;
    }

    .hero {
        margin-top: 0;
    }

    .nav-left,
    .nav-center,
    .nav-right {
        flex: none;
        width: 100%;
        justify-content: center;
    }

    .nav-left {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        margin-right: 0;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-notice-link {
        margin-right: 15px !important;
    }

    .auth-group {
        margin-right: 0;
    }

    .search-bar {
        width: 100%;
        max-width: 400px;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-large {
        width: 100%;
    }
}

/* Prevent text from stacking vertically */
.auth-login,
.auth-signup,
.btn,
.nav-notice-link,
.nav-links a {
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Premium Section Card Wrapper --- */
.section-card-wrapper {
    background: var(--theme-bg-card);
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
    margin: 0 0 80px 0;
    max-width: 100%;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .section-card-wrapper {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.section-card-wrapper::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: var(--color-pink);
    filter: blur(120px);
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.section-card-wrapper::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--color-blue);
    filter: blur(120px);
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.section-card-wrapper .content-section {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    padding: 60px 10%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .section-card-wrapper .content-section {
        padding: 40px 20px;
    }
}