/* 온라인 강의실 페이지 스타일 */

/* 강의 카드 링크 */
.lecture-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: none !important;
    transform: none !important;
}

.lecture-card-link:hover {
    transform: none !important;
    transition: none !important;
}

/* 강의 카드 그리드 - 4열 그리드로 변경 */
.lecture-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* 강의 카드 */
.lecture-card {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    cursor: pointer;
    transition: none !important;
    transform: none !important;
}

.lecture-card:hover {
    transform: none !important;
    transition: none !important;
}

/* 강의 썸네일 */
.lecture-thumbnail {
    position: relative;
    width: 100%;
    height: 135px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #e9ecef;
}

/* 썸네일 placeholder */
.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    color: #6c757d;
}

.placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* New 뱃지 */
.new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff4757;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 강의 정보 */
.lecture-info {
    padding: 0.75rem;
}

.lecture-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8rem;
}

.lecture-duration {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin: 0.5rem 0 0 0;
}

/* 검색 결과 정보 */
.search-result-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0 2rem 0;
    text-align: center;
}

.search-result-text {
    margin: 0;
    font-size: 1rem;
    color: #495057;
}

.search-result-text.no-results {
    color: #dc3545;
}

.search-result-text strong {
    color: #345f53;
    font-weight: 600;
}

/* 강의 없음 메시지 */
.no-lectures {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-lectures p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.no-lectures a {
    color: #345f53;
    text-decoration: none;
    font-weight: 500;
}

.no-lectures a:hover {
    text-decoration: underline;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-number {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background-color: #f8f9fa;
    border-color: #345f53;
    text-decoration: none;
    color: #345f53;
}

.page-number.active {
    background-color: #345f53;
    color: white;
    border-color: #345f53;
}

.page-number.prev,
.page-number.next {
    font-weight: 600;
    min-width: auto;
    padding: 0.5rem 1.2rem;
}

.page-ellipsis {
    padding: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

/* 검색 & 정렬 바 */
.search-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    min-width: 200px;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #345f53;
}

.search-btn {
    padding: 0.5rem 1rem;
    background-color: #345f53;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #2a4c42;
}

.clear-btn {
    padding: 0.5rem 1rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #5a6268;
    text-decoration: none;
    color: white;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #345f53;
}

@media (max-width: 1024px) {
    .lecture-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
        max-width: 900px;
    }
    
    .lecture-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .lecture-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 600px;
        padding: 0 0.5rem;
    }
    
    .lecture-card {
        width: 100%;
    }
    
    .lecture-thumbnail {
        height: 120px;
    }
    
    .lecture-title {
        font-size: 0.85rem;
    }
    
    .search-filter-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input {
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    .sort-select {
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    .pagination {
        gap: 0.3rem;
    }
    
    .page-number {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .lecture-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 400px;
        padding: 0;
    }
    
    .lecture-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .lecture-thumbnail {
        height: 150px;
    }
    
    .lecture-info {
        padding: 1rem;
    }
    
    .lecture-title {
        font-size: 0.9rem;
        min-height: 3.2rem;
    }
    
    .new-badge {
        top: 6px;
        right: 6px;
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .pagination {
        gap: 0.2rem;
    }
    
    .page-number {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .search-input {
        font-size: 16px;
    }
    
    .search-btn {
        font-size: 14px;
        padding: 0.6rem 1rem;
    }
    
    .clear-btn {
        font-size: 14px;
        padding: 0.6rem 1rem;
    }
    
    .search-result-info {
        padding: 0.8rem;
        margin: 0.8rem 0 1.5rem 0;
    }
    
    .search-result-text {
        font-size: 0.9rem;
    }
}

/* 관리자 버튼 스타일 */
.online-class-write-section {
    text-align: center;
    margin-top: 2rem;
}

.online-class-admin-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #345f53;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.online-class-admin-btn:hover {
    background-color: #2a4c42;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 95, 83, 0.3);
}

.online-class-admin-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(52, 95, 83, 0.3);
}

/* 관리자용 출석 정보 */
.attendance-info {
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
    border-left: 3px solid #28a745;
}

.attendance-label {
    font-weight: 600;
    margin-right: 0.3rem;
}

.attended {
    font-weight: bold;
    color: #28a745;
}

.separator {
    margin: 0 0.2rem;
    color: #6c757d;
}

.total {
    font-weight: 500;
    color: #495057;
}

/* 접근 거부 팝업 스타일 */
.access-denied-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.access-denied-popup {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.access-denied-popup h2 {
    color: #dc3545;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.access-denied-popup p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login {
    background-color: #345f53;
    color: white;
}

.btn-login:hover {
    background-color: #2a4c42;
    text-decoration: none;
    color: white;
}

.btn-home {
    background-color: #6c757d;
    color: white;
}

.btn-home:hover {
    background-color: #5a6268;
    text-decoration: none;
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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