/* Lesson History Styles */
.main-content {
    margin-top: 140px;
    min-height: calc(100vh - 140px);
    background: #f8f9fa;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
    background: white;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2.5rem;
    color: #27ae60;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title p {
    color: #6c757d;
    margin: 0;
    font-size: 1.1rem;
}

/* Package Selection Section */
.package-selection-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.package-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.selector-label {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
}

.package-select {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.package-select:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Package Information Section */
.package-info-section {
    margin-bottom: 2rem;
}

/* Package Details Card */
.package-details-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.package-title h2 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 1.75rem;
}

.package-id {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.package-status .status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.completed {
    background: #cce5ff;
    color: #004085;
}

.status-badge.expired {
    background: #f8d7da;
    color: #721c24;
}

/* Package Stats - Desktop 레이아웃 */
.package-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

.stat-item:hover {
    transform: translateY(-2px);
}

/* Purchase Date 아이템 - 더 넓게 */
.stat-item:first-child {
    flex: 1.5;
    min-width: 200px;
}

/* 숫자 통계 아이템들 - 동일한 크기 */
.stat-item:not(:first-child) {
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.stat-icon {
    width: 45px;
    height: 45px;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.stat-value {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.2;
}

/* 숫자 통계들의 값을 더 크게 */
.stat-item:not(:first-child) .stat-value {
    font-size: 1.4rem;
    text-align: center;
}

.stat-item:not(:first-child) .stat-content {
    text-align: center;
}

/* Mobile Stats Layout - 기본적으로 숨김 */
.mobile-stats-layout {
    display: none;
}

.mobile-purchase-date {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: left;
}

.mobile-purchase-date .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    flex-shrink: 0;
}

.mobile-purchase-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-purchase-date .stat-label {
    font-size: 0.8rem;
    margin-bottom: 0;
    line-height: 1.2;
    color: #6c757d;
}

.mobile-purchase-date .stat-value {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: #2c3e50;
}

.mobile-stats-grid {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.mobile-stat-item {
    padding: 0.75rem 0.5rem;
    background: white;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.mobile-stat-item .stat-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.mobile-stat-item .stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.mobile-stat-item .stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1;
}

/* Progress Section */
.progress-section {
    margin-top: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-weight: 600;
    color: #2c3e50;
}

.progress-percentage {
    font-weight: bold;
    color: #27ae60;
}

.progress-bar {
    position: relative;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #27ae60;
    transition: width 0.5s ease;
}

.progress-reserved {
    position: absolute;
    top: 0;
    height: 100%;
    background: #ffc107;
    transition: all 0.5s ease;
}

.progress-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.completed {
    background: #27ae60;
}

.legend-color.reserved {
    background: #ffc107;
}

.legend-color.remaining {
    background: #e9ecef;
}

/* Lesson Controls */
.lesson-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.lesson-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.filter-btn.active {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.view-controls {
    display: flex;
    gap: 0.25rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 6px;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: white;
    color: #27ae60;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Loading State */
.loading-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

.loading-spinner {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* Lessons Container */
.lessons-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Card View - 작고 타이트한 카드 */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.lesson-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    min-height: 120px;
    cursor: pointer;
}

.lesson-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.lesson-card.reserved {
    border-left: 3px solid #ffc107;
    background: #fffbf0;
}

.lesson-card.completed {
    border-left: 3px solid #27ae60;
    background: #f8fff8;
}

.lesson-card.available {
    border-left: 3px solid #e9ecef;
    background: #f8f9fa;
    opacity: 0.7;
}

.lesson-card.available:hover {
    opacity: 1;
    border-left-color: #27ae60;
}

.lesson-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #2c3e50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    z-index: 2;
}

.lesson-card.reserved .lesson-number {
    background: #ffc107;
    color: #856404;
}

.lesson-card.completed .lesson-number {
    background: #27ae60;
    color: white;
}

.lesson-card.available .lesson-number {
    background: #6c757d;
    color: white;
}

.lesson-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 2;
}

.status-reserved {
    background: #ffc107;
    color: #856404;
}

.status-completed {
    background: #27ae60;
    color: white;
}

.status-available {
    background: #6c757d;
    color: white;
}

.lesson-content {
    padding: 2rem 0.75rem 0.75rem 0.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.lesson-date {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.lesson-time {
    color: #6c757d;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.lesson-coach {
    color: #27ae60;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.lesson-location {
    color: #6c757d;
    font-size: 0.7rem;
    line-height: 1.2;
}

.lesson-card.available .lesson-date,
.lesson-card.available .lesson-time,
.lesson-card.available .lesson-coach,
.lesson-card.available .lesson-location {
    color: #adb5bd;
}

/* List View */
.lessons-list {
    padding: 0;
}

/* List View - 시간 컬럼 넓게 수정 */
.list-header {
    display: grid;
    grid-template-columns: 50px 120px 120px 100px 80px 100px; /* Time 컬럼을 80px에서 120px로 확장 */
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

.list-item {
    display: grid;
    grid-template-columns: 50px 120px 120px 100px 80px 100px; /* Time 컬럼을 80px에서 120px로 확장 */
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    align-items: center;
    transition: background 0.3s ease;
    font-size: 0.85rem;
    cursor: pointer;
}

.list-item:hover {
    background: #f8f9fa;
}

.list-item.available {
    opacity: 0.6;
    color: #6c757d;
}

.list-item.available:hover {
    opacity: 1;
}

/* 필터링된 아이템 강제 숨김 */
.list-item[style*="display: none"],
.lesson-card[style*="display: none"],
.mobile-list-item[style*="display: none"],
.desktop-list-item[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.status-badge.reserved {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.available {
    background: #e9ecef;
    color: #6c757d;
}

/* Empty State */
.empty-state {
    padding: 3rem !important;
    text-align: center !important;
    color: #6c757d !important;
    display: none !important; /* 기본적으로 숨김 */
    background: white !important;
    border-radius: 12px !important;
    margin: 1rem 0 !important;
}

.empty-state[style*="display: block"] {
    display: block !important; /* 명시적으로 block일 때만 표시 */
}

.empty-state .empty-icon {
    font-size: 4rem !important;
    color: #27ae60 !important;
    opacity: 0.5 !important;
    margin-bottom: 1rem !important;
}

.empty-state h3 {
    margin: 0 0 1rem 0 !important;
    color: #2c3e50 !important;
    font-size: 1.5rem !important;
}

.empty-state p {
    margin: 0 !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
}

/* No Package State */
.no-package-state {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 3rem;
    text-align: center;
}

.no-package-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-package-icon {
    font-size: 5rem;
    color: #27ae60;
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.no-package-state h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.no-package-state p {
    margin: 0 0 2rem 0;
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Message 스타일 */
.lesson-message {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    max-width: 500px !important;
    width: auto !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 기존의 다른 메시지 스타일과 충돌 방지 */
.lesson-message * {
    font-size: inherit !important;
    line-height: inherit !important;
    font-family: inherit !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-top: 80px;
        padding: 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .page-header {
        padding: 1.5rem 0;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .page-title h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .package-selection-section {
        margin: 0 0 1.5rem 0;
        padding: 1rem;
    }
    
    .package-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .package-select {
        min-width: auto;
        width: 100%;
    }
    
    .package-details-card {
        padding: 1.5rem;
        margin: 0 0 1.5rem 0;
    }
    
    .package-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    /* 모바일에서 기존 stats 숨기고 모바일 레이아웃 표시 */
    .package-stats {
        display: none;
    }
    
    .mobile-stats-layout {
        display: block;
        margin-bottom: 2rem;
    }
    
    .lesson-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin: 0 0 1.5rem 0;
    }
    
    .lesson-filters {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .filter-btn {
        flex: 1;
        justify-content: center;
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .lessons-container {
        margin: 0;
    }
    
    .lessons-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
        padding: 1rem;
    }
    
    .lesson-card {
        min-height: 100px;
    }
    
    .lesson-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .lesson-status {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
    
    .lesson-content {
        padding: 1.5rem 0.6rem 0.6rem 0.6rem;
    }
    
    .lesson-date {
        font-size: 0.75rem;
    }
    
    .lesson-time,
    .lesson-coach {
        font-size: 0.7rem;
    }
    
    .lesson-location {
        font-size: 0.65rem;
    }
    
    .list-header {
        display: none !important;
    }
    
    .lessons-list {
        padding: 0.75rem;
        display: block !important;
    }
    
    /* 모바일 리스트 아이템을 한 줄로 컴팩트하게 */
    .list-item,
    .mobile-list-item {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        border: 1px solid #e9ecef;
        border-radius: 6px;
        margin-bottom: 0.3rem;
        padding: 0.5rem 0.75rem;
        background: white;
        font-size: 0.75rem;
        min-height: auto;
        grid-template-columns: none;
        gap: 0;
    }
    
    .desktop-list-item {
        display: none !important;
    }
    
    /* 왼쪽 영역: 번호 + 날짜/시간 */
    .mobile-list-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-list-number {
        font-weight: bold;
        color: #2c3e50;
        font-size: 0.75rem;
        width: 24px;
        flex-shrink: 0;
    }
    
    .mobile-list-datetime {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-list-date {
        font-weight: 600;
        color: #2c3e50;
        font-size: 0.75rem;
        line-height: 1.1;
    }
    
    .mobile-list-time {
        color: #6c757d;
        font-size: 0.65rem;
        line-height: 1.1;
    }
    
    /* 가운데 영역: 코치 + 장소 */
    .mobile-list-center {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    .mobile-list-coach {
        color: #27ae60;
        font-size: 0.7rem;
        font-weight: 500;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .mobile-list-location {
        color: #6c757d;
        font-size: 0.65rem;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 오른쪽 영역: 상태 */
    .mobile-list-right {
        flex-shrink: 0;
    }
    
    .mobile-list-right .status-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
        border-radius: 10px;
        white-space: nowrap;
    }
    
    .progress-legend {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .empty-state {
        padding: 2rem 1rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .empty-state .empty-icon {
        font-size: 3rem !important;
    }
    
    .empty-state h3 {
        font-size: 1.3rem !important;
    }
    
    .empty-state p {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .page-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    .page-title h1 {
        font-size: 1.75rem;
    }
    
    .package-selection-section {
        padding: 0.75rem;
    }
    
    .package-details-card {
        padding: 1rem;
    }
    
    .mobile-purchase-date {
        padding: 0.75rem;
        gap: 0.6rem;
    }
    
    .mobile-purchase-date .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .mobile-purchase-date .stat-label {
        font-size: 0.75rem;
    }
    
    .mobile-purchase-date .stat-value {
        font-size: 0.9rem;
    }
    
    .mobile-stats-grid {
        gap: 0.4rem;
        padding: 0.75rem;
    }
    
    .mobile-stat-item {
        padding: 0.6rem 0.4rem;
    }
    
    .mobile-stat-item .stat-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .mobile-stat-item .stat-value {
        font-size: 1rem;
    }
    
    .mobile-stat-item .stat-label {
        font-size: 0.65rem;
    }
    
    .lesson-controls {
        padding: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .lessons-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .lesson-card {
        min-height: 90px;
    }
    
    .lesson-number {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: 0.4rem;
        left: 0.4rem;
    }
    
    .lesson-status {
        width: 16px;
        height: 16px;
        font-size: 0.55rem;
        top: 0.4rem;
        right: 0.4rem;
    }
    
    .lesson-content {
        padding: 1.3rem 0.5rem 0.5rem 0.5rem;
    }
    
    .lesson-date {
        font-size: 0.7rem;
    }
    
    .lesson-time,
    .lesson-coach,
    .lesson-location {
        font-size: 0.65rem;
    }
    
    /* 모바일 리스트 아이템 480px 이하에서 더 컴팩트하게 */
    .list-item {
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.25rem;
        font-size: 0.7rem;
    }
    
    .mobile-list-left {
        gap: 0.5rem;
    }
    
    .mobile-list-number {
        font-size: 0.7rem;
        width: 20px;
    }
    
    .mobile-list-date {
        font-size: 0.7rem;
    }
    
    .mobile-list-time {
        font-size: 0.6rem;
    }
    
    .mobile-list-coach {
        font-size: 0.65rem;
    }
    
    .mobile-list-location {
        font-size: 0.6rem;
    }
    
    .mobile-list-right .status-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
    }
    
    .lessons-list {
        padding: 0.6rem;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* 데스크톱에서 모바일 요소 숨김 */
@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-user-btn {
        display: none !important;
    }
    
    .main-nav {
        display: block !important;
    }
    
    .social-links {
        display: flex !important;
    }
    
    /* 데스크톱에서 모바일 리스트 숨김 */
    .mobile-list-item {
        display: none !important;
    }
    
    .desktop-list-item {
        display: grid !important;
    }
}

/* 터치 디바이스를 위한 더 큰 터치 영역 */
@media (hover: none) and (pointer: coarse) {
    .mobile-menu-btn {
        width: 44px;
        height: 44px;
        padding: 0.75rem;
    }
    
    .mobile-menu-btn span {
        width: 22px;
    }
    
    .nav-link:hover {
        background: none;
        transform: none;
    }
    
    .dropdown-menu a:hover {
        padding-left: 1rem;
    }
    
    .dropdown-menu a:hover::before {
        width: 0;
    }
}

/* 초소형 디바이스 (Galaxy Fold 등) */
@media (max-width: 320px) {
    .header-container {
        padding: 0.5rem;
    }
    
    .logo {
        height: 32px;
    }
    
    .mobile-nav {
        width: 100vw;
        left: -100vw;
    }
    
    .cart-icon {
        font-size: 1rem;
    }
    
    footer {
        padding: 0.5rem 0;
    }
    
    .footer-content {
        gap: 0.5rem;
    }
    
    .footer-logo img {
        height: 32px;
    }
    
    .footer-social-links {
        gap: 0.5rem;
    }
    
    .footer-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .footer-locations p,
    .footer-contact p {
        font-size: 0.75rem;
    }
}

/* 고해상도 디스플레이 */
@media (-webkit-min-device-pixel-ratio: 2) {
    .logo {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    header {
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }
    
    .main-nav {
        background: #2a2a2a;
        border-top-color: #333;
    }
    
    .nav-link {
        color: #4ade80;
    }
    
    .dropdown-menu {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .dropdown-menu a {
        color: #e5e5e5;
        border-bottom-color: #333;
    }
    
    .dropdown-menu a:hover {
        background: #333;
        color: #4ade80;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        border-color: #27ae60;
    }
}

/* 애니메이션 줄이기 */
@media (prefers-reduced-motion: reduce) {
    .logo,
    .nav-link,
    .dropdown-menu,
    .mobile-menu-btn span,
    .mobile-nav {
        transition: none;
    }
}

/* 카테고리 및 탭 요소들의 z-index 강제 조정 */
.category-tabs,
.filter-tabs,
.tab-container,
.nav-tabs,
.lesson-tabs,
.product-tabs,
.category-filter,
.lesson-categories,
.product-categories,
.tab-content,
.category-buttons,
.filter-buttons,
.btn-group,
.button-group {
    position: relative !important;
    z-index: 50 !important;
}

/* 모든 버튼들의 z-index 조정 */
button,
.category-btn,
.filter-btn {
    position: relative !important;
    z-index: 51 !important;
}

/* 사용자 드롭다운이 최상위에 오도록 강제 */
.user-dropdown-menu.active {
    z-index: 999999 !important;
    position: absolute !important;
}

/* 추가 안전장치 */
*[class*="category"],
*[class*="tab"],
*[class*="filter"] {
    z-index: 100 !important;
}