/* ===========================================
   Hall of Fame - 명예의 전당
   =========================================== */

/* ===================
   1. Page Wrapper
   =================== */
.ddtc-hof-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ===================
   2. Page Header
   =================== */
.ddtc-hof-header {
    text-align: center;
    padding: 3rem 0 2.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: ddtcHofFadeUp 0.8s ease forwards;
}

.ddtc-hof-header__trophy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    margin-bottom: 1.25rem;
    animation: ddtcHofTrophyGlow 3s ease-in-out infinite;
}

.ddtc-hof-header__trophy svg {
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
}

.ddtc-hof-header__title {
    font-family: 'Galmuri11', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.ddtc-hof-header__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}

.ddtc-hof-header__updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-primary);
}

.ddtc-hof-header__updated svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.ddtc-hof-header__updated-dot {
    opacity: 0.5;
}

/* ===================
   3. Section
   =================== */
.ddtc-hof-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    /* 스크롤 애니메이션 준비 */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ddtc-hof-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 섹션 진입 시차 */
.ddtc-hof-section.is-visible:nth-child(2) { transition-delay: 0s; }
.ddtc-hof-section.is-visible:nth-child(3) { transition-delay: 0.05s; }
.ddtc-hof-section.is-visible:nth-child(4) { transition-delay: 0.1s; }

/* 섹션 헤더 */
.ddtc-hof-section__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.ddtc-hof-section__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

/* 아이콘 색상 (부문별) */
.ddtc-hof-section__icon--crown  { background: rgba(255, 215, 0, 0.15); color: #FFD700; }
.ddtc-hof-section__icon--pencil { background: rgba(234, 126, 17, 0.15); color: #EA7E11; }
.ddtc-hof-section__icon--chat   { background: rgba(0, 168, 252, 0.15); color: #00a8fc; }
.ddtc-hof-section__icon--coin   { background: rgba(67, 181, 129, 0.15); color: #43b581; }
.ddtc-hof-section__icon--star   { background: rgba(250, 166, 26, 0.15); color: #faa61a; }
.ddtc-hof-section__icon--heart  { background: rgba(240, 71, 71, 0.15); color: #f04747; }
.ddtc-hof-section__icon--eye    { background: rgba(114, 137, 218, 0.15); color: #7289da; }

.ddtc-hof-section__title-group {
    flex: 1;
    min-width: 0;
}

.ddtc-hof-section__title {
    font-family: 'Galmuri11', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.ddtc-hof-section__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===================
   4. Podium (1~3위 시상대)
   =================== */
.ddtc-hof-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: end;
}

.ddtc-hof-podium__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 시상대 등장 애니메이션 준비 */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.ddtc-hof-section.is-visible .ddtc-hof-podium__item {
    animation: ddtcHofPodiumReveal 0.6s ease forwards;
}

/* 등장 순서: 2위 → 1위 → 3위 */
.ddtc-hof-section.is-visible .ddtc-hof-podium__item--silver { animation-delay: 0.1s; }
.ddtc-hof-section.is-visible .ddtc-hof-podium__item--gold   { animation-delay: 0.3s; }
.ddtc-hof-section.is-visible .ddtc-hof-podium__item--bronze { animation-delay: 0.2s; }

.ddtc-hof-podium__item:hover {
    transform: translateY(-4px);
}

/* 금메달 (1위) */
.ddtc-hof-podium__item--gold {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.03) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding-top: 2rem;
    padding-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.1);
}

.ddtc-hof-podium__item--gold::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 215, 0, 0.08) 50%, transparent 60%);
    background-size: 300% 300%;
    animation: ddtcHofShine 4s ease-in-out infinite;
    pointer-events: none;
}

/* 은메달 (2위) */
.ddtc-hof-podium__item--silver {
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.08) 0%, rgba(192, 192, 192, 0.02) 100%);
    border: 1px solid rgba(192, 192, 192, 0.2);
}

/* 동메달 (3위) */
.ddtc-hof-podium__item--bronze {
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.08) 0%, rgba(205, 127, 50, 0.02) 100%);
    border: 1px solid rgba(205, 127, 50, 0.2);
}

/* 빈 칸 */
.ddtc-hof-podium__item--empty {
    min-height: 160px;
    border: 1px dashed var(--border-primary);
    opacity: 0.3;
}

/* 메달 아이콘 */
.ddtc-hof-podium__medal {
    margin-bottom: 0.75rem;
}

.ddtc-hof-podium__item--gold .ddtc-hof-podium__medal svg {
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.5));
}

.ddtc-hof-podium__item--silver .ddtc-hof-podium__medal svg {
    filter: drop-shadow(0 2px 6px rgba(192, 192, 192, 0.4));
}

.ddtc-hof-podium__item--bronze .ddtc-hof-podium__medal svg {
    filter: drop-shadow(0 2px 6px rgba(205, 127, 50, 0.4));
}

/* 아바타 */
.ddtc-hof-podium__avatar-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}

.ddtc-hof-podium__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-primary);
    transition: transform 0.3s ease;
}

.ddtc-hof-podium__item--gold .ddtc-hof-podium__avatar {
    width: 88px;
    height: 88px;
    border-color: rgba(255, 215, 0, 0.5);
}

.ddtc-hof-podium__item--silver .ddtc-hof-podium__avatar {
    border-color: rgba(192, 192, 192, 0.4);
}

.ddtc-hof-podium__item--bronze .ddtc-hof-podium__avatar {
    border-color: rgba(205, 127, 50, 0.4);
}

.ddtc-hof-podium__item:hover .ddtc-hof-podium__avatar {
    transform: scale(1.08);
}

.ddtc-hof-podium__rank-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 2px solid var(--bg-secondary);
}

.ddtc-hof-podium__item--gold .ddtc-hof-podium__rank-badge {
    background: #DAA520;
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
}

.ddtc-hof-podium__item--silver .ddtc-hof-podium__rank-badge {
    background: #A0A0A0;
}

.ddtc-hof-podium__item--bronze .ddtc-hof-podium__rank-badge {
    background: #A0522D;
}

/* 이름 */
.ddtc-hof-podium__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ddtc-hof-podium__item--gold .ddtc-hof-podium__name {
    font-size: 1.0625rem;
}

/* 수치 */
.ddtc-hof-podium__stat {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.ddtc-hof-podium__item--gold .ddtc-hof-podium__stat {
    font-size: 1.25rem;
    color: #FFD700;
}

.ddtc-hof-podium__item--silver .ddtc-hof-podium__stat {
    color: #D0D0D0;
}

.ddtc-hof-podium__item--bronze .ddtc-hof-podium__stat {
    color: #CD7F32;
}

/* 보조 텍스트 (멤버십 기간 등) */
.ddtc-hof-podium__sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===================
   5. List (4~10위)
   =================== */
.ddtc-hof-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.ddtc-hof-list__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    /* 리스트 등장 애니메이션 */
    opacity: 0;
    transform: translateX(-10px);
}

.ddtc-hof-section.is-visible .ddtc-hof-list__item {
    animation: ddtcHofListReveal 0.4s ease forwards;
}

.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(1) { animation-delay: 0.5s; }
.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(2) { animation-delay: 0.55s; }
.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(3) { animation-delay: 0.6s; }
.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(4) { animation-delay: 0.65s; }
.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(5) { animation-delay: 0.7s; }
.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(6) { animation-delay: 0.75s; }
.ddtc-hof-section.is-visible .ddtc-hof-list__item:nth-child(7) { animation-delay: 0.8s; }

.ddtc-hof-list__item:hover {
    background: var(--bg-hover);
    border-color: var(--border-primary);
}

.ddtc-hof-list__rank {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.ddtc-hof-list__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-primary);
}

.ddtc-hof-list__name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.ddtc-hof-list__stat {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.ddtc-hof-list__sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===================
   6. 멤버십 배지 (HoF 전용)
   =================== */

/* 포디엄 이름 — 뱃지 + 닉네임 세로 배치 */
.ddtc-hof-podium__name {
    white-space: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    overflow: visible;
    text-overflow: clip;
}

.ddtc-hof-podium__item--gold .ddtc-hof-podium__name {
    white-space: normal;
}

/* 포디엄 배지 — level name + 기간 표시, 날짜만 숨김 */
.ddtc-hof-podium__name .ddtc-membership-badge {
    font-size: 10px;
    padding: 2px 8px 2px 6px;
}

.ddtc-hof-podium__name .ddtc-badge-checked {
    display: none;
}

/* 리스트 배지 — level name만 표시 */
.ddtc-hof-list__name .ddtc-membership-badge {
    padding: 1px 6px;
    font-size: 9px;
    border-radius: 4px;
    gap: 0;
    flex-shrink: 0;
}

.ddtc-hof-list__name .ddtc-badge-duration,
.ddtc-hof-list__name .ddtc-badge-checked {
    display: none;
}

/* yt_member stat — 작은 날짜 텍스트 */
.ddtc-hof-section--yt_member .ddtc-hof-podium__stat {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
}

.ddtc-hof-section--yt_member .ddtc-hof-podium__item--gold .ddtc-hof-podium__stat {
    font-size: 0.8125rem;
}

/* stat 내부 ddtc-badge-checked — 앞 점(·) 제거 */
.ddtc-hof-podium__stat .ddtc-badge-checked,
.ddtc-hof-list__stat .ddtc-badge-checked {
    opacity: 0.75;
    font-size: inherit;
    font-weight: 400;
}

.ddtc-hof-podium__stat .ddtc-badge-checked::before,
.ddtc-hof-list__stat .ddtc-badge-checked::before {
    display: none;
}

/* ===================
   7. Empty State
   =================== */
.ddtc-hof-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    gap: 0.75rem;
}

.ddtc-hof-empty svg {
    opacity: 0.4;
}

.ddtc-hof-empty p {
    margin: 0;
    font-size: 0.9375rem;
}

/* ===================
   7. Keyframe Animations
   =================== */
@keyframes ddtcHofFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ddtcHofTrophyGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.25);
    }
}

@keyframes ddtcHofShine {
    0% {
        background-position: 200% 200%;
    }
    50% {
        background-position: 0% 0%;
    }
    100% {
        background-position: -200% -200%;
    }
}

@keyframes ddtcHofPodiumReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    60% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ddtcHofListReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ddtcHofCountUp {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}

/* ===================
   8. Responsive
   =================== */

/* Tablet */
@media (max-width: 768px) {
    .ddtc-hof-wrapper {
        padding: 1.25rem 1rem 3rem;
    }

    .ddtc-hof-header {
        padding: 2rem 0 2rem;
    }

    .ddtc-hof-header__title {
        font-size: 1.625rem;
    }

    .ddtc-hof-header__trophy {
        width: 72px;
        height: 72px;
    }

    .ddtc-hof-header__trophy svg {
        width: 52px;
        height: 52px;
    }

    .ddtc-hof-header__updated {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        font-size: 0.75rem;
    }

    .ddtc-hof-section {
        padding: 1.5rem 1.25rem;
    }

    .ddtc-hof-section__title {
        font-size: 1.125rem;
    }

    .ddtc-hof-podium {
        gap: 0.625rem;
    }

    .ddtc-hof-podium__avatar {
        width: 56px;
        height: 56px;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__avatar {
        width: 68px;
        height: 68px;
    }

    .ddtc-hof-podium__name {
        font-size: 0.8125rem;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__name {
        font-size: 0.9375rem;
    }

    .ddtc-hof-podium__stat {
        font-size: 0.875rem;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__stat {
        font-size: 1.0625rem;
    }

    .ddtc-hof-podium__medal svg {
        width: 32px;
        height: 42px;
    }

    .ddtc-hof-list {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ddtc-hof-wrapper {
        padding: 1rem 0.75rem 2rem;
    }

    .ddtc-hof-header {
        padding: 1.5rem 0;
    }

    .ddtc-hof-header__title {
        font-size: 1.375rem;
    }

    .ddtc-hof-header__subtitle {
        font-size: 0.875rem;
    }

    .ddtc-hof-section {
        padding: 1.25rem 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }

    .ddtc-hof-section__header {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .ddtc-hof-section__icon {
        width: 40px;
        height: 40px;
    }

    .ddtc-hof-section__icon svg {
        width: 22px;
        height: 22px;
    }

    .ddtc-hof-section__title {
        font-size: 1rem;
    }

    .ddtc-hof-section__desc {
        font-size: 0.8125rem;
    }

    /* 모바일에서 시상대를 세로 스택 */
    .ddtc-hof-podium {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* 모바일에서는 1위 → 2위 → 3위 순서로 재배열 */
    .ddtc-hof-podium__item--gold   { order: 1; }
    .ddtc-hof-podium__item--silver { order: 2; }
    .ddtc-hof-podium__item--bronze { order: 3; }

    .ddtc-hof-podium__item {
        flex-direction: row;
        padding: 0.875rem 1rem;
        gap: 0.875rem;
        text-align: left;
    }

    .ddtc-hof-podium__item--gold {
        padding: 1rem 1.125rem;
    }

    .ddtc-hof-podium__medal {
        margin-bottom: 0;
    }

    .ddtc-hof-podium__medal svg {
        width: 28px;
        height: 36px;
    }

    .ddtc-hof-podium__avatar-wrap {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .ddtc-hof-podium__avatar {
        width: 44px;
        height: 44px;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__avatar {
        width: 52px;
        height: 52px;
    }

    .ddtc-hof-podium__rank-badge {
        width: 20px;
        height: 20px;
        font-size: 0.6875rem;
        bottom: -2px;
        right: -2px;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__rank-badge {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .ddtc-hof-podium__name {
        font-size: 0.875rem;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__name {
        font-size: 0.9375rem;
    }

    .ddtc-hof-podium__stat {
        font-size: 0.875rem;
        margin-left: auto;
    }

    .ddtc-hof-podium__item--gold .ddtc-hof-podium__stat {
        font-size: 1rem;
    }

    .ddtc-hof-podium__sub {
        display: none;
    }

    /* yt_member 모바일: stat을 이름 아래로 */
    .ddtc-hof-section--yt_member .ddtc-hof-podium__item {
        display: grid;
        grid-template-columns: auto auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 0.875rem;
        row-gap: 2px;
        align-items: center;
    }

    .ddtc-hof-section--yt_member .ddtc-hof-podium__medal {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .ddtc-hof-section--yt_member .ddtc-hof-podium__avatar-wrap {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    .ddtc-hof-section--yt_member .ddtc-hof-podium__name {
        grid-column: 3;
        grid-row: 1;
        align-items: flex-start;
        gap: 2px;
    }

    .ddtc-hof-section--yt_member .ddtc-hof-podium__stat {
        grid-column: 3;
        grid-row: 2;
        margin-left: 0;
        font-size: 0.75rem;
    }

    .ddtc-hof-list__item {
        padding: 0.5rem 0.75rem;
        gap: 0.625rem;
    }

    .ddtc-hof-list__avatar {
        width: 32px;
        height: 32px;
    }

    .ddtc-hof-list__name {
        font-size: 0.8125rem;
    }

    .ddtc-hof-list__stat {
        font-size: 0.8125rem;
    }

    .ddtc-hof-list__sub {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .ddtc-hof-wrapper {
        padding: 0.75rem 0.5rem 2rem;
    }

    .ddtc-hof-section {
        padding: 1rem 0.75rem;
    }
}

/* ===================
   9. Accessibility: Reduced Motion
   =================== */
@media (prefers-reduced-motion: reduce) {
    .ddtc-hof-header,
    .ddtc-hof-section,
    .ddtc-hof-podium__item,
    .ddtc-hof-list__item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .ddtc-hof-podium__item--gold::before {
        animation: none;
    }

    .ddtc-hof-header__trophy {
        animation: none;
    }
}
