/* My Page styles */

.mypage-main {
    padding: 110px 0 4rem;
    min-height: 70vh;
}

/* 로그인 게이트 */
.mypage-gate {
    max-width: 460px;
    margin: 8vh auto;
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
}

.gate-emoji {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.mypage-gate h1 {
    color: var(--secondary-color);
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.mypage-gate p {
    margin-bottom: 2rem;
    color: var(--text-soft);
}

/* 헤더 행 */
.mypage-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.mypage-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

.mypage-user h1 {
    color: var(--secondary-color);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.user-title-line {
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.92rem;
}

.btn-outline {
    background: var(--surface);
    color: var(--secondary-color);
    box-shadow: none;
    border: 2px solid rgba(78, 52, 46, 0.2);
}

.btn-outline:hover {
    box-shadow: var(--shadow-sm);
}

/* 잔액 히어로 */
.balance-hero {
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.45) 0, transparent 35%),
        var(--brand-gradient);
    border-radius: var(--radius-lg);
    padding: 2rem 2.2rem;
    color: var(--secondary-color);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

.balance-label {
    font-weight: 700;
    opacity: 0.8;
    font-size: 0.95rem;
}

.balance-value {
    font-size: clamp(2.6rem, 7vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.balance-sub {
    font-weight: 600;
    opacity: 0.8;
    font-size: 0.92rem;
    margin-top: 0.3rem;
}

.level-bar-wrap {
    margin-top: 1.2rem;
}

.level-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(78, 52, 46, 0.18);
    overflow: hidden;
}

.level-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--secondary-color);
    transition: width 0.8s ease;
}

.level-line {
    margin-top: 0.4rem;
    font-weight: 700;
    font-size: 0.88rem;
    opacity: 0.85;
}

/* 스탯 타일 */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tile {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-color);
}

.tile-label {
    font-size: 0.82rem;
    color: var(--text-soft);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.tile-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

/* 최근 내역 */
.history-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.history-card h2 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.history-list {
    list-style: none;
}

.history-list li {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed rgba(141, 110, 99, 0.2);
}

.history-list li:last-child {
    border-bottom: none;
}

.history-amount {
    font-weight: 800;
    min-width: 84px;
    text-align: right;
}

.history-list li.earn .history-amount {
    color: var(--accent-color);
}

.history-list li.spend .history-amount {
    color: var(--text-soft);
}

.history-meta {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.history-empty {
    color: var(--text-soft);
    text-align: center;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .mypage-main {
        padding-top: 90px;
    }
}
