
/* =========================================
   YaToon Member Auth Modal
   ========================================= */

.member-auth-overlay[hidden],
.member-auth-field[hidden] {
    display: none !important;
}

.member-auth-overlay,
.member-auth-overlay * {
    box-sizing: border-box;
}

.member-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .76);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow-y: auto;
}

.member-auth-dialog {
    position: relative;
    width: 100%;
    max-width: 410px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 38px 32px 30px;
    border: 1px solid #33343d;
    border-radius: 18px;
    background: #1b1c23;
    color: #f5f5f7;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
    font-family: Pretendard, -apple-system,
                 BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.member-auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #999ba6;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    transition: color .2s, background .2s;
}

.member-auth-close:hover {
    background: #2c2d36;
    color: #fff;
}

.member-auth-heading {
    margin-bottom: 28px;
    text-align: center;
}

.member-auth-heading h2 {
    margin: 0 0 9px;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1.3px;
}

.member-auth-heading p {
    margin: 0;
    color: #9b9da8;
    font-size: 13px;
    line-height: 1.6;
}

.member-auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 26px;
    padding: 4px;
    border-radius: 11px;
    background: #121318;
}

.member-auth-tab {
    flex: 1;
    min-height: 42px;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #999ba6;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.member-auth-tab.is-active {
    background: #ef4565;
    color: #fff;
}

.member-auth-field {
    margin-bottom: 18px;
}

.member-auth-field label {
    display: block;
    margin-bottom: 9px;
    color: #d6d7de;
    font-size: 13px;
    font-weight: 600;
}

.member-auth-field input {
    display: block;
    width: 100%;
    height: 47px;
    padding: 0 14px;
    border: 1px solid #393b45;
    border-radius: 9px;
    outline: none;
    background: #111218;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.member-auth-field input::placeholder {
    color: #696c78;
}

.member-auth-field input:focus {
    border-color: #ef4565;
    box-shadow: 0 0 0 3px rgba(239, 69, 101, .12);
}

.member-auth-hint {
    margin: 7px 0 0;
    color: #8e909c;
    font-size: 11px;
    line-height: 1.5;
}

.member-auth-message {
    min-height: 18px;
    margin: 4px 0 12px;
    color: #ff8296;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.member-auth-message.is-success {
    color: #77dbaa;
}

.member-auth-submit {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px;
    border: 0;
    border-radius: 9px;
    background: #ef4565;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}

.member-auth-submit:hover {
    background: #e73557;
}

.member-auth-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.member-auth-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #30313a;
    text-align: center;
}

.member-auth-footer p {
    margin: 0;
    color: #8e909c;
    font-size: 12px;
    line-height: 1.6;
}

.member-auth-overlay button:focus-visible {
    outline: 2px solid #ff8197;
    outline-offset: 3px;
}

/* 모바일 */
@media (max-width: 480px) {
    .member-auth-overlay {
        padding: 14px;
    }

    .member-auth-dialog {
        max-height: calc(100dvh - 28px);
        padding: 34px 22px 25px;
        border-radius: 15px;
    }

    .member-auth-heading h2 {
        font-size: 27px;
    }

    .member-auth-heading {
        margin-bottom: 24px;
    }

    .member-auth-tabs {
        margin-bottom: 22px;
    }
}

/* 화면 높이가 작은 기기 */
@media (max-height: 600px) {
    .member-auth-overlay {
        align-items: flex-start;
    }
}

/* 애니메이션 최소화 설정 존중 */
@media (prefers-reduced-motion: reduce) {
    .member-auth-overlay *,
    .member-auth-overlay *::before,
    .member-auth-overlay *::after {
        transition: none !important;
    }
}
/* 헤더 회원 버튼 */

.header-member-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid #ef4565;
    border-radius: 8px;
    background: transparent;
    color: #ef4565;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.header-member-btn:hover {
    background: #ef4565;
    color: #fff;
}

@media (max-width: 480px) {
    .header-member-btn {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 12px;
    }
}


/* ========================================
   내 계정 드롭다운 메뉴
======================================== */

.member-account-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.member-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 10000;

    width: 180px;
    padding: 6px;

    background: #20212a;
    border: 1px solid #383a46;
    border-radius: 12px;

    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.member-account-menu[hidden] {
    display: none !important;
}

.member-account-menu button {
    display: block;
    width: 100%;
    padding: 12px 14px;

    background: transparent;
    border: 0;
    border-radius: 8px;

    color: #f4f4f5;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;

    transition: background 0.15s ease;
}

.member-account-menu button:hover {
    background: #333541;
}

#memberLogoutButton {
    color: #ff8190;
}

#memberLogoutButton:hover {
    background: rgba(255, 90, 110, 0.12);
}

@media (max-width: 768px) {
    .member-account-menu {
        width: 170px;
        right: 0;
    }
}

/* =========================================
   YaToon 회원 헤더 버튼
========================================= */

.header-member-actions {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

.header-member-link {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 0;
    margin: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    color: #aeb3bf;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.2px;

    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.header-member-link:hover {
    color: #ffffff;
}

.header-member-link:focus-visible {
    outline: 2px solid #8e94a3;
    outline-offset: 4px;
    border-radius: 2px;
}

.header-member-link:disabled {
    opacity: 0.5;
    cursor: wait;
}

.header-member-divider {
    display: block;
    width: 1px;
    height: 13px;
    flex: 0 0 1px;
    background: #414550;
}

.header-member-login {
    color: #e7e9ef;
}

@media (max-width: 768px) {
    .header-member-actions {
        gap: 10px;
    }

    .header-member-link {
        font-size: 12px;
    }

    .header-member-divider {
        height: 11px;
    }
}

/* =========================================
   YaToon 회원 버튼 최종 스타일
========================================= */

.header-actions .header-member-link {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 0;
    margin: 0;

    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;

    color: #e5e7eb;
    -webkit-text-fill-color: #e5e7eb;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;

    cursor: pointer;
    transition: color 0.2s ease;
}

.header-actions .header-member-link:hover {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.header-actions .header-member-link:focus-visible {
    outline: 2px solid #9ca3af;
    outline-offset: 4px;
}

.header-actions .header-member-link:disabled {
    opacity: 0.5;
    cursor: wait;
}

.header-actions .header-member-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.header-actions .header-member-divider {
    width: 1px;
    height: 13px;
    background: #454854;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .header-actions .header-member-actions {
        gap: 10px;
    }

    .header-actions .header-member-link {
        font-size: 12px;
    }
}

/* YaToon 회원 버튼 - 미니멀 다크 스타일 */

.header-actions .header-member-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 34px;
    padding: 0 14px;

    background: #24262d;
    border: 1px solid #41444d;
    border-radius: 7px;
    box-shadow: none;

    color: #f1f2f5;
    -webkit-text-fill-color: #f1f2f5;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.2px;
    white-space: nowrap;

    cursor: pointer;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.header-actions .header-member-link:hover {
    background: #30333c;
    border-color: #656a76;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.header-actions .header-member-link:focus-visible {
    outline: 2px solid #aeb4c0;
    outline-offset: 3px;
}

.header-actions .header-member-link:disabled {
    opacity: 0.5;
    cursor: wait;
}

.header-actions .header-member-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 버튼형 디자인이므로 구분선 숨김 */
.header-actions .header-member-divider {
    display: none;
}

@media (max-width: 768px) {
    .header-actions .header-member-link {
        min-height: 32px;
        padding: 0 10px;
        font-size: 11px;
    }

    .header-actions .header-member-actions {
        gap: 6px;
    }
}

/* =========================================
   YaToon Premium Dark Member Buttons
========================================= */

.header-actions .header-member-link {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 35px;
    padding: 0 13px;
    margin: 0;

    background: #242127;
    border: 1px solid #39323a;
    border-radius: 9px;

    color: #eee7eb;
    -webkit-text-fill-color: #eee7eb;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.4;
    white-space: nowrap;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.header-actions .header-member-link:hover {
    background: #302830;
    border-color: #66505c;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.header-actions .header-member-link:active {
    transform: translateY(0);
    box-shadow: none;
}

.header-actions .header-member-link:focus-visible {
    outline: 2px solid #ee4565;
    outline-offset: 3px;
}

.header-actions .header-member-link:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none;
}

/* 로그인 후 버튼 배치 */

.header-actions .header-member-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-actions .header-member-divider {
    display: none;
}

/* 로그아웃만 은은한 로즈 포인트 */

.header-actions #memberLogoutButton {
    background: #2a2028;
    border-color: #4a303d;
    color: #f4c4ce;
    -webkit-text-fill-color: #f4c4ce;
}

.header-actions #memberLogoutButton:hover {
    background: #392630;
    border-color: #a14c67;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

/* 모바일 */

@media (max-width: 768px) {
    .header-actions .header-member-actions {
        gap: 6px;
    }

    .header-actions .header-member-link {
        min-height: 32px;
        padding: 0 9px;
        border-radius: 7px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-actions .header-member-link {
        transition: none;
        transform: none;
    }
}
