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

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    transition: none;
}

/* ===== Design Tokens ===== */
:root {
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-ko: 'Noto Sans KR', var(--font-sans);
    --font-ja: 'Noto Sans JP', var(--font-sans);
    --font-zh: "PingFang TC", "Microsoft JhengHei", "微軟正黑體", 'Noto Sans HK', var(--font-sans);

    /* Brand */
    --color-primary: #4f8ef7;
    --color-primary-hover: #3a7ae8;
    --color-danger: #d9534f;

    /* App theme (dark editor) */
    --color-bg-app: #0d0d0d;

    /* Page theme (navy) */
    --color-bg-page: #212b46;
    --color-bg-nav: rgba(33, 43, 70, 0.95);
    --color-bg-footer: #1a2236;

    /* Borders */
    --color-border: #333;

    /* Text */
    --color-text: #fff;
    --color-text-muted: #888;
    --color-text-dim: #555;

    /* black color */
    --color-black_01: #1a1a1ae6;
    --color-black_02: #2b2b2be6;
    --color-black_03: #555;
}

/* ===== Base ===== */
body {
    font-family: var(--font-sans);
    color: var(--color-text);
}

html[lang="ko"] body { font-family: var(--font-ko); }
html[lang="ja"] body { font-family: var(--font-ja); }
html[lang="zh-TW"] body { font-family: var(--font-zh); }

/* ===== Navigation ===== */
.nav {
    /* position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-nav);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border); */
}

.nav-logo {
    /* display: flex; */
    /* align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none; */
}

.nav-logo-img {
    /* height: 64px; */
    width: 120px;
    opacity: 1;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 48px;
    border-top: 1px solid #1a1a1a;
    background-color: #000;
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.footer-logo-img {
    width: 120px;
    height: auto;
    opacity: 1;
    flex-shrink: 0;
}

.footer-copy-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-wrap: nowrap;
    align-content: center;
    align-items: baseline;
}

.footer-copyright {
    font-size: 14px;
    color: #fff;
}

.footer-adobe {
    font-size: 14px;
    color: #fff;
    line-height: 1.5;
    max-width: 550px;
    opacity: 0.5;
}

.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.footer-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.footer-link:hover {
    color: var(--color-text);
}

/* ===== Language Selector ===== */
.nav-lang {
    display: flex;
    gap: 10px;
    /* background: #1a1a1ae6; */
    border-radius: 20px;
    padding: 0 14px;
    line-height: 35px;
    flex-direction: row;
    align-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.nav-lang:hover {
    background: #222;
}

.nav-lang:hover .lang-select-btn{
    color:#fff;
}

.nav-lang svg {
    opacity: 0.6;
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    color:#fff;
}

.nav-lang:hover svg{
    opacity:1
}

.lang-custom-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.lang-select-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: color 0.15s;
    display: block;
    white-space: nowrap;
    pointer-events: none;
}

.lang-select-btn:hover {
    color: #fff;
}

.lang-select-dropdown {
    display: none;
    position: absolute;
    overflow: hidden;
    z-index: 2000;
    min-width: max-content;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    top: 40px;
    left: 50%;
    padding: 10px 20px;
    background-color: #1a1a1ae6;
    backdrop-filter: blur(5px);
    transform: translateX(-58%);
    cursor: pointer;
    border-radius: 16px;
}

.lang-custom-select.open .lang-select-dropdown {
    display: block;
}




.settings-menu-lang .lang-select-dropdown {
    top: unset;
    bottom: -10px;
    left: 80px;
    padding: 10px 20px;
    border: unset;
    background-color: #1a1a1ae6;
    backdrop-filter: blur(5px);
}

.settings-menu-lang .lang-select-dropdown .lang-select-option{
    padding: 0 20px;
    font-size: 16px;
    line-height: 38px;
    border-radius: 19px;
    text-align: center;
}





.lang-select-option {
    padding: 0 20px;
    font-size: 16px;
    line-height: 38px;
    border-radius: 19px;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.lang-select-option:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.lang-select-option.active {
    color: var(--color-primary);
}

/* ===== Nav Login Dropdown ===== */
.nav-login-inner {
    position: relative;
}

.nav-login-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: color 0.15s;
}

.nav-login-btn:hover {
    color: #fff;
}

.nav-login-dropdown {
    display: none;
    position: absolute;
    overflow: hidden;
    z-index: 2000;
    min-width: 110px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    top: 35px;
    left: 50%;
    padding: 10px 20px;
    background-color: #1a1a1ae6;
    backdrop-filter: blur(5px);
    transform: translateX(-50%);
    cursor: pointer;
    border-radius: 16px;
}

.nav-login-select.open .nav-login-dropdown {
    display: block;
}

.nav-login-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
    padding: 0 20px;
    font-size: 16px;
    line-height: 38px;
    border-radius: 19px;
    text-align: center;
}

.nav-login-option:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.nav-login-dropdown div[data-provider="google"] svg{width:18px;height:auto}
.nav-login-dropdown div[data-provider="apple"] svg{width:26px; height:auto}
.nav-login-dropdown div[data-provider="discord"] svg{width: 18px;height: auto;}


/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-popup {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 12px 0 20px;
    background-color: var(--color-primary);
    transition: none;
    line-height: 40px;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0.6;
    transition: background-color 0.15s, opacity 0.15s;
}

.modal-close-btn img {
    transform: rotate(45deg);
    transition: none;
}

.modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    /* .nav {
        padding: 16px 24px;
    } */

    .footer {
        padding: 24px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}


@media (max-width: 1280px) {
    .modal-header {
        line-height: 40px;
        padding: 0 6px 0 15px;
    }

    .modal-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 1024px) {
    .nav-login-btn {
        font-size: 14px;
    }

    .lang-select-btn {
    background: transparent;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .nav-login-inner {
    }
    
    .nav-login-btn {
        font-size: 12px;
        line-height: 30px;
        height: 30px;
    }

    .lang-select-btn {
    background: transparent;
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .modal-header {
        line-height: 40px;
    }

    .modal-header h3 {
        font-size: 13px;
    }
}







/* 메인 애니용 스타일 */
.scene {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a14 100%);
    overflow: hidden;
}

.scene .layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    /* JS 실시간 업데이트 시 버벅임을 줄이기 위해 transition 제거 */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.scene .layer.back { z-index: 5; }
.scene .character-wrapper { z-index: 10; position: relative; }
.scene .layer.front { z-index: 20; }

.scene .character-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 0 25px rgba(255,255,255,0.4));
    animation: char-float 4s ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.scene .char-head {
    width: 60px;
    height: 60px;
    background: var(--char-color);
    border-radius: 50%;
    margin-bottom: 10px;
}
.scene .char-body {
    width: 80px;
    height: 120px;
    background: var(--char-color);
    border-radius: 40px 40px 10px 10px;
}

@keyframes char-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.scene .star-wrapper {
    position: absolute;
    animation: floating infinite ease-in-out;
    will-change: transform;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scene .star-blur-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: filter;
}

.scene .star-inner {
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    background-color: currentColor;
    animation: pulsing infinite ease-in-out;
    will-change: opacity, filter;
}

@keyframes floating {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    33% { transform: translate3d(120px, -90px, 0) scale(1.1) rotate(20deg); }
    66% { transform: translate3d(-80px, 70px, 0) scale(0.9) rotate(-20deg); }
}

@keyframes pulsing {
    0%, 100% { opacity: 0.1; filter: brightness(0.4); }
    50% { opacity: 0.9; filter: brightness(1.7); }
}