/*
 * 인증 페이지 공통 스타일 - 모던 반응형 디자인
 * 강조 색상: #008f8c
 */

/* ========================================
   상세 페이지 헤더 설정
   ======================================== */
/* 모바일에서 기본 헤더 및 탭 네비게이션 숨김 */
@media (max-width: 1023px) {
    #header {
        display: none !important;
    }

    .tab_nav.common {
        display: none !important;
    }
}

/* header-back 스타일 */
.header-back {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.header-back .btn-back {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-back .btn-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-back .header-title {
    flex: 1;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.header-back .header-spacer {
    width: 2.4rem;
}

/* PC에서 header-back 숨김 */
@media (min-width: 1024px) {
    .header-back {
        display: none !important;
    }
}

/* PC 페이지 타이틀 */
.page-title-pc {
    display: none;
}

@media (min-width: 1024px) {
    .page-title-pc {
        display: block;
        font-size: 2rem;
        font-weight: 700;
        color: var(--text-primary, #1a1a1a);
        text-align: center;
        padding: 2rem 0 1rem;
        margin: 0 auto;
        max-width: 480px;
    }

    /* setting-container용 (마이페이지 등) */
    .setting-container .page-title-pc {
        max-width: 768px;
        text-align: left;
        padding: 1.5rem 0 1rem;
    }
}

.auth-page {
    background: var(--bg-gray, #f8f9fa);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    background: var(--bg-white, #ffffff);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    max-width: 400px;
    width: 100%;
}

@media (min-width: 768px) {
    .auth-container {
        padding: 3rem 2rem;
    }
}

.auth-title {
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
    text-align: center;
    margin: 0 0 2rem;
}

/* 알림 메시지 */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border-color, #e5e5e5);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary, #1a1a1a);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color, #008f8c);
    box-shadow: 0 0 0 3px rgba(0, 143, 140, 0.1);
}

.form-input.error {
    border-color: #dc3545;
}

.form-input::placeholder {
    color: var(--text-light, #999);
}

.error-message {
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.5rem;
}

/* 체크박스 */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.remember-me label {
    font-size: 0.9375rem;
    color: var(--text-secondary, #666);
    cursor: pointer;
}

/* 버튼 */
.btn {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color, #008f8c);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover, #007370);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 143, 140, 0.3);
}

.btn-secondary {
    background: var(--bg-gray, #f8f9fa);
    color: var(--text-primary, #1a1a1a);
    border: 1.5px solid var(--border-color, #e5e5e5);
}

.btn-secondary:hover {
    background: var(--border-color, #e5e5e5);
}

.btn-kakao {
    background: #FEE500;
    color: #000000;
}

.btn-kakao:hover {
    background: #F7DC00;
}

/* 링크 */
.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.auth-links a {
    font-size: 0.9375rem;
    color: var(--text-secondary, #666);
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-links a:hover {
    color: var(--primary-color, #008f8c);
}

.auth-links span {
    color: var(--border-color, #e5e5e5);
}

/* 마이페이지 / 설정 페이지 */
.setting-container {
    background: var(--bg-white, #ffffff);
    min-height: 100vh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
}

/* 사용자 프로필 섹션 */
.user-profile-section {
    background: var(--bg-white, #ffffff);
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0;
}

.user-email {
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
    margin: 0;
}

.edit-profile-btn {
    padding: 0.625rem 1.25rem;
    background: var(--primary-color, #008f8c);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.edit-profile-btn:hover {
    background: var(--primary-hover, #007370);
    transform: translateY(-2px);
}

/* 카카오 섹션 */
.kakao-section {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    margin-bottom: 0.5rem;
}

.kakao-info {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 1rem;
}

.kakao-btn {
    height: 2.4375rem;
    background: #FEE500;
    border-radius: 20px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    color: #000000;
    padding: 0.875rem;
    transition: all 0.3s ease;
}

.kakao-btn:hover {
    background: #F7DC00;
}

.kakao-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* 설정 리스트 */
.setting-list {
    display: flex;
    flex-direction: column;
}

.setting-item {
    align-self: stretch;
    height: 4.25rem;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white, #ffffff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.item-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    opacity: 0.8;
}

/* 화살표 아이콘 */
.arrow-icon {
    width: 1.5rem;
    height: 1.5rem;
    transform: rotate(180deg);
    position: relative;
}

.arrow-icon::after {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 1rem;
    left: 0.5rem;
    top: 0.25rem;
    border: 1.5px solid black;
    border-left: none;
    border-bottom: none;
    transform: rotate(45deg);
}

/* 토글 스위치 */
.toggle-switch {
    width: 4rem;
    padding: 0.25rem;
    border-radius: 3.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-switch.off {
    background: #EEEEEE;
    justify-content: flex-start;
}

.toggle-switch.on {
    background: var(--primary-color, #008f8c);
    justify-content: flex-end;
}

.toggle-circle {
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.toggle-switch.off .toggle-text {
    opacity: 0.4;
}

.toggle-switch.on .toggle-text {
    color: white;
}

/* 정보 및 약관 섹션 */
.info-section {
    padding: 1.5625rem 0.0625rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    opacity: 0.8;
}

.info-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    opacity: 0.8;
}

.version-group {
    display: flex;
    gap: 1rem;
}

.link-group {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    opacity: 0.8;
}

/* 하단 계정 섹션 */
.account-section {
    padding: 1.5625rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5625rem;
}

.account-section .logout-btn {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color, #008f8c);
    opacity: 0.8;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    width: 100%;
    transition: all 0.3s ease;
}

.account-section .logout-btn:hover {
    opacity: 1;
}

.withdraw-btn {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.withdraw-btn:hover {
    opacity: 1;
    color: #dc3545;
}

/* ========================================
   PC 레이아웃 (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    /* 인증 폼 컨테이너 */
    .auth-container {
        max-width: 480px;
        margin: 0 auto;
        padding: 4rem 3rem;
    }

    .auth-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    /* 마이페이지 컨테이너 */
    .my-page-container,
    .edit-page-container,
    .alerts-page-container,
    .scrap-page-container,
    .history-page-container {
        max-width: 768px;
        margin: 0 auto;
        padding: 2rem 3rem;
    }

    /* 프로필 섹션 */
    .profile-section {
        padding: 3rem 2rem;
        border-radius: var(--radius-lg);
    }

    /* 메뉴 그리드 */
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}
