/* ==========================================
   1. 기본 초기화 및 공통 설정
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #121212; /* 기본 다크 배경 */
    color: #ffffff;
    overflow-x: hidden;
}

/* 레퍼런스 스타일의 그라데이션 배경 */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 30% 30%, rgba(180, 50, 50, 0.4), transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(130, 40, 100, 0.4), transparent 60%);
    filter: blur(80px);
    z-index: -1; /* 다른 요소들 뒤로 배치 */
}

/* ==========================================
   2. 상단 헤더 영역 (GNB)
   ========================================== */
.triaview-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
}

.triaview-header .logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 네비게이션 버튼 래퍼 (수직 정렬 보완) */
.auth-buttons {
    display: flex;
    align-items: center; 
    gap: 16px;
}

.auth-buttons button {
    background: transparent;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Sign Up 버튼 강조 (Glassmorphism 적용) */
.btn-signup {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
}

.btn-signup:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ==========================================
   3. 모던 글로벌 팝오버 다국어 메뉴
   ========================================== */
.lang-popover-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.btn-globe {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-globe:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-globe svg {
    opacity: 0.8;
}

/* 팝오버 메뉴 스타일 */
.lang-popover-menu {
    position: absolute;
    top: 130%;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    list-style: none;
    padding: 8px;
    min-width: 140px;
    display: none; /* JS로 제어 */
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-popover-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.lang-popover-menu li {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-popover-menu li:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 현재 선택된 언어 강조 표시 */
.lang-popover-menu li.active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: 700;
}
.lang-popover-menu li.active::after {
    content: "✓";
    color: #ff4757; /* 브랜드 컬러 포인트 */
}

/* ==========================================
   4. 메인 콘텐츠 래퍼
   ========================================== */
.content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 80px); /* 헤더 높이 제외 */
    padding: 0 20px;
}

/* ✅ [추가됨] SUNO 스타일 회원가입 모달 CSS */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none; /* 기본 숨김 */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.show { display: flex; }

.modal-content {
    background: #1e1e20;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: #2a2a2c;
    border: none; color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer;
    font-size: 20px;
}

.modal-logo { font-size: 28px; font-weight: 800; margin-bottom: 20px; letter-spacing: 2px; }
.modal-header h3 { font-size: 20px; margin-bottom: 8px; }
.modal-header p { color: #888; font-size: 14px; margin-bottom: 30px; }

/* 소셜 버튼 */
.social-buttons { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.btn-social {
    width: 60px; height: 44px;
    background: #2a2a2c;
    border: 1px solid #3a3a3c;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.btn-social:hover { background: #3a3a3c; }
.btn-social img { width: 20px; }

.divider {
    margin: 24px 0;
    position: relative;
    border-bottom: 1px solid #333;
}
.divider span {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e20;
    padding: 0 12px;
    color: #666; font-size: 14px;
}

/* 입력창 */
.input-group { text-align: left; margin-bottom: 24px; }
.input-group label { display: block; font-size: 14px; color: #aaa; margin-bottom: 8px; }
.input-group input {
    width: 100%; padding: 14px;
    background: #121214;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff; font-size: 16px;
}

.btn-continue {
    width: 100%; padding: 16px;
    background: #fff; color: #000;
    border: none; border-radius: 12px;
    font-size: 16px; font-weight: 700;
    cursor: pointer; margin-bottom: 20px;
}

.modal-footer p { font-size: 14px; color: #888; }
.modal-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.terms { display: block; margin-top: 30px; font-size: 11px; color: #555; }

/* ==========================================
   모바일 반응형 레이아웃 (768px 이하)
   ========================================== */
@media (max-width: 768px) {
    .triaview-header {
        padding: 16px 20px;
    }
    .triaview-header .logo {
        font-size: 20px;
    }
    .auth-buttons {
        gap: 8px;
    }
    .lang-popover-wrapper {
        margin-right: 4px;
    }
    .btn-globe {
        padding: 6px 10px;
        font-size: 12px;
    }
    .btn-globe svg {
        width: 14px;
        height: 14px;
    }
    .auth-buttons button {
        padding: 6px 12px;
        font-size: 13px;
    }
}