/**
 * 마이랭킹 2026 - 검색 스타일
 * Google 검색창 스타일 기반
 */

/* ===== Home Page - Centered Search ===== */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 20px;
    position: relative;
    overflow: visible; /* autocomplete가 컨테이너 밖으로 표시되도록 */
}

/* 배경 그라데이션 - 정적 (애니메이션 제거로 레이아웃 안정화) */
.home-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(26, 115, 232, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(52, 168, 83, 0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.home-logo {
    margin-bottom: 40px;
    position: relative;
}

.home-logo img {
    height: 80px;
}

.home-logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #1a73e8 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    animation: gradientText 3s ease infinite;
    cursor: default;
    transition: transform 0.3s ease;
}

.home-logo h1:hover {
    transform: scale(1.05);
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 로고 아래 반짝임 효과 - 기존 ::after 제거하고 별도 요소로 대체 */

/* 로고 아래 반짝임 효과 - 간소화 */
.home-logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(0, 63, 209, 1) 44%, rgba(222, 16, 16, 1) 56%, rgba(255, 255, 255, 1) 100%);
    opacity: 0.5;
}

/* ===== Search Box ===== */
.search-container {
    position: relative;
    z-index: 500; /* autocomplete가 다른 섹션들 위로 표시되도록 */
    width: 100%;
    max-width: 584px;
    margin-bottom: 30px;
    perspective: 1000px;
}

/* Sticky Search Bar */
.search-container.sticky {
    position: fixed;
    /* top: 50px; */
    top: 3vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 0px;
    border-radius: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Placeholder for sticky search bar */
.search-container-placeholder {
    width: 100%;
    max-width: 584px;
    visibility: hidden;
}

.search-box {
    position: relative;
    z-index: 200; /* autocomplete가 quick-links 위로 표시되도록 */
    display: flex; flex-wrap: wrap;
    align-items: center;
    width: 100%; gap: 10px;
    background: #fff;
    border: 2px solid #dfe1e5;
    border-radius: 24px;
    padding: 10px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box:hover {
    box-shadow: 0 4px 20px rgba(32,33,36,0.15);
    border-color: #c6c6c6;
    transform: translateY(-2px);
}

.search-box:focus-within {
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.2);
    border-color: #1a73e8;
    transform: translateY(-3px) scale(1.01);
}

/* 검색창 글로우 효과 - 포커스 시에만 */
.search-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-radius: 26px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.search-box:focus-within::before {
    opacity: 0.15;
}

.search-box .search-icon {
    color: #9aa0a6;
    font-size: 20px;
}

.search-box input[type="text"] {
    flex: 1;
    width: 80%; 
    font-size: 16px;
    color: #202124;
    background: transparent;
}

.search-box input[type="text"]::placeholder {
    color: #9aa0a6;
}

.search-box .clear-btn {
    display: none;
    padding: 8px;
    color: #70757a;
    font-size: 20px;
}

.search-box .clear-btn:hover {
    color: #202124;
}

.search-box.has-value .clear-btn {
    display: flex;
    padding: 0px; margin: 0px;
}

.search-box .search-submit {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #1a73e8;
    font-size: 24px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.search-box .search-submit:hover {
    background-color: #e8f0fe;
}

/* ===== Autocomplete Dropdown ===== */
.autocomplete-container {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dfe1e5;
    border-top: none;
    border-radius: 24px 24px;
    box-shadow: 0 4px 6px rgba(32,33,36,0.28);
    display: none;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.autocomplete-container.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.1s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f1f3f4;
}

.autocomplete-item .item-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    color: #70757a;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autocomplete-item .item-text {
    flex: 1;
    font-size: 14px;
    color: #202124;
}

.autocomplete-item .item-type {
    font-size: 12px;
    color: #70757a;
    margin-left: 8px;
}

/* ===== Search Buttons ===== */
.search-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.search-buttons .btn {
    background-color: #f8f9fa;
    color: #3c4043;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
}

.search-buttons .btn:hover {
    border: 1px solid #dadce0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* ===== Quick Links ===== */
.quick-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center; justify-content: center;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
    width: 110px; height: 110px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}


/* 반짝임 효과 - 호버 시에만 */
.quick-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );
    transition: left 0.5s ease;
}

.quick-link:hover::after {
    left: 100%;
}

.quick-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.15);
    border-color: #1a73e8;
    background: #f8fbff;
}

.quick-link:active {
    transform: translateY(-3px);
}

.quick-link .link-icon {
    font-size: 28px;
    color: #1a73e8;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.quick-link:hover .link-icon {
    transform: scale(1.1);
}

.quick-link .link-text {
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.quick-link:hover .link-text {
    color: #1a73e8;
}

@media (max-width: 480px) {
    .quick-links {
        width: 80%;
        gap: 10px;
    }
    .quick-link {
        padding: 7px;
        border-radius: 14px;
        width: 60px; height: 60px;
    }
    .quick-link .link-icon {
        font-size: 1.5rem;
        color: lightgray;
    }
    .quick-link .link-text {
        font-size: 0.7rem;
        font-weight: 300;
    }
}

/* ===== Result Page Search Bar ===== */
.result-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #dfe1e5;
    padding: 12px 0;
}

/* 자동완성이 헤더 밖으로 나올 수 있도록 */
.result-search-box .autocomplete-container {
    z-index: 1000;
}

.result-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.result-logo {
    flex-shrink: 0;
}

.result-logo img {
    height: 32px;
}

.result-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a73e8;
}

.result-search-box {
    flex: 1;
    min-width: 0;
}

.result-search-box .search-box {
    border-radius: 22px;
}

.result-search-box .search-box input[type="text"] {
    font-size: 16px; /* iOS 자동줌 방지 */
}

/* ===== Search Info Bar (결과 건수 + 정렬) ===== */
.search-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 8px;
}

.search-info-bar .search-info {
    padding: 0;
}

.search-info-bar .sort-dropdown .dropdown-trigger {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 6px 14px;
}

.search-info-bar .sort-dropdown .dropdown-trigger:hover {
    background: #e8f0fe;
}

.search-info-bar .sort-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

/* ===== Profile Banner (닉네임 검색 시 표시) ===== */
.profile-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.profile-banner-content .material-symbols-outlined {
    font-size: 24px;
    opacity: 0.9;
}

.profile-banner .btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    gap: 4px;
}

.profile-banner .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.profile-banner .btn .material-symbols-outlined {
    font-size: 18px;
}

@media (max-width: 480px) {
    .profile-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .profile-banner-content {
        flex-direction: column;
        gap: 4px;
    }

    .profile-banner .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Search Filters ===== */
.search-filters {
    display: flex;
    flex-wrap: wrap; justify-content: space-between;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid #ebebeb;
    position: relative;
    z-index: 90;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: #3c4043;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-chip:hover {
    background-color: #f1f3f4;
}

.filter-chip.active {
    background-color: #e8f0fe;
    border-color: #d2e3fc;
    color: #1967d2;
}

.filter-chip .chip-icon {
    font-size: 14px;
}

.filter-save-btn {
    color: #1967d2;
    border-color: #d2e3fc;
    background: #e8f0fe;
}
.filter-save-btn:hover {
    background: #d2e3fc;
}
.filter-clear-saved-btn {
    color: #94a3b8;
    border-color: #e2e8f0;
}
.filter-clear-saved-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* 필터 저장 확인 모달 */
.filter-save-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.filter-save-modal.active {
    display: flex;
}
.filter-save-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.filter-save-content {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    animation: filterModalIn 0.2s ease;
}
@keyframes filterModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.filter-save-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px 12px;
}
.filter-save-header .material-symbols-outlined {
    font-size: 20px;
    color: #1967d2;
}
.filter-save-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}
.filter-save-body {
    padding: 0 20px 16px;
}
.filter-save-desc {
    margin: 0 0 12px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}
.filter-save-list {
    display: block;
    margin: 0;
    padding: 0;
}
.filter-save-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1;
}
.filter-save-item .filter-label {
    flex-shrink: 0;
    width: 44px;
    color: #9ca3af;
    font-size: 12px;
    text-align: right;
}
.filter-save-item .filter-value {
    color: #1f2937;
    font-weight: 500;
    background: #f0f4ff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 13px;
}
.filter-save-footer {
    display: flex;
    border-top: 1px solid #f0f0f0;
}
.filter-modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.filter-modal-btn.cancel {
    color: #6b7280;
    border-radius: 0 0 0 14px;
}
.filter-modal-btn.cancel:hover {
    background: #f9fafb;
}
.filter-modal-btn.confirm {
    color: #1967d2;
    border-left: 1px solid #f0f0f0;
    border-radius: 0 0 14px 0;
}
.filter-modal-btn.confirm:hover {
    background: #eff6ff;
}

.filter-chip .chip-clear {
    font-size: 12px;
    margin-left: 2px;
}

/* ===== Dropdown Filters ===== */
.dropdown-filter {
    position: relative;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 10px;
    font-size: 12px;
    color: #3c4043;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-trigger .material-symbols-outlined {
    font-size: 16px;
}

.dropdown-trigger:hover {
    background-color: #f1f3f4;
}

.dropdown-trigger.has-value {
    background-color: #e8f0fe;
    border-color: #d2e3fc;
    color: #1967d2;
}

/* 기본값 적용 뱃지 */
.default-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 5px;
    background-color: #fef7e0;
    color: #b06000;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 500;
}

/* AI 오타 교정 알림 */
.ai-correction-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: 14px;
    color: #2e7d32;
}

.ai-correction-notice .material-symbols-outlined {
    font-size: 20px;
    color: #43a047;
}

.ai-correction-notice strong {
    color: #1b5e20;
    font-weight: 600;
}

.ai-correction-notice .correction-detail {
    color: #558b2f;
    font-size: 12px;
    margin-left: 4px;
}

.ai-correction-notice .original-search {
    margin-left: auto;
    color: #666;
    font-size: 12px;
    text-decoration: underline;
    white-space: nowrap;
}

.ai-correction-notice .original-search:hover {
    color: #1a73e8;
}

@media (max-width: 600px) {
    .ai-correction-notice {
        flex-wrap: wrap;
        font-size: 13px;
    }

    .ai-correction-notice .original-search {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        text-align: right;
    }
}

/* 한/영 자판 변환 알림 */
.keyboard-conversion-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #e3f2fd 0%, #e8eaf6 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    font-size: 14px;
    color: #1565c0;
}

.keyboard-conversion-notice .material-symbols-outlined {
    font-size: 20px;
    color: #1976d2;
}

.keyboard-conversion-notice strong {
    color: #0d47a1;
    font-weight: 600;
}

@media (max-width: 600px) {
    .keyboard-conversion-notice {
        font-size: 13px;
    }
}

/* 닉네임 검색 알림 */
.nickname-match-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffcc80;
    border-radius: 8px;
    font-size: 14px;
    color: #e65100;
}

.nickname-match-notice .material-symbols-outlined {
    font-size: 20px;
    color: #f57c00;
}

.nickname-match-notice strong {
    color: #bf360c;
    font-weight: 600;
}

@media (max-width: 600px) {
    .nickname-match-notice {
        font-size: 13px;
    }
}

/* ===== 티어(등급) 카드 ===== */
.swimmer-tier-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.tier-no-result-msg {
    color: #94a3b8;
    font-size: 12px;
}

.tier-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
    font-size: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.tier-card-header:hover {
    background: #f9fafb;
}

.swimmer-tier-card.expanded .tier-card-header {
    border-bottom: 1px solid #e5e7eb;
}

.tier-card-header .material-symbols-outlined {
    font-size: 20px;
    color: #f59e0b;
}

.tier-card-header strong {
    flex: 1;
}

.tier-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #f9fafb;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-help-btn:hover {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}

/* 티어 아이콘 미리보기 (접힌 상태) */
.tier-icons-preview {
    display: flex;
    gap: 6px;
    margin-left: 8px;
}

.tier-icon-preview {
    font-size: 18px;
    cursor: pointer;
}

.tier-toggle-icon {
    color: #9ca3af;
    font-size: 20px;
    margin-left: auto;
    transition: transform 0.3s;
}

/* 티어 카드 본문 (기본: 숨김) */
.swimmer-tier-card .tier-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}

/* 펼침 상태 */
.swimmer-tier-card.expanded .tier-card-body {
    max-height: 500px;
    padding: 12px 16px 16px;
}

.swimmer-tier-card.expanded .tier-icons-preview {
    display: none;
}

.swimmer-tier-card.expanded .tier-toggle-icon {
    transform: rotate(180deg);
}

.tier-cutoff-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: auto;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tier-cutoff-btn:hover {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}


.tier-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    transition: transform 0.2s, background 0.2s;
}

.tier-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.tier-icon {
    font-size: 20px;
    min-width: 28px;
    text-align: center;
}

.tier-style {
    color: #374151;
    font-weight: 500;
    min-width: 50px;
}

.tier-name {
    font-weight: 600;
    min-width: 80px;
}

.tier-record {
    color: #6b7280;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
}

.tier-percent {
    color: #9ca3af;
    font-size: 12px;
}

/* 티어별 색상 */
.tier-item.tier-god .tier-name { color: #dc2626; }
.tier-item.tier-diamond .tier-name { color: #7c3aed; }
.tier-item.tier-platinum .tier-name { color: #0891b2; }
.tier-item.tier-gold .tier-name { color: #d97706; }
.tier-item.tier-silver .tier-name { color: #64748b; }
.tier-item.tier-bronze .tier-name { color: #b45309; }

/* 티어 뱃지 (인라인용) */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: var(--tier-color, #374151);
}

/* 티어 설명 모달 */
.tier-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tier-info-modal.active {
    display: flex;
}

.tier-info-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.tier-info-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: tierModalIn 0.3s ease;
}

@keyframes tierModalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.tier-info-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tier-info-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1f2937;
}

.tier-info-context {
    flex: 1 0 100%;
    order: 3;
    font-size: 12px;
    color: #6b7280;
    padding-top: 4px;
    margin-top: 4px;
    border-top: 1px dashed #e5e7eb;
}

.tier-info-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 20px;
    transition: background 0.2s;
}

.tier-info-close:hover {
    background: #e5e7eb;
}

.tier-info-list {
    padding: 12px 20px 20px;
}

.tier-info-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tier-info-item:last-child {
    border-bottom: none;
}

.tier-info-icon {
    font-size: 24px;
    min-width: 32px;
    text-align: center;
}

.tier-info-detail {
    flex: 1;
}

.tier-info-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.tier-info-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.tier-info-desc strong {
    color: #374151;
    font-weight: 600;
}

.tier-info-item.tier-god .tier-info-name { color: #dc2626; }
.tier-info-item.tier-diamond .tier-info-name { color: #7c3aed; }
.tier-info-item.tier-platinum .tier-info-name { color: #0891b2; }
.tier-info-item.tier-gold .tier-info-name { color: #d97706; }
.tier-info-item.tier-silver .tier-info-name { color: #64748b; }
.tier-info-item.tier-bronze .tier-info-name { color: #b45309; }

/* 현재 티어 하이라이트 */
.tier-info-item.current {
    background: #f0f9ff;
    border-radius: 8px;
    border-color: #bae6fd;
    position: relative;
}
.tier-info-item.current::after {
    content: '현재';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #fff;
    background: #0ea5e9;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 승급 프로그레스 섹션 */
.tier-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 12px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tier-progress-target,
.tier-progress-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    width: 100%;
    max-width: 260px;
    justify-content: center;
}

.tier-progress-target {
    background: #fff;
    border: 2px dashed #cbd5e1;
}
.tier-progress-current {
    background: #fff;
    border: 2px solid currentColor;
}

/* 현재 티어 펄스 - 티어별 색상 */
.tier-progress-current.tier-god      { color: #dc2626; animation: tierPulse 2s ease-in-out infinite; --tier-pulse: rgba(220, 38, 38, 0.25); }
.tier-progress-current.tier-diamond  { color: #7c3aed; animation: tierPulse 2s ease-in-out infinite; --tier-pulse: rgba(124, 58, 237, 0.25); }
.tier-progress-current.tier-platinum { color: #0891b2; animation: tierPulse 2s ease-in-out infinite; --tier-pulse: rgba(8, 145, 178, 0.25); }
.tier-progress-current.tier-gold     { color: #d97706; animation: tierPulse 2s ease-in-out infinite; --tier-pulse: rgba(217, 119, 6, 0.25); }
.tier-progress-current.tier-silver   { color: #64748b; animation: tierPulse 2s ease-in-out infinite; --tier-pulse: rgba(100, 116, 139, 0.25); }
.tier-progress-current.tier-bronze   { color: #b45309; animation: tierPulse 2s ease-in-out infinite; --tier-pulse: rgba(180, 83, 9, 0.25); }

@keyframes tierPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--tier-pulse); }
    50%      { box-shadow: 0 0 0 6px transparent, 0 0 12px var(--tier-pulse); }
}

.tier-progress-icon {
    font-size: 22px;
}
.tier-progress-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}
.tier-progress-current .tier-progress-name {
    color: inherit;
}
.tier-progress-cutoff,
.tier-progress-record {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
}

/* 화살표 영역 */
.tier-progress-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 0;
    gap: 2px;
}

.arrow-chevrons {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 20px;
    overflow: hidden;
    position: relative;
}
.arrow-chevrons span {
    display: block;
    width: 10px;
    height: 10px;
    border-left: 2.5px solid #0ea5e9;
    border-top: 2.5px solid #0ea5e9;
    transform: rotate(45deg);
    animation: chevronUp 1.8s ease-in-out infinite;
    opacity: 0;
}
.arrow-chevrons span:nth-child(1) { animation-delay: 0s; }
.arrow-chevrons span:nth-child(2) { animation-delay: 0.25s; }
.arrow-chevrons span:nth-child(3) { animation-delay: 0.5s; }

.arrow-diff {
    font-size: 13px;
    font-weight: 800;
    color: #0ea5e9;
    padding: 4px 12px;
    background: #e0f2fe;
    border-radius: 20px;
    white-space: nowrap;
}

@keyframes chevronUp {
    0%   { opacity: 0; transform: rotate(45deg) translateY(4px); }
    30%  { opacity: 1; transform: rotate(45deg) translateY(0); }
    70%  { opacity: 1; transform: rotate(45deg) translateY(-4px); }
    100% { opacity: 0; transform: rotate(45deg) translateY(-8px); }
}

/* 최고 등급 달성 */
.tier-progress-max {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 800;
    color: #dc2626;
    padding: 8px 0;
    text-align: center;
}
.tier-progress-max .trophy-icon {
    font-size: 32px;
    animation: trophyBounce 2s ease-in-out infinite;
}
@keyframes trophyBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@media (max-width: 600px) {
    .swimmer-tier-card .tier-card-header {
        padding: 10px 12px;
    }

    .swimmer-tier-card.expanded .tier-card-body {
        padding: 10px 12px 12px;
    }

    .tier-item {
        padding: 8px 10px;
        font-size: 13px;
    }

    .tier-style {
        min-width: 40px;
    }

    .tier-name {
        min-width: 65px;
    }

    .tier-percent {
        display: none;
    }

    .tier-info-content {
        max-width: 100%;
        margin: 0 10px;
    }
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100px;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
}

.dropdown-filter:last-of-type .dropdown-menu {
    left: -45px;
}

.dropdown-menu.active {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 13px;
    color: #3c4043;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f1f3f4;
}

.dropdown-item.selected {
    background-color: #e8f0fe;
    color: #1967d2;
}

/* ===== Search Info ===== */
.search-info {
    padding: 12px 0;
    font-size: 14px;
    color: #70757a;
}

.search-info strong {
    color: #202124;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .home-container {
        min-height: 50vh;
        padding: 16px;
    }

    .home-logo h1 {
        font-size: 2.5rem;
    }

    .search-container {
        max-width: 100%;
    }
    /*
    .quick-links {
        flex-direction: column;
        align-items: center;
    }


    .quick-link {
        width: 100%;
        max-width: 280px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
    }
    */

    .quick-link .link-icon {
        margin-bottom: 0;
    }

    .result-header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
    }

    .result-logo {
        flex-shrink: 0;
    }

    .result-logo h2 {
        font-size: 1.2rem;
    }

    .result-search-box {
        flex: 1;
        min-width: 0;
    }

    .search-filters {
        gap: 5px;
        padding: 8px 0;
    }

    .filter-chip {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 12px;
    }

    .dropdown-trigger {
        padding: 4px 8px;
        font-size: 11px;
    }

    .dropdown-trigger .material-symbols-outlined {
        font-size: 14px;
    }

    /* 모바일 정렬바 */
    .search-info-bar {
        flex-direction: row;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .home-logo h1 {
        font-size: 2rem;
    }

    .search-box input[type="text"] {
        font-size: 16px; /* iOS 자동줌 방지 - 16px 미만 시 줌 발생 */
        width: 70%;
    }

    .search-buttons {
        flex-direction: column;
    }

    .search-buttons .btn {
        width: 100%;
    }

    .result-logo h2 {
        font-size: 1rem;
    }

    /* 480px 이하 필터 스타일 */
    .search-filters {
        gap: 4px;
        padding: 6px 0;
    }

    .filter-chip {
        padding: 3px 6px;
        font-size: 10px;
        gap: 2px;
        border-radius: 10px;
    }

    .dropdown-trigger {
        padding: 3px 6px;
        font-size: 10px;
        gap: 1px;
    }

    .dropdown-trigger .material-symbols-outlined {
        font-size: 12px;
    }

    .dropdown-item {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* ===== Team Filter (Tabbed: Include/Exclude) ===== */
.team-filter-container,
.team-exclusion-filter {
    margin-top: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8eaed;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 활성화 시 하이라이트 */
.team-filter-container.has-filter {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}

.team-exclusion-filter.has-excluded {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
}

.team-filter-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.team-filter-header:hover {
    background-color: rgba(0,0,0,0.03);
}

.team-filter-header .material-symbols-outlined {
    font-size: 18px;
    color: #5f6368;
}

.team-filter-header small {
    color: #9aa0a6;
    font-weight: 400;
}

.team-filter-header .filter-count {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

.team-filter-header .filter-count.exclude {
    color: #dc2626;
    background: #fee2e2;
}

.team-filter-header .filter-count.include {
    color: #16a34a;
    background: #dcfce7;
}

.team-filter-header .excluded-count {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    background: #fee2e2;
    border-radius: 12px;
}

.team-filter-header .toggle-icon {
    margin-left: 8px;
    font-size: 20px;
    color: #9aa0a6;
    transition: transform 0.3s ease;
}

/* 토글 열렸을 때 아이콘 회전 */
.team-filter-container.expanded .team-filter-header .toggle-icon,
.team-exclusion-filter.expanded .team-filter-header .toggle-icon {
    transform: rotate(180deg);
}

/* 토글 컨텐츠 (기본 닫힘) */
.team-filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* 토글 열렸을 때 */
.team-filter-container.expanded .team-filter-content,
.team-exclusion-filter.expanded .team-filter-content {
    max-height: 350px;
    overflow-y: auto;
    padding: 0 16px 16px;
}

/* 페이지 로드 시 애니메이션 없이 바로 열기 */
.team-filter-container.no-transition .team-filter-content,
.team-filter-container.no-transition .team-filter-header .toggle-icon,
.team-exclusion-filter.no-transition .team-filter-content,
.team-exclusion-filter.no-transition .team-filter-header .toggle-icon {
    transition: none;
}

/* 탭 헤더 */
.team-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    background: #e8eaed;
    border-radius: 8px;
}

.team-filter-tabs .tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-filter-tabs .tab-btn .material-symbols-outlined {
    font-size: 16px;
}

.team-filter-tabs .tab-btn .tab-count {
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.team-filter-tabs .tab-btn:hover {
    color: #3c4043;
    background: rgba(255,255,255,0.5);
}

.team-filter-tabs .tab-btn.active {
    color: #1a73e8;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.team-filter-tabs .tab-btn.active[data-mode="include"] {
    color: #16a34a;
}

.team-filter-tabs .tab-btn.active[data-mode="include"] .tab-count {
    background: #dcfce7;
    color: #16a34a;
}

.team-filter-tabs .tab-btn.active[data-mode="exclude"] {
    color: #dc2626;
}

.team-filter-tabs .tab-btn.active[data-mode="exclude"] .tab-count {
    background: #fee2e2;
    color: #dc2626;
}

/* 탭 패널 */
.team-filter-panel {
    display: none;
}

.team-filter-panel.active {
    display: block;
}

.team-filter-panel .panel-desc {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #5f6368;
}

.team-filter-panel .panel-desc .material-symbols-outlined {
    font-size: 14px;
}

.team-filter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.team-chip {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    font-size: 12px;
    color: #3c4043;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-align: left;
}

.team-chip .chip-status {
    font-size: 16px;
    color: #9aa0a6;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.team-chip .chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-chip .chip-count {
    color: #9aa0a6;
    font-size: 11px;
    flex-shrink: 0;
}

/* 제외할 팀 탭에서의 호버 */
[data-panel="exclude"] .team-chip:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

[data-panel="exclude"] .team-chip:hover .chip-status {
    opacity: 1;
    color: #dc2626;
}

/* 선택할 팀 탭에서의 호버 */
[data-panel="include"] .team-chip:hover {
    background-color: #dcfce7;
    border-color: #86efac;
}

[data-panel="include"] .team-chip:hover .chip-status {
    opacity: 1;
    color: #16a34a;
}

/* 제외된 상태 */
.team-chip.excluded {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.team-chip.excluded .chip-status {
    opacity: 1;
    color: #dc2626;
}

.team-chip.excluded .chip-name {
    text-decoration: line-through;
}

.team-chip.excluded:hover {
    background-color: #dcfce7;
    border-color: #86efac;
}

.team-chip.excluded:hover .chip-status {
    color: #16a34a;
}

.team-chip.excluded:hover .chip-name {
    text-decoration: none;
    color: #16a34a;
}

/* 선택된 상태 */
.team-chip.included {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #16a34a;
}

.team-chip.included .chip-status {
    opacity: 1;
    color: #16a34a;
}

.team-chip.included:hover {
    background-color: #fef2f2;
    border-color: #fca5a5;
}

.team-chip.included:hover .chip-status {
    color: #dc2626;
}

/* 필터 정보 */
.filter-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.filter-info .material-symbols-outlined {
    font-size: 16px;
}

.filter-info.exclude {
    background: #fef2f2;
    color: #991b1b;
}

.filter-info.include {
    background: #dcfce7;
    color: #166534;
}

.filter-info .clear-filter {
    margin-left: auto;
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
}

.filter-info .clear-filter:hover {
    color: #1557b0;
}

/* 이전 버전 호환 */
.excluded-teams-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    font-size: 12px;
    color: #991b1b;
}

.excluded-teams-info .material-symbols-outlined {
    font-size: 16px;
}

.excluded-teams-info .clear-exclusion {
    margin-left: auto;
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
}

.excluded-teams-info .clear-exclusion:hover {
    color: #1557b0;
}

/* 팀 필터 설정 저장 버튼 */
.team-filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8eaed;
}

.btn-save-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #1a73e8;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-save-filter:hover {
    background: #1557b0;
}

.btn-save-filter .material-symbols-outlined {
    font-size: 16px;
}

.btn-clear-saved {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-clear-saved:hover {
    background: #e8eaed;
}

.btn-clear-saved .material-symbols-outlined {
    font-size: 16px;
}

/* 저장된 필터 정보 */
.saved-filter-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 4px 8px;
    font-size: 11px;
    color: #1e40af;
    background: #dbeafe;
    border-radius: 4px;
    cursor: pointer;
}

.saved-filter-info:hover {
    background: #bfdbfe;
}

.saved-filter-info .material-symbols-outlined {
    font-size: 14px;
}

/* 저장 정보 툴팁 */
.saved-filter-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 14px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}

.saved-filter-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.saved-filter-tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* 토스트 메시지 */
.team-filter-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #323232;
    color: #fff;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}

.team-filter-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.team-filter-toast .material-symbols-outlined {
    font-size: 20px;
    color: #4ade80;
}

/* Team filter responsive */
@media (max-width: 768px) {
    .team-filter-container,
    .team-exclusion-filter {
        margin-top: 8px;
    }

    .team-filter-header {
        padding: 10px 12px;
    }

    .team-filter-tabs {
        margin-bottom: 10px;
    }

    .team-filter-tabs .tab-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .team-filter-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 6px;
    }

    .team-filter-container.expanded .team-filter-content,
    .team-exclusion-filter.expanded .team-filter-content {
        padding: 0 12px 12px;
    }

    .team-chip {
        font-size: 11px;
        padding: 6px 8px;
        grid-template-columns: 16px 1fr auto;
    }

    .team-chip .chip-status {
        font-size: 14px;
    }

    .team-filter-actions {
        margin-top: 10px;
        padding-top: 10px;
    }

    .btn-save-filter,
    .btn-clear-saved {
        padding: 5px 10px;
        font-size: 11px;
    }

    .team-filter-toast {
        bottom: 70px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .saved-filter-info {
        font-size: 10px;
        padding: 3px 6px;
    }

    .saved-filter-tooltip {
        font-size: 11px;
        padding: 8px 12px;
        left: auto;
        right: 0;
        transform: none;
    }

    .saved-filter-tooltip::after {
        left: auto;
        right: 16px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .team-filter-header {
        flex-wrap: wrap;
    }

    .team-filter-header small {
        display: none;
    }

    .team-filter-header .filter-count,
    .team-filter-header .excluded-count {
        order: 10;
    }

    .team-filter-tabs .tab-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    .team-filter-tabs .tab-btn .material-symbols-outlined {
        font-size: 14px;
    }

    .team-filter-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .team-chip {
        font-size: 10px;
        padding: 5px 6px;
        grid-template-columns: 14px 1fr auto;
    }

    .team-chip .chip-status {
        font-size: 12px;
    }

    .team-chip .chip-count {
        font-size: 9px;
    }

    .filter-info {
        flex-wrap: wrap;
        font-size: 11px;
    }

    .filter-info .clear-filter {
        width: 100%;
        margin-top: 6px;
        margin-left: 0;
        text-align: right;
    }
}

/* ===== Page Title Bar ===== */
.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title-bar h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.page-title-bar h1 .material-symbols-outlined {
    font-size: 28px;
    color: #1a73e8;
}

.page-title-bar .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.page-title-bar .btn .material-symbols-outlined {
    font-size: 18px;
}

@media (max-width: 480px) {
    .page-title-bar h1 {
        font-size: 1.2rem;
    }

    .page-title-bar h1 .material-symbols-outlined {
        font-size: 24px;
    }

    .page-title-bar .btn {
        padding: 5px 8px;
        font-size: 12px;
        border-radius: 11px;
    }

    .page-title-bar .btn .material-symbols-outlined {
        font-size: 16px;
    }
}

/* ===== Year Scroll (Schedule Page) ===== */
.year-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 0px;
}

.year-scroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 50%;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 2;
}

.year-scroll-btn:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.2);
}

.year-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.year-scroll-btn .material-symbols-outlined {
    font-size: 20px;
}

.year-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    scroll-behavior: smooth;
    mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
}

.year-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.year-scroll-inner {
    display: flex;
    gap: 10px;
    padding: 4px 24px;
    min-width: max-content;
}

.year-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #3c4043;
    background: #fff;
    border: 2px solid #e8eaed;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.year-chip:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.year-chip.active {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
    transform: translateY(-2px);
}

.year-chip.active:hover {
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
}

@media (max-width: 768px) {
    .year-scroll-wrapper {
        padding: 0px;
    }

    .year-scroll-btn {
        width: 32px;
        height: 32px;
    }

    .year-scroll-btn .material-symbols-outlined {
        font-size: 18px;
    }

    .year-chip {
        padding: 8px 14px;
        font-size: 0.9rem
    }

    .year-scroll-inner {
        gap: 8px;
        padding: 4px 16px;
    }
}

@media (max-width: 480px) {
    .year-scroll-btn {
        width: 28px;
        height: 28px;
    }

    .year-scroll-btn .material-symbols-outlined {
        font-size: 16px;
    }

    .year-chip {
        padding: 6px 10px;
        font-size: 0.8rem;
        border-width: 1px;
    }

    .year-scroll-inner {
        gap: 6px;
        padding: 4px 12px;
    }

    .year-scroll-container {
        mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
        padding: 8px 0px;
    }
}

/* ===== Month Filter (Schedule Page) ===== */
.month-filter-container {
    display: grid; grid-template-columns: repeat(13, 1fr);
    width: 100%;
    gap: 5px;
    padding: 16px 10px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e8eaed;
}

.month-chip {
    display: inline-flex;
    align-items: center; justify-content: center; flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #3c4043;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.month-chip .month-count {
    display: none;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    background: #e8eaed;
    border-radius: 10px;
    color: #5f6368;
}

.month-chip:hover:not(.disabled):not(.active) {
    background: #e8f0fe;
    border-color: #d2e3fc;
    color: #1a73e8;
}

.month-chip:hover:not(.disabled):not(.active) .month-count {
    background: #d2e3fc;
    color: #1a73e8;
}

.month-chip.active {
    font-size: 1.0rem;
    color: #1a73e8;
}

.month-chip.active .month-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.month-chip.disabled {
    color: #bdc1c6;
    background: #f1f3f4;
    border-color: #e8eaed;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===== Schedule Current View ===== */
.schedule-current-view h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #202124;
}

.schedule-current-view h2 .count {
    font-size: 0.9rem;
    font-weight: 400;
    color: #5f6368;
    margin-left: 8px;
}

/* ===== Month Divider ===== */
.month-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 12px;
    padding: 0;
}

.month-divider span {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1a73e8;
    background: #e8f0fe;
    border-radius: 20px;
}

.month-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8eaed;
    margin-left: 12px;
}

@media (max-width: 768px) {
    .month-filter-container {
        gap: 4px;
        padding: 10px 5px;
    }

    .month-chip {
        padding: 4px 6px;
        font-size: 0.8rem;
        gap: 0px;
    }

    .month-chip[data-month="all"] {
        min-width: 36px;
    }
    .month-chip.active {
        font-size: 0.8rem;
    }
    .month-chip-month {
        display: none;
    }

    .month-chip .month-count {
        display: none;
        font-size: 0.8rem;
        padding: 1px 5px;
    }
}

@media (max-width: 480px) {
    .month-filter-container {
        gap: 0px;
        padding: 5px;
        border-radius: 7px;
        background: white;
    }

    .month-chip {
        padding: 5px 0px;
        font-size: 0.7rem;
        border: 0px;
        border-radius: 0px;
        gap: 3px;
    }

    .month-chip .month-count {
        display: none;
        font-size: 0.7rem;
        padding: 1px 4px;
    }

    .month-divider span {
        font-size: 13px;
        padding: 4px 12px;
    }
}

/* ===== Competition Poster (Schedule Page) ===== */
.result-main.with-poster {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.comp-poster {
    flex-shrink: 0;
    width: 100px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f1f3f4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comp-poster:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.comp-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comp-poster .no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, #e8eaed 0%, #dadce0 100%);
    color: #9aa0a6;
}

.comp-poster .no-poster .material-symbols-outlined {
    font-size: 32px;
    opacity: 0.6;
}

.comp-poster .no-poster span:last-child {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.result-main.with-poster .result-info {
    flex: 1;
    min-width: 0;
}

.result-main.with-poster .result-action {
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 768px) {
    .result-main.with-poster {
        display: grid;
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
    }

    .comp-poster {
        width: 90px;
        height: 126px;
        grid-row: 1 / 3;
    }

    .comp-poster .no-poster .material-symbols-outlined {
        font-size: 28px;
    }

    .comp-poster .no-poster span:last-child {
        font-size: 9px;
    }

    .result-main.with-poster .result-info {
        grid-column: 2;
        grid-row: 1;
    }

    .result-main.with-poster .result-action {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: end;
    }
}

@media (max-width: 480px) {
    .result-main.with-poster {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }

    .comp-poster {
        width: 80px;
        height: 112px;
        border-radius: 6px;
    }

    .comp-poster .no-poster .material-symbols-outlined {
        font-size: 24px;
    }

    .comp-poster .no-poster span:last-child {
        font-size: 8px;
    }

    .result-main.with-poster .result-info .result-name {
        font-size: 14px;
        line-height: 1.3;
    }

    .result-main.with-poster .result-info .result-comp-meta {
        margin-top: 6px !important;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .result-main.with-poster .result-info .result-comp-meta span {
        font-size: 11px;
    }

    .result-main.with-poster .result-info .result-comp-meta .material-symbols-outlined {
        font-size: 13px;
    }

    .result-main.with-poster .result-action .btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .result-main.with-poster .result-action .btn .material-symbols-outlined {
        font-size: 14px;
    }
}

/* ===== ON-AIR 진행중 대회 뱃지 ===== */
.onair-section {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 12px 16px 0;
    text-align: center;
}

.onair-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.onair-dot {
    width: 10px;
    height: 10px;
    background: #ff3b3b;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 59, 59, 0.6);
    animation: onairPulse 1.5s ease-in-out infinite;
}

@keyframes onairPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(255, 59, 59, 0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 4px rgba(255, 59, 59, 0.3); }
}

.onair-label {
    font-size: 12px;
    font-weight: 700;
    color: #ff3b3b;
    letter-spacing: 1px;
    white-space: nowrap;
}

.onair-ticker {
    display: grid;
    height: 20px;
    overflow: hidden;
    line-height: 20px;
}

.onair-item {
    grid-area: 1 / 1;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(100%);
}

.onair-item.active {
    opacity: 1;
    transform: translateY(0);
}

.onair-item.flip-out {
    animation: onairFlipOut 0.5s ease-in forwards;
}

.onair-item.flip-in {
    animation: onairFlipIn 0.5s ease-out forwards;
}

@keyframes onairFlipOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-100%); }
}

@keyframes onairFlipIn {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 대회 1개일 때 */
.onair-ticker[data-count="1"] .onair-item {
    opacity: 1;
    transform: none;
}

@media (max-width: 768px) {
    .onair-section { padding: 8px 16px 0; }
    .onair-badge { padding: 6px 14px; gap: 8px; max-width: 90vw; }
    .onair-label { font-size: 11px; }
    .onair-ticker { min-width: 0; overflow: hidden; }
    .onair-item { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
}

/* ON-AIR 클릭 가능 스타일 */
.onair-item[onclick] {
    cursor: pointer;
    text-decoration: underline dotted #9ca3af;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.onair-item[onclick]:hover {
    color: #2563eb;
}

/* ===== Record Scanner Modal ===== */
.scanner-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.scanner-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    position: relative;
    animation: modalSlideUp 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.scanner-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    font-size: 28px; color: #6b7280;
    cursor: pointer; line-height: 1;
}
.scanner-modal-close:hover { color: #111; }
.scanner-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
    padding-right: 30px;
}
.scanner-step-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px;
}
.scanner-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.scanner-input:focus {
    border-color: #2563eb;
}
.scanner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.scanner-btn:active { transform: scale(0.97); }
.scanner-btn-primary {
    background: #2563eb;
    color: #fff;
    width: 100%;
    justify-content: center;
}
.scanner-btn-primary:hover { background: #1d4ed8; }
.scanner-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}
.scanner-btn-secondary:hover { background: #e5e7eb; }

.scanner-template {
    text-align: center;
    margin-bottom: 12px;
}
.scanner-template-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.scanner-template-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6b7280;
}
.scanner-template-hint strong {
    color: #d93025;
}
.scanner-upload-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.scanner-upload-buttons .scanner-btn {
    flex: 1;
    justify-content: center;
}

#scannerPreview {
    margin-bottom: 16px;
    text-align: center;
}
#scannerPreviewImg {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.scanner-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.scanner-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}
#scannerProgressText {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 4px;
}

.scanner-result-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color 0.2s, background 0.2s;
}
.scanner-result-item:hover { background: #f9fafb; }
.scanner-result-item.selected {
    border-color: #2563eb;
    background: #eff6ff;
}
.scanner-result-info {
    flex: 1;
    min-width: 0;
}
/* 1행: 이름 소속 ... 기록 순위 */
.scanner-result-row1 {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.sr-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.sr-club {
    font-size: 13px;
    color: #6b7280;
}
.sr-spacer {
    flex: 1;
}
.sr-record {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
}
.sr-ranking {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
}
/* 2행: 태그들 */
.scanner-result-row2 {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.sr-tag {
    font-size: 11px;
    color: #4b5563;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 4px;
}
/* 편집 가능 표시 */
.sr-editable {
    cursor: pointer;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}
.sr-editable:hover {
    border-bottom-color: #2563eb;
    background: #eff6ff;
    border-radius: 2px;
}
/* 인라인 편집 input */
.sr-edit-input {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    border: 1px solid #2563eb;
    border-radius: 4px;
    padding: 1px 4px;
    background: #fff;
    outline: none;
    min-width: 40px;
    max-width: 120px;
}
select.sr-edit-input {
    padding: 1px 2px;
}
.sr-edit-input:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.scanner-new-record {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}
.scanner-unmatched-msg {
    margin-bottom: 12px;
}
.scanner-checkbox-hint {
    font-size: 13px;
    color: #d93025;
    background: #fce8e6;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    text-align: center;
}
.scanner-checkbox {
    display: flex;
    align-items: center;
    padding: 10px 8px 10px 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.scanner-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a73e8;
    cursor: pointer;
    margin: 0;
}
.scanner-no-result {
    text-align: center;
    padding: 24px;
    color: #9ca3af;
    font-size: 14px;
}

.scanner-action-bar {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.scanner-action-bar .scanner-btn-primary { flex: 2; }
.scanner-action-bar .scanner-btn-secondary { flex: 1; }

.scanner-done {
    text-align: center;
    padding: 32px 0 24px;
}
.scanner-done-msg {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-top: 12px;
}

.scanner-raw-toggle {
    margin-bottom: 12px;
}
.scanner-raw-toggle summary {
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    user-select: none;
}
.scanner-raw-text {
    margin-top: 6px;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 11px;
    color: #374151;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .scanner-modal-content { padding: 20px 16px; }
    .scanner-modal-title { font-size: 15px; }
}

/* ===== Scanner & Home inline style 대체 ===== */
/* ===== Scanner 로딩 오버레이 ===== */
.scanner-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    z-index: 10;
    border-radius: 16px;
    justify-content: center;
    align-items: center;
}
.scanner-overlay-inner {
    text-align: center;
}
.scanner-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: scannerSpin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes scannerSpin {
    to { transform: rotate(360deg); }
}
.scanner-overlay-text {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.scanner-overlay-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}
.scanner-btn-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.scanner-modal-content {
    position: relative;
}

.scanner-upload-icon {
    font-size: 48px;
    color: #9ca3af;
}
.scanner-done-icon {
    font-size: 64px;
    color: #22c55e;
}
.scanner-modal {
    display: none;
}
.scanner-step,
#scannerPreview,
#scannerProgress {
    display: none;
}
.scanner-step[data-step="1"] {
    display: block;
}
#scannerFileInput,
#scannerCameraInput {
    display: none;
}

/* ===== 메인 배너 광고 (MPTB001) ===== */
.banner-ad-section {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
}

.adv_section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.adv_section > section.pc {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 16px;
}

/* 메인 이미지 영역 */
.adv_section > section.pc > div:first-of-type {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.adv_section > section.pc > div:first-of-type > p {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    margin: 0;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.adv_section > section.pc > div:first-of-type > img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.adv_section > section.pc > div:first-of-type > img:hover {
    transform: scale(1.02);
}

/* 썸네일 리스트 */
.adv_section > section.pc > div:last-of-type {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.adv_section > section.pc > div:last-of-type > div {
    flex: 0 0 calc(20% - 6.4px);
    max-width: calc(20% - 6.4px);
}

.adv_section > section.pc > div:last-of-type > div > img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 6px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adv_section > section.pc > div:last-of-type > div > img:hover {
    border-color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.adv_section > section.pc > div:last-of-type > div > img.selected {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
}

/* 반응형 */
@media (max-width: 768px) {
    .banner-ad-section {
        padding: 16px 12px;
    }

    .adv_section > section.pc {
        padding: 12px;
    }

    .adv_section > section.pc > div:last-of-type > div {
        flex: 0 0 calc(25% - 6px);
        max-width: calc(25% - 6px);
    }

    .adv_section > section.pc > div:last-of-type > div > img {
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .adv_section > section.pc > div:first-of-type > p {
        top: 8px;
        left: 8px;
        padding: 3px 8px;
        font-size: 11px;
    }

    .adv_section > section.pc > div:last-of-type {
        gap: 6px;
    }

    .adv_section > section.pc > div:last-of-type > div {
        flex: 0 0 calc(33.333% - 4px);
        max-width: calc(33.333% - 4px);
    }

    .adv_section > section.pc > div:last-of-type > div > img {
        border-radius: 4px;
    }
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay .loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e8eaed;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay .loading-text {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #3c4043;
}

.loading-overlay .loading-subtext {
    margin-top: 8px;
    font-size: 13px;
    color: #5f6368;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 로딩 텍스트 애니메이션 (점 깜빡임) */
.loading-overlay .loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}


/* ===== Federation Links Section ===== */
.federation-links-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.federation-links {
    display: flex;
    justify-content: center;
}

.federation-dropdown {
    position: relative;
}

.federation-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.federation-dropdown__trigger:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26,115,232,0.15);
}

.federation-dropdown__trigger .material-symbols-outlined {
    font-size: 20px;
}

.federation-dropdown__trigger .dropdown-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.federation-dropdown.open .federation-dropdown__trigger .dropdown-arrow {
    transform: rotate(180deg);
}

.federation-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 360px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.2s ease;
}

.federation-dropdown.open .federation-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.federation-group {
    border-bottom: 1px solid #e8eaed;
}

.federation-group:last-child {
    border-bottom: none;
}

.federation-group__title {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.federation-group__items {
    padding: 4px 0;
}

.federation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    color: #202124;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.federation-item:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

.federation-item__name {
    display: flex;
    align-items: center;
    gap: 4px;
}

.federation-item__sub {
    color: #9aa0a6;
    font-size: 12px;
}

.federation-item__type {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

.federation-item__type--naver_cafe {
    background: #03c75a;
    color: #fff;
}

.federation-item__type--daum_cafe {
    background: #ffcd00;
    color: #333;
}

.federation-item__type--website {
    background: #1a73e8;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .federation-links-section {
        padding: 0 12px 20px;
    }

    .federation-dropdown__trigger {
        padding: 10px 16px;
        font-size: 13px;
    }

    .federation-dropdown__menu {
        min-width: 260px;
        max-height: 350px;
    }
}

@media (max-width: 480px) {
    .federation-dropdown__menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        min-width: 100%;
        max-width: 100%;
        max-height: 60vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .federation-dropdown.open .federation-dropdown__menu {
        transform: translateY(0);
    }

    .federation-group__title {
        padding: 12px 16px 8px;
    }

    .federation-item {
        padding: 12px 16px;
        font-size: 14px;
    }
}
