/*
* [모듈명]: 프로필 스타일 (B&W 최적화 버전)
* [파일명]: profile.css
* [역할]: Talae의 핵심 아이덴티티인 Black & White 미니멀리즘을 완벽히 구현합니다.
*/

:root {
    --point-color: #FFFFFF;
    --bg-dark: #000000;
    --card-bg: #111111;
    --border-color: #222222;
    --text-main: #FFFFFF;
    --text-sub: #888888;
    --text-dim: #444444;
}

.profile-page {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.profile-nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
}

.btn-settings {
    background: #111;
    border: 1px solid var(--border-color);
    color: #AAA;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-settings:active {
    background: #222;
    transform: scale(0.96);
}

.profile-content {
    padding-bottom: 100px;
}

/* 유저 메인 정보 섹션 - 좌측 정렬 개편 */
.user-main-info {
    display: flex;
    flex-direction: row; /* 좌우 병렬 배치 */
    align-items: flex-start;
    padding: 32px 20px;
    gap: 20px;
}

.profile-header-meta {
    text-align: left; /* 좌측 정렬 */
    margin-bottom: 8px;
}

.profile-nickname {
    display: block;
    font-size: 22px; /* 가독성을 위해 소폭 확대 */
    font-weight: 800;
    margin-bottom: 2px;
}

.profile-age-location {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 108px;
    height: 108px;
    background: #161616;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.profile-avatar .material-icons {
    font-size: 64px;
    color: var(--text-dim);
}

.btn-edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 34px;
    height: 34px;
    background: #FFF;
    color: #000;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
    cursor: pointer;
}

.location {
    font-size: 14px;
    color: var(--text-sub);
    font-weight: 500;
}

/* 칩 시스템 - 좌측 정렬 최적화 */
.profile-chips {
    display: flex;
    justify-content: flex-start; /* 좌측 정렬 */
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 14px;
    background: #111;
    border: 1px solid #222;
    border-radius: 4px; /* 알약 모양 제거, 직사각형 라운드로 변경 */
    font-size: 13px;
    font-weight: 700;
    color: #AAA;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip .emoji {
    font-size: 14px;
}

.chip-temp {
    color: #FF5F5F;
    border-color: rgba(255, 95, 95, 0.3);
    background: rgba(255, 95, 95, 0.05);
    font-weight: 800;
}

/* 온보딩 태그 전용 칩 스타일 */
.chip-onboarding {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    font-weight: 500;
}

/* 오행별 상징색 테마 (이모지 제거 대응) */
.chip-element.element-목 { color: #4CAF50; border-color: rgba(76, 175, 80, 0.3); background: rgba(76, 175, 80, 0.1); }
.chip-element.element-화 { color: #FF5252; border-color: rgba(255, 82, 82, 0.3); background: rgba(255, 82, 82, 0.1); }
.chip-element.element-토 { color: #FFB300; border-color: rgba(255, 179, 0, 0.3); background: rgba(255, 179, 0, 0.1); }
.chip-element.element-금 { color: #E0E0E0; border-color: rgba(224, 224, 224, 0.3); background: rgba(224, 224, 224, 0.1); }
.chip-element.element-수 { color: #2196F3; border-color: rgba(33, 150, 243, 0.3); background: rgba(33, 150, 243, 0.1); }

/* 메인 액션 버튼 */
.profile-main-actions {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 40px;
}

.btn-action {
    flex: 1;
    height: 56px;
    border: 1px solid #222;
    border-radius: 12px;
    background: #111;
    color: #FFF;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.btn-action:active {
    transform: scale(0.97);
    background: #161616;
}

.btn-match {
    border-color: #333;
}

.btn-success {
    background: #FFF;
    color: #000;
    border: none;
}

/* 트위터 스타일 소개 (Bio) */
.profile-bio {
    padding: 0 24px;
    margin-bottom: 24px;
    text-align: left;
}

.bio-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bio-container:active {
    opacity: 0.6;
}

.bio-text {
    font-size: 15px;
    line-height: 1.6;
    color: #EEE;
    font-weight: 500;
    white-space: pre-wrap;
    word-break: break-all;
}

.bio-pencil-icon {
    display: none; /* 연필 아이콘 삭제 */
}

.btn-edit-bio {
    margin-top: 16px;
    background: #FFF;
    /* 블라인드 앱 감성: 강조 수정을 위해 화이트 버튼으로 변경 */
    border: none;
    color: #000;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-edit-bio:active {
    transform: scale(0.96);
    background: #EEE;
}

.btn-edit-bio .material-icons {
    font-size: 16px;
}

/* 탭 시스템 */
.profile-tab-control {
    display: flex;
    padding: 0 20px;
    gap: 24px;
    border-bottom: 1px solid #111;
    margin-bottom: 32px;
}

.tab-item {
    padding: 14px 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dim);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-item.active {
    color: #FFF;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    right: 0;
    height: 3px;
    background: #FFF;
    border-radius: 10px;
}



/* 공통 모달 오버레이 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    /* JS 제어 */
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    background: #111;
    border: 1px solid #222;
    border-radius: 20px;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
}

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

.btn-close-modal {
    background: none;
    border: none;
    color: #666;
    display: flex;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

#bio-textarea {
    width: 100%;
    height: 140px;
    background: #000;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 16px;
    color: #FFF;
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    resize: none;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #444;
    font-weight: 600;
    margin-top: 8px;
}

.modal-footer {
    padding: 0 24px 24px;
}

.btn-save-bio {
    width: 100%;
    height: 52px;
    background: #FFF;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.btn-save-bio:active {
    transform: scale(0.98);
    opacity: 0.9;
}


/* 활동 내역 리스트 현대화 (B&W) */
.profile-activity {
    padding: 0;
}

.activity-tabs {
    display: flex;
    border-bottom: 1px solid #111;
    padding: 0 20px;
    background: #000;
    position: sticky;
    top: 64px; /* 헤더 높이 */
    z-index: 90;
}

.act-tab {
    flex: 1;
    text-align: center;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 800;
    color: #444;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.act-tab.active {
    color: #FFF;
}

.act-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #FFF;
}

.act-list {
    display: none;
    flex-direction: column;
}

.act-list.active {
    display: flex;
}

.act-item {
    padding: 20px;
    border-bottom: 1px solid #111;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
}

.act-item:active {
    background: #0a0a0a;
}

.act-item .top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.act-item .category {
    font-size: 10px;
    font-weight: 900;
    color: #444;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #111;
    padding: 2px 6px;
    border-radius: 4px;
}

.act-item .point {
    font-size: 11px;
    color: #444;
}

.act-item .title {
    font-size: 16px;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 6px;
    line-height: 1.4;
}

.act-item .content {
    font-size: 14px;
    line-height: 1.6;
    color: #888;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 미디어 아이템 전용 스타일 */
.media-item {
    flex-direction: row !important;
    gap: 16px;
}

.media-preview {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.empty-msg {
    padding: 80px 20px;
    text-align: center;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

/* 푸터 여백 보정 */
.profile-content {
    padding-bottom: 60px;
}