/* ============================================================
   profile.css — 프로필 페이지 카드 레이아웃
   common.css + auth.css(폼 입력) 위에 카드·통계·위험영역만 추가.
   ============================================================ */

.profile-container {
    max-width: 560px;
    margin: 32px auto;
    padding: 0 16px;
}

.profile-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

/* ─────── 카드 공통 ─────── */
.profile-card {
    background: #fff;
    border: 1px solid #e6e7e8;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #2c313d;
    letter-spacing: -0.3px;
}

/* ─────── 성공 알림 (auth-error의 초록 변형) ─────── */
.profile-success {
    background: #ecf8ff;
    border: 1px solid #4f80ff;
    color: #3a6dec;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ─────── 풀이 통계 ─────── */
.stats-loading {
    color: #8ba4b3;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}
.stats-summary {
    font-size: 14px;
    color: #2c313d;
    margin-bottom: 16px;
    line-height: 1.5;
}
.stats-summary strong {
    font-size: 22px;
    color: #4f80ff;
    margin-right: 4px;
}
.stats-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: #f3f6fa;
    margin-bottom: 16px;
}
.stats-bar-fill {
    background: #4f80ff;
    transition: width 0.3s;
}
.stats-difficulty {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
.stats-diff-item {
    text-align: center;
    padding: 8px 4px;
    background: #f9f8f7;
    border-radius: 4px;
}
.stats-diff-stars {
    color: #ffb400;
    font-size: 12px;
    margin-bottom: 2px;
}
.stats-diff-stars .star-empty { color: #d6dee5; }
.stats-diff-count {
    font-size: 13px;
    font-weight: bold;
    color: #2c313d;
}
.stats-diff-total {
    font-size: 10px;
    color: #8ba4b3;
}

/* ─────── 카드 lead 텍스트 ─────── */
.card-lead {
    font-size: 12px;
    color: #8ba4b3;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ─────── 제출 코드 목록 ─────── */
.submissions-empty {
    text-align: center;
    color: #8ba4b3;
    font-size: 13px;
    padding: 16px 0;
}
/* <a> 태그 행: link 기본 스타일(밑줄·파란색)을 무력화하고 카드 행처럼 표시 */
.submission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f1f2;
    cursor: pointer;
    transition: background 0.12s;
    color: inherit;
    text-decoration: none;
}
.submission-row:last-child { border-bottom: none; }
.submission-row:hover { background: #f3f6fa; }
.submission-row:focus-visible {
    outline: 2px solid #4f80ff;
    outline-offset: -2px;
    background: #f3f6fa;
}
.submission-pid {
    font-weight: bold;
    color: #2c313d;
    font-size: 13px;
    margin-right: 8px;
    min-width: 40px;
}
.submission-title {
    flex: 1;
    color: #2c313d;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.submission-meta {
    color: #8ba4b3;
    font-size: 11px;
    margin-left: 8px;
    white-space: nowrap;
}

/* ─────── 풀이 데이터 초기화 버튼 ─────── */
/* 위험 영역(계정 삭제)보다 한 단계 약한 강조 — 오렌지 보더만, 배경은 평범 */
.reset-button {
    background: #fff;
    color: #c33020;
    border: 1px solid #fa5536;
}
.reset-button:hover {
    background: #fff8f7;
}
.reset-button:disabled {
    background: #f3f3f3;
    color: #b8c1cc;
    border-color: #d0d3d6;
    cursor: not-allowed;
}

/* ─────── 위험 영역 ─────── */
.profile-danger {
    border-color: #fa5536;
    background: #fff8f7;
}
.profile-danger .card-title {
    color: #c33020;
}
.danger-warning {
    background: #ffeeed;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    color: #c33020;
    margin-bottom: 16px;
    line-height: 1.5;
}
.danger-button {
    background: #fa5536;
}
.danger-button:hover {
    background: #d63f24;
}
.danger-button:disabled {
    background: #b8c1cc;
}

/* ─────── disabled input 스타일 보강 ─────── */
.field input:disabled {
    background: #f3f3f3;
    color: #586676;
    cursor: not-allowed;
}

/* ─────── 모바일 ─────── */
@media (max-width: 480px) {
    .profile-container {
        margin: 16px auto;
    }
    .profile-card {
        padding: 18px 14px;
    }
    .stats-difficulty {
        grid-template-columns: repeat(3, 1fr);
    }
}
