:root {
    --primary-accent: #ff6b00;
    --primary-accent-hover: #e65a00;
    --secondary-accent: #ff9442;
    --background-primary: #fffcf9;
    --background-secondary: #fff5ec;
    --background-card: #ffffff;
    --background-dark-surface: #231f1c;
    --text-primary: #1f1d1b;
    --text-secondary: #635e59;
    --border-color: #fae3d2;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.025rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--background-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: keep-all;
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(2.1rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.65rem, 3vw, 2.1rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.45rem);
    line-height: 1.35;
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1.05rem;
}

h6 {
    font-size: 0.95rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.3s ease-in-out;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    border-collapse: collapse;
    width: 100%;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.85rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.45rem;
        line-height: 1.35;
    }

    h3 {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    h4 {
        font-size: 1.05rem;
    }

    h5 {
        font-size: 0.95rem;
    }

    h6 {
        font-size: 0.875rem;
    }

    body {
        font-size: 0.975rem;
        line-height: 1.65;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.65rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }
}

/* ===== header_block ===== */
#header {
    overflow: hidden;
    background-color: var(--background-primary);
    border-color: var(--border-color) !important
}

#header .site-header {
    background-color: var(--background-primary);
    width: 100%
}

#header .brand-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--background-secondary);
    color: var(--primary-accent)
}

#header .brand-icon {
    color: var(--primary-accent);
    font-size: 18px
}

#header .brand-title {
    font-size: 1.35rem;
    color: var(--text-primary);
    letter-spacing: -0.5px
}

#header .brand-accent {
    color: var(--primary-accent)
}

#header .brand-badge {
    background-color: var(--background-secondary);
    color: var(--primary-accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color)
}

#header .nav-link-custom {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color .2s ease, background-color .2s ease
}

#header .nav-link-custom:hover,
#header .nav-link-custom:focus {
    color: var(--primary-accent);
    background-color: var(--background-secondary)
}

#header .btn-cta {
    background-color: var(--primary-accent);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    transition: background-color .2s ease, transform .1s ease
}

#header .btn-cta:hover,
#header .btn-cta:focus {
    background-color: var(--primary-accent-hover);
    color: #ffffff;
    transform: translateY(-1px)
}

#header .cta-icon {
    color: #ffffff;
    font-size: 14px
}

#header .navbar-toggler-btn {
    width: 44px;
    height: 44px;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0
}

#header .toggle-icon {
    color: var(--text-primary);
    font-size: 18px
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--background-primary);
    z-index: 9999;
    display: none;
    opacity: 1
}

.mobile-menu-overlay.open {
    display: block
}

.mobile-menu-top {
    border-color: var(--border-color) !important
}

.mobile-close-btn {
    width: 44px;
    height: 44px;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0
}

.mobile-close-btn .close-icon {
    color: var(--text-primary);
    font-size: 18px
}

.mobile-nav-link {
    display: block;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    min-height: 44px;
    line-height: 1.3;
    hyphens: auto;
    transition: background-color .2s ease, color .2s ease
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--primary-accent);
    background-color: var(--background-secondary)
}

.mobile-menu-footer {
    border-color: var(--border-color) !important
}

.mobile-site-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500
}

@media (max-width:767.98px) {
    #header .brand-title {
        font-size: 0.8rem
    }

    #header h1,
    #header h2,
    #header h3 {
        hyphens: auto;
        line-height: 1.2
    }
}

/* ===== hero_block ===== */
#hero {
    overflow: hidden;
}

#hero .hero-cta-btn {
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

#hero .hero-cta-btn:hover {
    background-color: var(--primary-accent-hover) !important;
    border-color: var(--primary-accent-hover) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

#hero .feature-card {
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

#hero .feature-card:hover {
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.08);
    transform: translateY(-2px);
}

@media (max-width: 767.98px) {
    #hero h1.hero-title {
        font-size: 1.125rem !important;
        line-height: 1.25 !important;
        hyphens: auto;
    }

    #hero h2.feature-title {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        hyphens: auto;
    }

    #hero .hero-description {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }

    #hero .hero-main-img {
        height: 240px !important;
    }
}

@media (min-width: 768px) {
    #hero h1.hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* ===== about_block ===== */
#about.about-section {
    background-color: var(--background-secondary);
    color: var(--text-primary);
    position: relative;
    width: 100%;
}

#about .about-tag-badge {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
}

#about .about-badge-icon {
    color: var(--primary-accent);
    font-size: 0.875rem;
}

#about .about-badge-text {
    color: var(--primary-accent);
    letter-spacing: -0.02em;
}

#about .about-main-title {
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.25;
    hyphens: auto;
}

#about .about-paragraph {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.975rem;
    letter-spacing: -0.01em;
    text-align: justify;
    word-break: keep-all;
}

#about .about-pillar-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

#about .about-pillar-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-accent);
}

#about .about-pillar-icon-box {
    width: 42px;
    height: 42px;
    line-height: 42px;
    border-radius: 50%;
    background-color: var(--background-secondary);
    color: var(--primary-accent);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#about .about-pillar-title {
    color: var(--text-primary);
    font-size: 0.925rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

#about .about-pillar-desc {
    color: var(--text-secondary);
    font-size: 0.775rem;
    line-height: 1.4;
}

#about .about-image-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
}

#about .about-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 380px;
}

#about .about-img-element {
    height: 100%;
    object-fit: cover;
    display: block;
}

#about .about-stats-panel {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
}

#about .about-stat-val {
    color: var(--primary-accent);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

#about .about-stat-lbl {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

#about .about-stat-divider {
    background-color: var(--border-color);
    opacity: 0.8;
    height: 30px;
}

@media (max-width:767.98px) {
    #about .about-main-title {
        font-size: 1rem;
        line-height: 1.2;
    }

    #about .about-pillar-title {
        font-size: 0.875rem;
    }

    #about .about-image-wrapper {
        height: 250px;
    }

    #about .about-paragraph {
        font-size: 0.9rem;
        text-align: left;
    }
}

/* ===== main_article_block ===== */
.main-article-section {
    width: 100%;
    box-sizing: border-box;
}

.main-article-section .article-container {
    border-radius: 1.25rem;
    transition: box-shadow 0.3s ease;
}

.main-article-section .article-title {
    word-break: keep-all;
    hyphens: auto;
}

.main-article-section .meta-separator {
    color: var(--border-color);
    font-weight: bold;
}

.main-article-section .table th,
.main-article-section .table td {
    vertical-align: middle;
}

@media (max-width: 767.98px) {
    .main-article-section .article-title {
        font-size: 1.125rem !important;
        line-height: 1.25 !important;
    }

    .main-article-section .subchapter-title {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    .main-article-section .breakdown-title {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }

    .main-article-section .article-body {
        font-size: 0.95rem !important;
    }

    .main-article-section .table {
        font-size: 0.8rem !important;
    }
}

/* ===== latest_news_block ===== */
#latest-news .news-article-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

#latest-news .news-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 107, 0, 0.08);
}

#latest-news .news-card-img-wrap {
    overflow: hidden;
    background-color: var(--background-secondary);
}

#latest-news .news-card-img-wrap img {
    transition: transform 0.4s ease;
}

#latest-news .news-article-card:hover .news-card-img-wrap img {
    transform: scale(1.05);
}

@media (max-width: 767.98px) {
    #latest-news h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    #latest-news h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }
}

/* ===== game_reviews_block ===== */
#game-reviews {
    overflow: hidden;
    width: 100%;
}

#game-reviews .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#game-reviews .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06) !important;
}

#game-reviews .progress {
    border-radius: 999px;
    overflow: hidden;
}

#game-reviews .progress-bar {
    border-radius: 999px;
    transition: width 0.8s ease-in-out;
}

@media (max-width: 767.98px) {
    #game-reviews h2 {
        font-size: 1.125rem !important;
        line-height: 1.25;
    }

    #game-reviews h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }

    #game-reviews p,
    #game-reviews span {
        hyphens: auto;
    }
}

/* ===== dev_stages_block ===== */
#dev-stages {
    word-break: keep-all;
    hyphens: auto;
}

#dev-stages .dev-stage-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#dev-stages .dev-stage-card:hover {
    transform: translateY(-4px);
    border-color: var(--secondary-accent, #ff9442) !important;
    box-shadow: 0 12px 24px rgba(255, 107, 0, 0.08) !important;
}

#dev-stages .dev-stage-icon-wrap {
    transition: transform 0.3s ease;
}

#dev-stages .dev-stage-card:hover .dev-stage-icon-wrap {
    transform: scale(1.08);
}

@media (max-width: 767.98px) {
    #dev-stages h2 {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    #dev-stages h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }

    #dev-stages p {
        font-size: 0.85rem !important;
    }

    #dev-stages .dev-stage-number {
        font-size: 1.35rem !important;
    }
}

/* ===== mechanics_block ===== */
.mechanics-section {
    position: relative;
}

.mechanics-section .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mechanics-section .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

.mechanics-section .modal-content {
    border: 1px solid var(--border-color) !important;
}

.mechanics-section .btn-close:focus {
    box-shadow: none;
}

/* ===== glossary_block ===== */
#glossary {
    overflow: hidden;
    width: 100%;
}

.glossary-section input.js-glossary-search:focus {
    outline: none;
    box-shadow: none;
}

.glossary-section input.js-glossary-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.glossary-section .js-glossary-card .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}

.glossary-section .js-glossary-card .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.25rem rgba(255, 107, 0, 0.12) !important;
}

@media (max-width: 767.98px) {
    .glossary-section h2 {
        font-size: 1.125rem !important;
        line-height: 1.25 !important;
        hyphens: auto;
    }

    .glossary-section h3 {
        font-size: 0.9375rem !important;
        line-height: 1.2 !important;
        hyphens: auto;
    }
}

/* ===== faq_block ===== */
#faq {
    overflow: hidden;
}

#faq .accordion-button:not(.collapsed) {
    background-color: var(--background-secondary) !important;
    color: var(--primary-accent) !important;
}

#faq .accordion-button:focus {
    box-shadow: none !important;
}

#faq .accordion-button::after {
    filter: sepia(1) hue-rotate(340deg) saturate(5);
}

#faq h2,
#faq h3,
#faq p {
    hyphens: auto;
}

@media (max-width: 767.98px) {
    #faq h2 {
        font-size: 1rem !important;
        line-height: 1.2;
    }

    #faq h3 button {
        font-size: 0.875rem !important;
        line-height: 1.25;
    }
}

/* ===== footer_block ===== */
#footer {
    overflow: hidden;
    background-color: var(--background-dark-surface);
    width: 100%;
    hyphens: auto;
}

#footer a:hover {
    color: var(--primary-accent) !important;
}

@media (max-width: 767.98px) {
    #footer h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    #footer h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }

    #footer p,
    #footer span,
    #footer a {
        font-size: 0.8125rem !important;
    }
}