/* AI Translation Styles */
.translate-select-language {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* Final safeguard: force-hide auth buttons and container.
   Placed at the end of the stylesheet so it overrides earlier rules. */
.auth-buttons,
.auth-buttons .login-btn,
.auth-buttons .register-btn {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

body {
    background-color: white;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.logo-container h1 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-size: 16px;
    color: #666;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: #333;
}

.search-login {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-bar {
    position: relative;
    width: 250px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    padding-right: 40px;
    border-radius: 20px;
    border: none;
    background-color: #f0f0f0;
    font-size: 14px;
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.auth-buttons {
    display: none;
    gap: 10px;
}

.login-btn, .register-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.register-btn {
    background-color: #4cd964;
    border: none;
    color: white;
}

.login-btn:hover {
    background-color: #f5f5f5;
}

.register-btn:hover {
    background-color: #3cc954;
}

/* Toggles Container */
.toggles {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
    transition: all 0.3s;
}

.language-selector:hover {
    background-color: transparent;
    border-color: transparent;
}

.language-selector i {
    font-size: 12px;
    color: #666;
}

.language-select {
    border: none;
    background: transparent;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    padding: 0;
    margin: 0;
    min-width: 60px;
}

.language-select:focus {
    outline: none;
}

/* translate.js generated select styles */
#translate select {
    border: none !important;
    background: transparent !important;
    color: #666 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 60px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100%;
    text-align: center !important;
    text-align-last: center !important;
}

#translate select:focus {
    outline: none !important;
    border: none !important;
    background: transparent !important;
}

#translate select option {
    background-color: white;
    color: #333;
    padding: 5px;
}

/* Style translate.js container with elliptical border like theme button */
#translate {
    width: 60px;
    height: 36px;
    border-radius: 18px;
    border: 1px solid #ddd;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
}

#translate:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.language-selector:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.language-selector i {
    font-size: 12px;
    color: #666;
}

.language-select {
    border: none;
    background: transparent;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    padding: 0;
    margin: 0;
    min-width: 60px;
}

.language-select:focus {
    outline: none;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Category Navigation */
.category-nav {
    background-color: white;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.category-nav ul {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 0;
}

.category-nav ul li a {
    display: flex;
    align-items: center;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.category-nav ul li a i {
    margin-right: 5px;
}

.category-nav ul li a:hover, .category-nav ul li a.active {
    background-color: #4cd964;
    color: white;
}

.category-nav ul li a.all {
    background-color: #4cd964;
    color: white;
}

/* Main Content */
main {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 30px;
    padding: 30px 20px;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.course-categories li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.course-categories li:last-child {
    border-bottom: none;
}

.course-categories li:hover {
    color: #333;
}

.count {
    background-color: #f0f0f0;
    border-radius: 15px;
    padding: 2px 8px;
    font-size: 12px;
    color: #999;
}

/* Course Grid */
.courses {
    grid-column: 2;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.course-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Hide login and register buttons visually while keeping them in the DOM.
   Using !important ensures this override wins over earlier rules.
   This satisfies "hide, not delete" requirement. */
.login-btn,
.register-btn {
    display: none !important;
    visibility: hidden !important;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.course-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder images using CSS */
.course-image[data-course="scratch-intro"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-image[data-course="python-basics"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.course-image[data-course="scratch-game"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.course-image[data-course="scratch-animation"] {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.course-image[data-course="scratchjr-intro"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
}


/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f7;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.logo-container h1 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-size: 16px;
    color: #666;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: #333;
}

.search-login {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    position: relative;
    width: 250px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    padding-right: 40px;
    border-radius: 20px;
    border: none;
    background-color: #f0f0f0;
    font-size: 14px;
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.login-btn, .register-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.register-btn {
    background-color: #4cd964;
    border: none;
    color: white;
}

.login-btn:hover {
    background-color: #f5f5f5;
}

.register-btn:hover {
    background-color: #3cc954;
}

/* Category Navigation */
.category-nav {
    background-color: white;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.category-nav ul {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 0;
}

.category-nav ul li a {
    display: flex;
    align-items: center;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.category-nav ul li a i {
    margin-right: 5px;
}

.category-nav ul li a:hover, .category-nav ul li a.active {
    background-color: #4cd964;
    color: white;
}

.category-nav ul li a.all {
    background-color: #4cd964;
    color: white;
}

/* Main Content */
main {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 30px;
    padding: 30px 20px;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.course-categories li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.course-categories li:last-child {
    border-bottom: none;
}

.course-categories li:hover {
    color: #333;
}

.count {
    background-color: #f0f0f0;
    border-radius: 15px;
    padding: 2px 8px;
    font-size: 12px;
    color: #999;
}

/* Course Grid */
.courses {
    grid-column: 2;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.course-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.course-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video styles for course cards */
.course-video-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.course-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-button, .book-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.course-info {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.course-info h3 {
    font-size: 16px;
    margin: 0; /* remove bottom margin since layout is inline */
    color: #333;
    line-height: 1.4;
    flex: 1 1 auto; /* allow title to take remaining space */
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 14px;
}

.level {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
}

.views i {
    margin-right: 5px;
}

/* Recommendations */
.recommendations {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recommendations h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.recommended-courses {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommended-course {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.recommended-course:last-child {
    border-bottom: none;
}

.recommended-course:hover {
    transform: translateX(5px);
    background-color: #f8f9fa;
    border-radius: 8px;
    padding-left: 5px;
    padding-right: 5px;
}

.recommended-course-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.recommended-course-link:hover {
    text-decoration: none;
    color: inherit;
}

.recommended-course-link:hover .recommended-course {
    transform: translateX(5px);
    background-color: #f8f9fa;
    border-radius: 8px;
    padding-left: 5px;
    padding-right: 5px;
}

.icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.icon.book {
    background-color: #4cd964;
}

.icon.video {
    background-color: #ff3b30;
}

.icon.page {
    background-color: #3498db;
}

.icon.asset {
    background-color: #e74c3c;
}

.info h3 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
    flex: 1;
}

.info p {
    font-size: 12px;
    color: #999;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: #4cd964;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background-color: #3cc954;
    transform: scale(1.05);
}

.mobile-menu-toggle i {
    font-size: 18px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 180px 1fr;
    }
    
    .right-sidebar {
        display: none;
    }
    
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-sidebar {
        display: none;
    }
    
    .right-sidebar {
        display: none;
    }
    
    .courses {
        grid-column: 1;
        width: 100%;
    }
    
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile sidebar styles */
    .sidebar.mobile-active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
}

/* Dark Theme */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme header {
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .logo-container h1 {
    color: #e0e0e0;
}

body.dark-theme nav ul li a {
    color: #b0b0b0;
}

body.dark-theme nav ul li a:hover,
body.dark-theme nav ul li a.active {
    color: #e0e0e0;
}

body.dark-theme .search-bar input {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-theme .search-bar input::placeholder {
    color: #888;
}

body.dark-theme .search-bar i {
    color: #888;
}

body.dark-theme .theme-btn {
    border-color: #555;
    color: #b0b0b0;
}

body.dark-theme .theme-btn:hover {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-theme .language-selector {
    border-color: #555;
}

body.dark-theme .language-selector:hover {
    background-color: #3a3a3a;
    border-color: #666;
}

body.dark-theme .language-selector i {
    color: #b0b0b0;
}

body.dark-theme .language-select {
    color: #b0b0b0;
}

body.dark-theme .language-select option {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-theme .login-btn {
    border-color: #555;
    color: #b0b0b0;
}

body.dark-theme .login-btn:hover {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-theme .category-nav {
    background-color: #2d2d2d;
    border-bottom-color: #444;
}

body.dark-theme .category-nav ul li a {
    color: #b0b0b0;
}

body.dark-theme .category-nav ul li a:hover,
body.dark-theme .category-nav ul li a.active {
    background-color: #4cd964;
    color: white;
}

body.dark-theme .sidebar,
body.dark-theme .course-card,
body.dark-theme .recommendations {
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .sidebar h2,
body.dark-theme .recommendations h2 {
    color: #e0e0e0;
}

body.dark-theme .course-categories li {
    color: #b0b0b0;
    border-bottom-color: #444;
}

body.dark-theme .course-categories li:hover {
    color: #e0e0e0;
}

body.dark-theme .count {
    background-color: #3a3a3a;
    color: #888;
}

body.dark-theme .course-info h3 {
    color: #e0e0e0;
}

body.dark-theme .course-meta {
    color: #888;
}

body.dark-theme .level {
    background-color: #3a3a3a;
    color: #b0b0b0;
}

body.dark-theme .recommended-course {
    border-bottom-color: #444;
}

body.dark-theme .info h3 {
    color: #e0e0e0;
}

body.dark-theme .info p {
    color: #888;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        gap: 15px;
    }
    
    .search-login {
        width: 100%;
        justify-content: space-between;
    }
    
    main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        grid-row: 1;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .recommended-courses {
        grid-template-columns: 1fr;
    }
}

/* Video iframe mask and fullscreen modal styles */
.iframe-wrapper {
    position: relative;
    width: 100%;
    display: block;
    overflow: hidden;
    /* remove inline whitespace gaps under replaced elements */
    line-height: 0;
}

/* 16:9 aspect ratio for iframe cards */
.iframe-wrapper {
    /* using padding-bottom trick to keep aspect ratio */
    height: 0;
    padding-bottom: 56.25%; /* 9/16 = 0.5625 -> 56.25% */
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.iframe-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: transparent;
    z-index: 5;
    /* allow pointer events to pass through to enable button clicks */
    pointer-events: auto;
}

/* Course thumbnail styles */
.course-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
    transition: opacity 0.3s ease;
}

/* Centered play button on top of iframe */
.iframe-wrapper .center-play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; /* above mask */
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
}

/* ensure existing .play-overlay-btn is not duplicated for iframe cards */
.course-info .play-overlay-btn.iframe-hidden {
    display: none !important;
}

.course-info .play-overlay-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.course-info .play-overlay-btn {
    flex: 0 0 auto; /* don't grow, keep intrinsic size */
    margin-top: 0; /* align vertically center with title */
}

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.video-modal.active {
    display: flex;
}

.video-modal .modal-content {
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    max-height: 800px;
    background: #000;
    position: relative;
}

.video-modal .modal-content iframe {
    width: 100%;
    height: 100%;
}

.video-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2100;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Dark theme styles for language selector */
body.dark-theme #translate {
    border-color: #555;
}

body.dark-theme #translate:hover {
    background-color: #3a3a3a;
    border-color: #666;
}

body.dark-theme .language-selector i {
    color: #b0b0b0;
}

body.dark-theme .language-select {
    color: #b0b0b0;
}

body.dark-theme .language-select option {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-theme #translate select {
    color: #b0b0b0 !important;
}

body.dark-theme #translate select option {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        gap: 15px;
    }
    
    .search-login {
        width: 100%;
        justify-content: space-between;
    }
    
    main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        grid-row: 1;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .recommended-courses {
        grid-template-columns: 1fr;
    }
}
