.main-header .container .header-with-back {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
}

/* 뒤로가기 버튼 스타일 */
.main-header .container .header-with-back .back-arrow {
    font-size: 1rem;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
}

/* 제목 스타일 (남은 공간 차지) */
.main-header .container .header-with-back .header-title {
    font-size: 1.2rem;
    color: #333;
    flex-grow: 1;
    text-align: center;
    margin-right: 60px;
    /* 버튼 크기만큼 우측 여백을 주어 중앙 정렬 보정 */
}

/* 마이페이지 메인 컨테이너 스타일 */
.mypage-container {
    flex-grow: 1;
    background-color: #f4f4f4;
    padding: 20px 0;
}

/* 탭 메뉴 스타일 */
.mypage-tabs {
    display: flex;
    justify-content: space-around;
    /* 버튼 간격을 균일하게 */
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* 탭 버튼 기본 스타일 */
.mypage-tabs .tab-button {
    flex-grow: 1;
    padding: 15px 0;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    /* 부드러운 색상 전환 효과 */
    border-bottom: 3px solid transparent;
    /* 하단 밑줄 공간 확보 */
}

/* 마우스 올렸을 때 효과 */
.mypage-tabs .tab-button:hover {
    color: #007bff;
}

/* 활성화된 탭 버튼 스타일 */
.mypage-tabs .tab-button.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
}


.tab-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 0 auto;
    max-width: 800px;
    display: none;
    /* 기본 숨김 */
}

/* 활성화된 탭 내용만 표시 */
.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 즐겨찾기 목록 스타일 */
.station-list {
    list-style: none;
    padding: 0;
}

.station-list li {
    display: flex;
    justify-content: space-between;
    /* 양 끝 정렬 */
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.station-list li:last-child {
    border-bottom: none;
}

.station-list li span {
    font-size: 1.1rem;
    color: #333;
}

.station-list li .status {
    font-size: 0.9rem;
    color: #666;
    margin-left: auto;
    margin-right: 10px;
}

/* 삭제 버튼 */
.station-list li .btn-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
}


.photo-grid {
    display: grid;
    /* 최소 150px 크기 유지, 공간 남으면 늘어남 */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.photo-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    /* 비율 유지하며 꽉 채우기 */
    display: block;
}

.photo-item p {
    padding: 8px;
    font-size: 0.85rem;
    color: #555;
    margin: 0;
}

/* 프로필 스타일 */
.profile-form {
    margin-top: 20px;
}

.profile-form .input-group input[readonly] {
    background-color: #eee;
    color: #777;
    cursor: not-allowed;
}

/* 버튼 공통 스타일 */
.btn-update-profile,
.btn-logout {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.btn-update-profile {
    background: #28a745;
    /* 초록색 */
    color: #fff;
}

.btn-logout {
    background: #6c757d;
    /* 회색 */
    color: #fff;
}

/* 반응형 웹 */
@media (max-width: 768px) {
    .mypage-tabs {
        flex-wrap: wrap;
        /* 탭이 좁으면 줄바꿈 허용 */
    }

    .mypage-tabs .tab-button {
        flex-basis: 50%;
        /* 한 줄에 2개씩 배치 */
        padding: 12px 0;
    }

    .tab-content {
        margin: 0 10px;
    }

    .photo-grid {
        /* 사진 최소 크기를 120px로 줄임 */
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 반응형 웹 */
@media (max-width: 480px) {
    .mypage-tabs .tab-button {
        flex-basis: 100%;
        /* 모바일에서는 탭을 세로로 1개씩 배치 */
    }

    .mypage-tabs {
        gap: 5px;
    }

    .photo-grid {
        /* 사진 최소 크기를 100px로 더 줄임 */
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* 모달 팝업 디자인 */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    /* 최상위 레이어 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* 검은색 배경 투명도 80% */
    align-items: center;
    /* Flexbox 중앙 정렬 */
    justify-content: center;
}

/* 팝업 내용 박스 */
.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s;
    /* 등장 애니메이션 적용 */
}

/* 부드럽게 나타나는 효과 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 닫기(X) 버튼 */
.close-btn {
    position: absolute;
    /* 모달 컨텐츠 기준 절대 위치 */
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-btn:hover {
    color: #000;
}

/* 모달 내부 이미지 */
#modal-img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 15px;
    background: #f0f0f0;
}

/* 모달 텍스트 정보 */
.modal-info h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.modal-info .date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* 댓글/설명 박스 스타일 */
.comment-box {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.comment-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
}

.comment-box p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}