/* mypage.css */

/* 마이페이지 기본 스타일 */
.page-title {
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a90e2;
}

.mypage-layout {
    display: flex;
    gap: 20px;
}

.profile-section {
    width: 300px;
}

.profile-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.name-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.name-label {
    font-weight: bold;
    color: #666;
}

.name-value {
    color: #333;
    font-size: 18px;
}

.score {
    background-color: #4a90e2;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.point-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.point-label {
    font-weight: bold;
    color: #666;
}

.point-value {
    color: #4a90e2;
    font-size: 18px;
    font-weight: bold;
}

.point-detail-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.menu-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mypage-menu {
    list-style: none;
}

.mypage-menu li {
    margin-bottom: 10px;
}

.mypage-menu a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer; /* 클릭 가능 표시 */
}

/* ⭐ [추가] 선택된 메뉴 스타일 */
.mypage-menu a.active {
    background-color: #e6f0ff;
    color: #4a90e2;
    font-weight: bold;
}

.mypage-menu a:hover {
    background-color: #f0f0f0;
}

.content-section {
    flex: 1;
}

.content-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ⭐ [추가] 탭 컨텐츠 숨김/표시 처리 */
.tab-content {
    display: none; /* 기본 숨김 */
}
.tab-content.active {
    display: block; /* 활성화 시 표시 */
}

.settings-form {
    margin-top: 25px;
}

.settings-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.settings-form .form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.settings-form .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.settings-form .form-group input:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
}

.settings-form .form-group.full-width {
    grid-column: 1 / -1;
}

.form-helper-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}

.form-actions {
    margin-top: 25px;
    text-align: right;
}

.settings-form .btn {
    min-width: 140px;
}

/* ⭐ [추가] 비밀번호 구분선 */
.password-section-divider {
    grid-column: 1 / -1;
    margin: 20px 0;
    border-top: 1px solid #eee;
}

.activity-list {
    margin-top: 20px;
}

.activity-item {
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #4a90e2;
}

@media (max-width: 768px) {
    .mypage-layout {
        flex-direction: column;
    }
    
    .profile-section {
        width: 100%;
    }
}

.sub-title {
    font-weight: bold;
    color: #666;
    margin-bottom: 15px;
}

/* 포인트 관련 스타일 (유지) */
.point-value-title {
    display: inline-block;
    background-color: #e6f0ff;
    color: #4a90e2;
    font-size: 24px;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 8px;
    margin-left: 10px;
    vertical-align: middle;
}

.point-purchase-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
    justify-content: space-between;
}

.purchase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-basis: calc(25% - 7.5px); 
    border: 1px solid #ccc;
    background-color: #fff;
    padding: 20px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.purchase-item:hover {
    border-color: #4a90e2;
    background-color: #f0f8ff;
}

.purchase-item.selected {
    border: 2px solid #ff0000;
    background-color: #fff;
}

.rp-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.price-value {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee;
    width: 80%;
    text-align: center;
}

.purchase-item.selected .price-value {
    color: #ff0000;
}

.purchase-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.purchase-btn:hover {
    background-color: #357abd;
}

.point-history-row {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.history-amount.positive { color: #4a90e2; font-weight: bold; }
.history-amount.negative { color: #ff0000; font-weight: bold; }