:root {
    /* [포인트 컬러]: 다크 테마에 맞춘 반전 색상 */
    --point-color: #FFFFFF;
    --bg-white: #000000;
    --bg-black: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --border-color: #222222;

    /* 안전 영역 처리 (사파리 등 모바일 대응) */
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.5;
    /* 사파리 바운스 방지 및 스크롤 최적화 */
    overscroll-behavior-y: none;
    width: 100%;
    min-height: 100dvh;
}

/* [사파리 호환] 100dvh 대응 컨테이너 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    position: relative;
}

/* 상단 헤더 컨테이너 (로고 + 섹터 탭) */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    padding-top: var(--safe-top);
    border-bottom: 1px solid var(--border-color);
}

/* 첫 줄: 로고 및 아이콘 */
.header-top {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-left,
.header-right {
    min-width: 80px;
    /* 양쪽 최소 여백 확보로 절대 중앙 정렬 유지 (텍스트 짤림 방지) */
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: lowercase;
    text-align: center;
    flex: 1;
    /* 남은 공간을 로고가 차지하여 중앙 강제 위치 */
}

/* 상단 헤더: 로그인 텍스트 버튼 */
.btn-login-txt {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s;
}

.btn-login-txt:active {
    color: var(--text-primary);
}

/* 상단 헤더: 로그인 시 아바타 + 닉네임 */
.user-profile-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #111111;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-avatar svg {
    width: 14px;
    height: 14px;
}

.header-nickname {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 두 번째 줄: 섹션 탭 (피드/시그널) */
.sector-nav {
    display: flex;
    height: 44px;
}

.sector-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.sector-tab.active {
    color: var(--text-primary);
}

/* 활성 탭 하단 인디케이터 (화이트 테마) */
.sector-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    /* 부모의 border-bottom을 살짝 덮어 자연스럽게 */
    left: 0;
    right: 0;
    height: 2px;
    background-color: #FFFFFF;
}

/* 메인 콘텐츠 영역 */
.main-content {
    flex: 1;
    /* app-header의 높이(50+44) + safe-top을 고려하여 패딩 설정 */
    padding-top: calc(94px + var(--safe-top));
    padding-bottom: calc(60px + var(--safe-bottom));
}

/* [하단 네비게이션]: 일반 하단 바 (Black & White) */
.app-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + var(--safe-bottom));
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item .material-icons {
    font-size: 24px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
}

.nav-item.active {
    color: #FFFFFF;
}

.nav-item.active .material-icons {
    color: #FFFFFF;
}

/* 유틸리티 */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}