/* Root Variables */
:root {
  --primary-color: #4a90e2;
  --secondary-color: #357abd;
  --accent-color: #9013fe;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --background-light: #f5f7fa;
  --background-dark: #1a1a1a;
  --card-bg-light: #ffffff;
  --card-bg-dark: #2c2c2c;
  --border-light: #e0e0e0;
  --border-dark: #4a4a4a;
  --transition-speed: 0.3s;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-dark: 0 2px 8px rgba(0, 0, 0, 0.2);
  --border-radius: 8px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

body.dark-mode {
    background-color: var(--background-dark);
    color: #e0e0e0;
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 40px;
    border-radius: 50%;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    position: relative;
}

.nav-links a:hover {
    color: #d1e3ff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width var(--transition-speed);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color var(--transition-speed);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: #fff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: all var(--transition-speed);
}

.category-nav-container {
    background: var(--card-bg-light);
    padding: 0.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed);
}

body.dark-mode .category-nav-container {
    background: var(--card-bg-dark);
}

.category-nav {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all var(--transition-speed);
    white-space: nowrap;
    border: 1px solid transparent;
}

.category-nav a:hover,
.category-nav a.category-active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

/* Main Layout */
main {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 1rem;
}

.sidebar {
    width: 300px;
    background: var(--card-bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

body.dark-mode .sidebar {
    background: var(--card-bg-dark);
    box-shadow: var(--shadow-dark);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

body.dark-mode .sidebar-header {
    border-bottom: 1px solid var(--border-dark);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

body.dark-mode .sidebar-header h2 {
    color: #e0e0e0;
}

.toggle-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.toggle-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.4);
}

.toggle-btn:active {
    transform: translateY(0);
}



.topic-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-speed);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topic-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
}

body.dark-mode .topic-header {
    background: #3a3a3a;
}

.topic-header:hover {
    background: #e6f0fa;
}

body.dark-mode .topic-header:hover {
    background: #4a4a4a;
}

.topic-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform var(--transition-speed);
}

.topic-item.active .topic-icon {
    transform: rotate(90deg);
}

.topic-title {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

body.dark-mode .topic-title {
    color: #e0e0e0;
}

.sections-list {
    list-style: none;
    padding-left: 2.5rem;
    display: none;
    margin-top: 0.5rem;
}

.sections-list.active {
    display: block;
    animation: fadeIn var(--transition-speed);
}

.section-item {
    margin: 0.75rem 0;
    position: relative;
}

.section-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.5;
}

.section-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-speed);
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.section-link:hover,
.section-link.active {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
    font-weight: 500;
    transform: translateX(4px);
}

.content {
    flex: 1;
    background: var(--card-bg-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

body.dark-mode .content {
    background: var(--card-bg-dark);
    box-shadow: var(--shadow-dark);
}

/* Welcome Section */
.welcome-message {
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(144, 19, 254, 0.05));
    margin-bottom: 2rem;
}

.welcome-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.shape {
    position: absolute;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 50%;
}

.shape1 {
    width: 200px;
    height: 200px;
    top: -50px;
    left: -50px;
}

.shape2 {
    width: 150px;
    height: 150px;
    bottom: -30px;
    right: -30px;
}

.shape3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.brand-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.welcome-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

body.dark-mode .welcome-subtitle {
    color: #b0b0b0;
}

.cta-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.cta-btn:active {
    transform: translateY(-1px);
}

.welcome-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .feature-card {
    background: #3a3a3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

.animated-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform var(--transition-speed);
}

.feature-card:hover .animated-icon {
    transform: scale(1.2);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

body.dark-mode .feature-card h3 {
    color: #e0e0e0;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

body.dark-mode .feature-card p {
    color: #b0b0b0;
}

/* Chatbot Styles */
.chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    transition: all var(--transition-speed);
    z-index: 1000;
    border: none;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
}

.chatbot-button:active {
    transform: scale(1.05);
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    background: var(--card-bg-light);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--transition-speed);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chatbot-container.active {
    display: flex;
    animation: fadeInUp 0.3s ease-out;
}

body.dark-mode .chatbot-container {
    background: var(--card-bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.chatbot-close {
    cursor: pointer;
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-speed);
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-btn-group {
    display: flex;
    gap: 0.5rem;
}

.header-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-speed);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--card-bg-light);
}

body.dark-mode .chat-messages {
    background: var(--card-bg-dark);
}

.message-with-avatar {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.bot-avatar, .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.bot-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

.user-avatar {
    background: #e0e0e0;
    color: var(--text-primary);
}

body.dark-mode .user-avatar {
    background: #4a4a4a;
    color: #e0e0e0;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
}

.bot-message {
    background: #f0f4f8;
    border-bottom-left-radius: 4px;
}

body.dark-mode .bot-message {
    background: #3a3a3a;
    color: #e0e0e0;
}

.user-message {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    background: var(--card-bg-light);
}

body.dark-mode .chat-input-container {
    border-top: 1px solid var(--border-dark);
    background: var(--card-bg-dark);
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 24px;
    margin-right: 0.5rem;
    font-size: 0.95rem;
    transition: all var(--transition-speed);
    background: var(--card-bg-light);
}

body.dark-mode .chat-input {
    background: #3a3a3a;
    border: 1px solid var(--border-dark);
    color: #e0e0e0;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.action-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-speed);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.secondary {
    background: #e0e0e0;
    color: #333;
}

body.dark-mode .secondary {
    background: #4a4a4a;
    color: #e0e0e0;
}

.emoji-panel {
    display: none;
    position: absolute;
    bottom: 60px;
    background: #fff;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .emoji-panel {
    background: #2c2c2c;
}

.emoji-panel.show {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.history-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.history-panel.show {
    transform: translateX(0);
}

body.dark-mode .history-panel {
    background: #2c2c2c;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

.overlay.show {
    display: block;
}

.disclaimer {
    background: #fff3cd;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.dark-mode .disclaimer {
    background: #4a4a4a;
}

/* Welcome Tour */
.welcome-tour {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.tour-container {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    text-align: center;
    position: relative;
}

body.dark-mode .tour-container {
    background: #2c2c2c;
}

.tour-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    cursor: pointer;
}

.tour-bot-image {
    width: 100px;
    margin-bottom: 1rem;
}

.tour-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tour-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

body.dark-mode .tour-message {
    color: #b0b0b0;
}

.tour-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tour-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-feature-icon {
    font-size: 1.2rem;
}

.tour-feature-text {
    font-size: 0.9rem;
}

.tour-button {
    background: #4a90e2;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.tour-button:hover {
    background: #357abd;
    transform: scale(1.05);
}

/* Video Modal */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.video-modal-container {
    background: var(--card-bg-light);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.3s ease-out;
}

body.dark-mode .video-modal-container {
    background: var(--card-bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-primary);
    background-color: #f3f4f6ff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-speed);
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.dark-mode .video-modal-close {
    color: #1d1c1cff;
}

body.dark-mode .video-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-modal-content {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.video-player-container {
    flex: 2;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.video-info {
    margin-top: 1.5rem;
}

.video-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

body.dark-mode .video-info h3 {
    color: #e0e0e0;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

body.dark-mode .video-meta {
    color: #b0b0b0;
}

.video-level {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

body.dark-mode .video-level {
    color: #b0b0b0;
    background: rgba(74, 144, 226, 0.2);
}

.video-action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.video-action-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

.video-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.video-action-btn:active {
    transform: translateY(0);
}

.video-list-sidebar {
    flex: 1;
    background: rgba(74, 144, 226, 0.05);
    padding: 1rem;
    border-radius: 12px;
    max-height: 500px;
    overflow-y: auto;
}

body.dark-mode .video-list-sidebar {
    background: rgba(74, 144, 226, 0.1);
}

.video-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-list-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .video-list-item {
    background: #3a3a3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-list-item:hover,
.video-list-item.active {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(4px);
    border-color: var(--primary-color);
}

body.dark-mode .video-list-item:hover,
body.dark-mode .video-list-item.active {
    background: rgba(74, 144, 226, 0.2);
}

.video-thumbnail {
    position: relative;
    width: 100px;
    height: 56px;
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.play-icon-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-list-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

body.dark-mode .video-list-info h5 {
    color: #e0e0e0;
}

.video-list-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

body.dark-mode .video-list-meta {
    color: #b0b0b0;
}

.no-videos-message,
.video-error-message {
    text-align: center;
    padding: 3rem 2rem;
}

.no-videos-message i,
.video-error-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-videos-message h3,
.video-error-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

body.dark-mode .no-videos-message h3,
body.dark-mode .video-error-message h3 {
    color: #e0e0e0;
}

.no-videos-message p,
.video-error-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

body.dark-mode .no-videos-message p,
body.dark-mode .video-error-message p {
    color: #b0b0b0;
}

.notes-container {
    margin-top: 1.5rem;
    background: rgba(74, 144, 226, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

body.dark-mode .notes-container {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.notes-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.notes-tab {
    background: var(--card-bg-light);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
    color: var(--text-secondary);
}

body.dark-mode .notes-tab {
    background: #3a3a3a;
    border: 1px solid var(--border-dark);
    color: #b0b0b0;
}

.notes-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

.notes-tab:hover:not(.active) {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.download-notes-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
    margin-left: auto;
}

.download-notes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.download-notes-btn:active {
    transform: translateY(0);
}

.notes-textarea {
    width: 100%;
    height: 250px;
    resize: vertical;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--card-bg-light);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    transition: all var(--transition-speed);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

body.dark-mode .notes-textarea {
    background: #3a3a3a;
    border: 1px solid var(--border-dark);
    color: #e0e0e0;
}

.drawing-canvas {
    width: 100%;
    height: 250px;
    background: var(--card-bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

body.dark-mode .drawing-canvas {
    background: #3a3a3a;
    border: 1px solid var(--border-dark);
}

.drawing-tools {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.color-picker:hover {
    transform: scale(1.1);
}

.brush-size-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

body.dark-mode .brush-size-container {
    background: #3a3a3a;
    border: 1px solid var(--border-dark);
}

.brush-size-slider {
    width: 120px;
}

.clear-canvas-btn {
    background: #e0e0e0;
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
}

body.dark-mode .clear-canvas-btn {
    background: #4a4a4a;
    color: #e0e0e0;
}

.clear-canvas-btn:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

body.dark-mode .clear-canvas-btn:hover {
    background: #5a5a5a;
}

/* Responsive Design */
/* @media (max-width: 1200px) {
    .navbar {
        padding: 1rem;
    }
    
    .welcome-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .video-modal-content {
        flex-direction: column;
    }
    
    .video-list-sidebar {
        max-height: 200px;
    }
} */

@media (max-width: 1024px) {
    main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .chatbot-container {
        width: 90%;
        right: 5%;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0.75rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin-top: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .welcome-title {
        font-size: 1.8rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }

    .welcome-content {
        grid-template-columns: 1fr;
    }

    .chatbot-container {
        width: 95%;
        bottom: 80px;
        right: 2.5%;
    }
    
    .video-modal-content {
        flex-direction: column;
    }
    
    .video-list-sidebar {
        max-height: 150px;
    }
    
    .notes-header {
        flex-direction: column;
    }
    
    .download-notes-btn {
        align-self: flex-start;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0.5rem;
    }

    .logo span {
        font-size: 1.2rem;
    }
    
    .logo img {
        height: 32px;
    }

    .category-nav-container {
        padding: 0.5rem 1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .cta-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }

    .chatbot-container {
        width: 100%;
        right: 0;
        border-radius: 12px 12px 0 0;
        bottom: 0;
    }
    
    .chatbot-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .video-modal-container {
        width: 95%;
        padding: 1rem;
    }
    
    .video-info h3 {
        font-size: 1.2rem;
    }
    
    .notes-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .download-notes-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInAlert {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-pop {
    animation: pop 0.3s ease-in-out;
}

.animate-card {
    animation: slideUp 0.5s ease-out;
    animation-delay: calc(0.1s * var(--i));
}

/* Enhanced Dark Mode Implementation */
.dark-mode {
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --card-bg-light: #2c2c2c;
    --card-bg-dark: #1a1a1a;
    --border-light: #4a4a4a;
    --border-dark: #3a3a3a;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-dark: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Fix for Safari backdrop-filter */
.video-modal-overlay {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Enhanced Emoji Panel */
.emoji-panel {
    background: var(--card-bg-light);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .emoji-panel {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.emoji-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: scale(1.1);
}

body.dark-mode .emoji-btn:hover {
    background: rgba(74, 144, 226, 0.2);
}

/* Enhanced History Panel */
.history-panel {
    background: var(--card-bg-light);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .history-panel {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Enhanced Disclaimer */
.disclaimer {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
}

body.dark-mode .disclaimer {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #fff3cd;
}

/* Enhanced Welcome Tour */
.tour-container {
    background: var(--card-bg-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
}

body.dark-mode .tour-container {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.tour-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.tour-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}
.tour-button:active {
    transform: translateY(-1px);
}

/* Enhanced Dark Mode for All Components */
body.dark-mode .shape {
    background: rgba(74, 144, 226, 0.2);
}

body.dark-mode .cta-btn {
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

body.dark-mode .cta-btn:hover {
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
}

body.dark-mode .topic-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .section-item::before {
    background: var(--primary-color);
    opacity: 0.7;
}

body.dark-mode .section-link:hover,
body.dark-mode .section-link.active {
    background: rgba(74, 144, 226, 0.2);
}

body.dark-mode .welcome-message {
    background: rgba(74, 144, 226, 0.1);
}

.topics-list {
    list-style: none !important;
}

/* Section Buttons */
.section-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.section-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.section-button:active {
    transform: translateY(0);
}

.exam-button {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.exam-button:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.video-button {
    background: linear-gradient(135deg, #4834d4, #686de0);
    box-shadow: 0 2px 6px rgba(72, 52, 212, 0.3);
}

.video-button:hover {
    box-shadow: 0 4px 12px rgba(72, 52, 212, 0.4);
}

.section-content-wrapper {
    margin-top: 1rem;
}


@media (max-width: 993px) {
  .main {
    display: block;
  }
}



.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row;
}


.navbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    position: relative;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
}

.nav-btn:hover {
    color: #007bff;
}

.dropdown-menu, .dropdown, .profile-menu {
    display: none;
    position: absolute;
    top: 100%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1000;
}

.dropdown-menu.active, .dropdown.active, .profile-menu.active {
    display: block;
}

.notification-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.notification-item.unread {
    background: #f0f8ff;
}

.notification-icon {
    margin-right: 10px;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
}

.ripple {
    position: absolute;
    background: rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: ripple 1s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.filter-btn {
    padding: 5px 10px;
    margin: 0 5px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
}

.filter-btn.active {
    background: #007bff;
    color: #fff;
}

.dark-mode {
    background: #1a1a1a;
    color: #fff;
}

.dark-mode .navbar {
    background: #2c2c2c;
}

.dark-mode .dropdown-menu, .dark-mode .dropdown, .dark-mode .profile-menu {
    background: #2c2c2c;
    color: #fff;
}

.nav-container{
  padding: 20px 50px;
}




