* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', 'Arimo', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f4f5f7;
    color: #1a2b4a;
}

/* ===== Hero Header ===== */
.hero-header {
    background-color: #1a2b4a;
    padding: 60px 24px;
    text-align: center;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
}

/* ===== Page Layout ===== */
.page-container {
    max-width: 1391px;
    margin: 0 auto;
    padding: 40px 75px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* ===== Left Sidebar ===== */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0px 4px 16px rgba(26, 43, 74, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sb-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sb-label {
    font-size: 13px;
    font-weight: 700;
    color: #8b95a1;
    letter-spacing: 1.04px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.sb-divider {
    height: 1px;
    background: #e8ebf0;
}

/* 강사 유형 buttons */
.sb-type-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sb-type-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #2a2a2a;
    background: #f4f5f7;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.sb-type-btn.active {
    background: #1a2b4a;
    color: white;
}

.sb-type-btn:hover:not(.active) {
    background: #e8ebf0;
}

/* 카테고리 items */
.sb-cat-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 37px;
    border-radius: 10px;
    padding-left: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2a2a2a;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}
.sb-cat-item.hidden {
    display: none;
}

.sb-cat-item.show {
    display: flex;
}

.sb-cat-item:hover,
.sb-cat-item.active {
    background: #f4f5f7;
}

.sb-more-link {
    display: block;
    font-size: 12px;
    color: #ff6b35;
    text-decoration: none;
    text-align: left;
    padding-left: 12px;
    margin-top: 4px;
    cursor: pointer;
    background: none;
    border: none;
}

.sb-more-link:hover {
    text-decoration: underline;
}

/* 별점/등급/가격 filter items */
.sb-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 37px;
    border-radius: 10px;
    padding-left: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2a2a2a;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}

.sb-filter-item:hover:not(.active) {
    background: #f4f5f7;
}

.sb-filter-item.active {
    background: rgba(255, 107, 53, 0.08);
    border-left: 3px solid #ff6b35;
    padding-left: 14px;
    color: #ff6b35;
}

/* ===== Main Content Area ===== */
.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Main Tabs ===== */
.main-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-tab-btn {
    height: 42px;
    padding: 0 20px;
    border-radius: 9999px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.main-tab-btn.active {
    background-color: #ff6b35;
    color: white;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1), 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.main-tab-btn.inactive {
    background-color: white;
    color: #8b95a1;
    box-shadow: 0px 2px 6px rgba(26, 43, 74, 0.08);
}

.main-tab-btn.inactive:hover {
    color: #1a2b4a;
    box-shadow: 0px 4px 10px rgba(26, 43, 74, 0.12);
}

/* ===== Filter Tags ===== */
.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-tag-btn {
    height: 37px;
    padding: 0 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.filter-tag-btn.active {
    background-color: #1a2b4a;
    color: white;
    border: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-tag-btn.inactive {
    background-color: white;
    color: #8b95a1;
    border: 0.9px solid #e8ebf0;
}

.filter-tag-btn.inactive:hover {
    border-color: #1a2b4a;
    color: #1a2b4a;
}

/* ===== Section Header ===== */
.section-header {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2b4a;
}

.sort-select {
    height: 37px;
    padding: 0 12px;
    border: 0.9px solid #e8ebf0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5565;
    background: white;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    min-width: 132px;
}

.sort-select:focus {
    border-color: #1a2b4a;
}

/* ===== Instructor Card Grid ===== */
.instructor-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    margin: 24px 0 0 0;
}

.grid-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ===== Instructor Card ===== */
.instructor-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0px 4px 16px rgba(26, 43, 74, 0.12);
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 240px;
    flex-shrink: 0;
}

/* Rank badge (top-left) */
.rank-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 48px;
    height: 48px;
    background: linear-gradient(180deg, #ffd700 0%, #ff9800 100%);
    border: 3.636px solid white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: white;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1), 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.rank-badge.rank-silver {
    width: 42px;
    height: 42px;
    border-width: 2.727px;
    background: linear-gradient(180deg, #c0c0c0 0%, #a8a8a8 100%);
    font-size: 18px;
}

.rank-badge.rank-bronze {
    width: 42px;
    height: 42px;
    border-width: 2.727px;
    background: linear-gradient(180deg, #cd7f32 0%, #b8860b 100%);
    font-size: 18px;
}

.rank-badge.rank-orange {
    width: 36px;
    height: 36px;
    border-width: 1.818px;
    background: linear-gradient(180deg, #ff6b35 0%, #e85a2a 100%);
    font-size: 15px;
}

/* Card inner content */
.card-inner {
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Avatar area */
.card-avatar-area {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    margin-bottom: 12px;
    position: relative;
}

.card-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}

.card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 9999px;
    object-fit: cover;
}

.card-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* Grade badge (overlaid bottom of avatar) */
.grade-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    height: 22px;
    padding: 0 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.grade-badge.master {
    background-color: #ff6b35;
    box-shadow: 0px 0px 16px rgba(255, 107, 53, 0.5);
}

.grade-badge.elite {
    background-color: #2a2a2a;
}

.grade-badge.pro {
    background-color: #2a2a2a;
}

.grade-badge.core {
    background-color: #2a2a2a;
}

.grade-badge.basic {
    background-color: #8b95a1;
}

.grade-badge.start {
    background-color: #c1ddff;
    color: #03032e;
}

/* Name */
.card-name {
    font-size: 20px;
    font-weight: 800;
    color: #1a2b4a;
    text-align: center;
    margin-top: 18px;
    margin-bottom: 4px;
}

.card-name.name-md { font-size: 18px; }
.card-name.name-sm { font-size: 16px; }
.card-name.name-xs { font-size: 15px; }

/* Bio */
.card-bio {
    font-size: 13px;
    font-weight: 400;
    color: #8b95a1;
    text-align: center;
    margin-bottom: 10px;
}

/* Type badge */
.card-type-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.card-type-badge {
    background-color: #f4f5f7;
    color: #8b95a1;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 9999px;
}

/* Rating */
.card-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
}

.rating-star {
    font-size: 13px;
}

.rating-value {
    font-size: 13px;
    font-weight: 700;
    color: #ff6b35;
}

.rating-count {
    font-size: 13px;
    color: #8b95a1;
}

/* Skill tags */
.card-skills {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.skill-tag {
    background-color: rgba(255, 107, 53, 0.08);
    color: #ff6b35;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Class type + level badges */
.card-class-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 14px;
}

.class-badge-online {
    background-color: rgba(255, 107, 53, 0.12);
    color: #ff6b35;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
}

.class-badge-streaming {
    background-color: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
}

.class-badge-qna {
    background-color: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
}

.class-badge-offline {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
}

.class-badge-level {
    background-color: rgba(26, 43, 74, 0.08);
    color: #1a2b4a;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
}

/* Divider */
.card-divider {
    height: 1px;
    background: #f4f5f7;
    margin-bottom: 12px;
}

/* Stats box */
.card-stats-box {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 14px;
}

.stats-label {
    font-size: 11px;
    color: #8b95a1;
    margin-bottom: 2px;
}

.stats-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a2b4a;
}

/* Profile button */
.card-profile-btn {
    width: 100%;
    height: 50px;
    background-color: #ff6b35;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
    margin-top: auto;
}

.card-profile-btn:hover {
    background-color: #e85c27;
}

.card-profile-btn.btn-navy {
    background-color: #1a2b4a;
    color: white;
}

.card-profile-btn.btn-navy:hover {
    background-color: #243d6a;
}

.card-profile-btn.btn-gray {
    background-color: #f4f5f7;
    color: #1a2b4a;
}

.card-profile-btn.btn-gray:hover {
    background-color: #e8ebf0;
}

.card-profile-btn.btn-outline {
    background-color: transparent;
    border: 1px solid #e8ebf0;
    color: #1a2b4a;
}

.card-profile-btn.btn-outline:hover {
    background-color: #f4f5f7;
}

/* ===== Empty State (TOP 10 view) ===== */
.top10-view {
    display: none;
}

.top10-view.visible {
    display: block;
}

.all-view.hidden {
    display: none;
}

.top10-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top10-item {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0px 2px 8px rgba(26, 43, 74, 0.07);
    transition: box-shadow 0.2s;
}

.top10-item:hover {
    box-shadow: 0px 4px 16px rgba(26, 43, 74, 0.12);
}

.top10-rank {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #ffd700 0%, #ff9800 100%);
    border: 2px solid white;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
}

.top10-rank.rank1 {
    background: linear-gradient(180deg, #ffd700 0%, #ff9800 100%);
}

.top10-rank.rank2 {
    background: linear-gradient(180deg, #c0c0c0 0%, #a8a8a8 100%);
}

.top10-rank.rank3 {
    background: linear-gradient(180deg, #cd7f32 0%, #b8860b 100%);
}

.top10-rank.rank4,
.top10-rank.rank5,
.top10-rank.rank6,
.top10-rank.rank7,
.top10-rank.rank8,
.top10-rank.rank9,
.top10-rank.rank10 {
    background: linear-gradient(180deg, #ff6b35 0%, #e85a2a 100%);
}

.top10-avatar {
    width: 52px;
    height: 52px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.top10-info {
    flex: 1;
}

.top10-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a2b4a;
    margin-bottom: 2px;
}

.top10-bio {
    font-size: 13px;
    color: #8b95a1;
}

.top10-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top10-stat {
    text-align: center;
}

.top10-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a2b4a;
}

.top10-stat-label {
    font-size: 11px;
    color: #8b95a1;
}

.top10-stat-value.highlight {
    color: #ff6b35;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.page-btn {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: 1px solid #e8ebf0;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #8b95a1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}

.page-btn:hover {
    border-color: #1a2b4a;
    color: #1a2b4a;
}

.page-btn.active {
    background-color: #1a2b4a;
    color: white;
    border-color: #1a2b4a;
    font-weight: 700;
}

.page-btn.arrow {
    font-size: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .page-container {
        padding: 32px 24px;
    }
    .grid-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 800px) {
    .sidebar {
        display: none;
    }
    .grid-row {
        flex-direction: column;
        align-items: center;
    }
}