 :root {
     /* Updated primary colors to use the purple palette */
     --primary: #907ad6;
     --primary-light: #dabfff;
     --primary-dark: #4f518c;
     --secondary: #7fdeff;
     --accent: #dabfff;
     --success: #10b981;
     --warning: #f59e0b;
     --error: #ef4444;

     /* Updated background colors to use darker purples from palette */
     --bg-primary: #2c2a4a;
     --bg-secondary: #4f518c;
     --bg-tertiary: #907ad6;
     --bg-glass: rgba(218, 191, 255, 0.05);
     --bg-glass-strong: rgba(218, 191, 255, 0.1);
     --bg-hamburger: rgba(218, 191, 255, 0.493);

     --text-primary: #ffffff;
     --text-secondary: #dabfff;
     --text-muted: #907ad6;

     /* Updated borders to use light purple tones */
     --border: rgba(218, 191, 255, 0.1);
     --border-strong: rgba(218, 191, 255, 0.2);

     --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
     --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
     --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
     --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
     /* Updated glow shadow to use primary purple */
     --shadow-glow: 0 0 20px rgba(144, 122, 214, 0.3);

     --radius-sm: 8px;
     --radius-md: 12px;
     --radius-lg: 16px;
     --radius-xl: 24px;
     --radius-2xl: 32px;
 }

 [data-theme="light"] {
     /* Updated light theme backgrounds to use lighter palette colors */
     --bg-primary: #ffffff;
     --bg-secondary: #dabfff;
     --bg-tertiary: #907ad6;
     --bg-glass: rgba(144, 122, 214, 0.02);
     --bg-glass-strong: rgba(144, 122, 214, 0.05);

     /* Updated light theme text colors for better contrast */
     --text-primary: #2c2a4a;
     --text-secondary: #4f518c;
     --text-muted: #907ad6;

     /* Updated light theme borders */
     --border: rgba(79, 81, 140, 0.1);
     --border-strong: rgba(79, 81, 140, 0.15);
 }


 /* Remove blue highlight on tap in mobile browsers */
 button,
 a {
     -webkit-tap-highlight-color: transparent;
     -webkit-user-select: none;
     /* prevent accidental text selection */
     -moz-user-select: none;
     -ms-user-select: none;
     user-select: none;
     outline: none;
     /* removes focus outline */
 }


 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     font-family: 'Inter', sans-serif;
     background: var(--bg-primary);
     color: var(--text-primary);
     min-height: 100vh;
     position: relative;
     overflow-x: hidden;
 }

 /* Added animated background elements */
 body::before,
 body::after {
     content: '';
     position: fixed;
     border-radius: 50%;
     pointer-events: none;
     z-index: -1;
 }

 body::before {
     width: 300px;
     height: 300px;
     background: radial-gradient(circle, var(--light-purple) 0%, transparent 70%);
     top: -150px;
     right: -150px;
     animation: floatShapes 20s ease-in-out infinite;
     opacity: 0.8;
 }

 body::after {
     width: 250px;
     height: 250px;
     background: radial-gradient(circle, var(--primary-purple) 0%, transparent 70%);
     bottom: -125px;
     left: -125px;
     animation: floatCircle 25s ease-in-out infinite reverse;
     opacity: 0.7;
 }

 h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
     font-family: "Poppins", sans-serif;
     font-weight: 600;
     line-height: 1.2;
     color: var(--text-primary);
 }

 .container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 0 var(--container-padding);
 }

 /* Navigation */
 .navbar {
     position: fixed;
     top: 24px;
     left: 50%;
     transform: translateX(-50%);
     z-index: 1000;
     width: calc(100% - 48px);
     max-width: 1200px;
 }

 .nav-container {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 16px 32px;
     background: var(--bg-glass-strong);
     backdrop-filter: blur(30px);
     border: 1px solid var(--border);
     border-radius: var(--radius-2xl);
     box-shadow: var(--shadow-lg);
 }

 .nav-links {
     display: flex;
     list-style: none;
     gap: 32px;
 }

 .nav-links a {
     color: var(--text-secondary);
     text-decoration: none;
     font-weight: 500;
     transition: all 0.3s ease;
     position: relative;
 }

 .nav-links a:hover {
     color: var(--primary);
 }

 .nav-links a::after {
     content: "";
     position: absolute;
     bottom: -4px;
     left: 0;
     width: 0;
     height: 2px;
     background: var(--primary);
     transition: width 0.3s ease;
 }

 .nav-links a:hover::after {
     width: 100%;
 }

 .nav-actions {
     display: flex;
     align-items: center;
     gap: 16px;
 }

 .theme-toggle {
     width: 44px;
     height: 44px;
     border: none;
     background: var(--bg-glass);
     border: 1px solid var(--border);
     border-radius: var(--radius-md);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.25rem;
     transition: all 0.3s ease;
 }

 .theme-toggle:hover {
     background: var(--bg-glass-strong);
     transform: scale(1.05);
 }

 .user-profile {
     width: 44px;
     height: 44px;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     border-radius: var(--radius-md);
     display: flex;
     align-items: center;
     justify-content: center;
     color: white;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s ease;
 }

 .user-profile:hover {
     transform: scale(1.05);
     box-shadow: var(--shadow-glow);
 }

 .hamburger {
     display: none;
     flex-direction: column;
     justify-content: center;
     gap: 6px;
     width: 40px;
     height: 40px;
     background: var(--bg-glass);
     border: 1px solid var(--border);
     border-radius: var(--radius-md);
     cursor: pointer;
     padding: 8px;
 }

 .hamburger span {
     height: 3px;
     width: 100%;
     background: var(--text-primary);
     border-radius: 2px;
     transition: all 0.3s ease;
 }

 /* Hamburger open state animation */
 .hamburger.open span:nth-child(1) {
     transform: rotate(45deg) translate(6px, 6px);
 }

 .hamburger.open span:nth-child(2) {
     opacity: 0;
 }

 .hamburger.open span:nth-child(3) {
     transform: rotate(-45deg) translate(6px, -6px);
 }

 .logo {
     display: flex;
     align-items: center;
     gap: 12px;
     font-size: 1.5rem;
     font-weight: 800;
     color: var(--text-primary);
     text-decoration: none;
     font-family: "Playfair Display", serif;
 }

 .logo-icon {
     width: 40px;
     height: 40px;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     border-radius: var(--radius-md);
     display: flex;
     align-items: center;
     justify-content: center;
     color: white;
     font-weight: 900;
 }

 @media (max-width: 884px) {
     .hamburger {
         display: flex;
     }

     .nav-links {
         position: absolute;
         top: 70px;
         left: 0;
         width: 100%;
         color: var(--text-primary);
         background: var(--bg-primary);
         backdrop-filter: blur(20px);
         border: 1px solid var(--border);
         border-radius: var(--radius-xl);
         flex-direction: column;
         align-items: center;
         gap: 16px;
         padding: 20px;
         display: none;
     }

     .nav-links.active {
         display: flex;
         animation: fadeInUp 0.3s ease forwards;
     }

     .nav-group {
         display: flex;
         align-items: center;
         align-content: center;
         gap: 16px;
     }

     .nav-links {
         display: none;
     }

     .navbar {
         top: 16px;
         width: calc(100% - 32px);
     }

     .nav-container {
         padding: 12px 24px;
     }
 }

 @media(max-width: 361px) {
     .nav-actions {
         scale: 0.8
     }

     .hamburger {
         scale: 0.8;
     }

     .nav-group {
         gap: 0px;
     }
 }



 .brand-icon {
     font-size: 2rem;
 }



 .theme-toggle {
     background: var(--surface);
     border: 1px solid var(--border);
     border-radius: 50%;
     width: 40px;
     height: 40px;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: var(--transition);
     font-size: 1.2rem;
 }

 .theme-toggle:hover {
     background: var(--primary);
     color: white;
     transform: scale(1.1);
 }

 /* Subject Header */
 .subject-header {
     padding: 120px 0 60px;
     background: var(--bg-glass);
     color: var(--text-primary);
     position: relative;
     overflow: hidden;
 }

 .subject-header::before {
     content: "";
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
     opacity: 0.3;
 }

 .subject-header-content {
     position: relative;
     z-index: 1;
     text-align: center;
 }

 .subject-icon-large {
     font-size: 4rem;
     margin-bottom: 1rem;
     display: block;
 }

 .subject-title {
     font-size: 3rem;
     font-weight: 800;
     margin-bottom: 1rem;
 }

 .subject-description {
     font-size: 1.25rem;
     opacity: 0.9;
     margin-bottom: 2rem;
     max-width: 600px;
     margin-left: auto;
     margin-right: auto;
 }

 .subject-stats {
     display: flex;
     justify-content: center;
     gap: 3rem;
     margin-bottom: 2rem;
 }

 .stat-item {
     text-align: center;
 }

 .stat-number {
     font-size: 2rem;
     font-weight: 700;
     display: block;
 }

 .stat-label {
     font-size: 0.875rem;
     opacity: 0.8;
 }

 /* Voice Control */
 .voice-control {
     background: rgba(255, 255, 255, 0.1);
     backdrop-filter: blur(10px);
     border-radius: var(--radius-xl);
     padding: 2rem;
     max-width: 400px;
     margin: 0 auto;
 }

 .voice-btn {
     display: flex;
     align-items: center;
     gap: 0.5rem;
     background: rgba(255, 255, 255, 0.2);
     border: none;
     color: white;
     padding: 1rem 2rem;
     border-radius: 2rem;
     cursor: pointer;
     font-weight: 600;
     transition: var(--transition);
     width: 100%;
     justify-content: center;
     font-size: 1rem;
 }

 .voice-btn:hover {
     background: rgba(255, 255, 255, 0.3);
     transform: translateY(-2px);
 }

 .voice-output {
     margin-top: 1rem;
     padding: 1rem;
     background: rgba(255, 255, 255, 0.1);
     border-radius: var(--radius);
     font-size: 0.9rem;
     text-align: center;
     min-height: 50px;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 /* Topics Section */
 .topics-section {
     padding: var(--section-padding);
 }

 .section-header {
     text-align: center;
     margin-bottom: 4rem;
 }

 .section-header h2 {
     font-size: 2.5rem;
     font-weight: 700;
     margin-bottom: 1rem;
 }

 .section-header p {
     font-size: 1.25rem;
     color: var(--text-secondary);
 }

 .topics-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     gap: 2rem;
 }

 .topic-card {
     background: var(--bg-glass);
     backdrop-filter: var(--blur);
     border: 1px solid var(--border-color);
     border-radius: 20px;
     padding: 2rem;
     transition: all 0.3s ease;
     position: relative;
     overflow: hidden;
 }

 .topic-card::before {
     content: "";
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 4px;
     background: var(--gradient-bio);
     transform: scaleX(0);
     transition: transform 0.3s ease;
 }

 .topic-card:hover::before {
     transform: scaleX(1);
 }

 .topic-card:hover {
     transform: translateY(-5px);
     box-shadow: var(--shadow-lg);
     border-color: var(--bio-light);
 }

 .topic-header {
     display: flex;
     align-items: center;
     gap: 1rem;
     margin-bottom: 1.5rem;
 }

 .topic-icon {
     width: 60px;
     height: 60px;
     background: var(--gradient-bio);
     border-radius: var(--radius-lg);
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.5rem;
     color: white;
 }

 .topic-info h3 {
     font-size: 1.25rem;
     margin-bottom: 0.25rem;
 }

 .topic-duration {
     font-size: 0.875rem;
     color: var(--text-secondary);
 }

 .topic-description {
     color: var(--text-secondary);
     line-height: 1.6;
     margin-bottom: 1.5rem;
 }

 .topic-actions {
     display: flex;
     gap: 1rem;
 }

 .play-btn {
     flex: 1;
     background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
     border: none;
     border-radius: 12px;
     padding: 0.75rem 1.5rem;
     color: var(--text-primary);
     font-weight: 600;
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 0.5rem;
     justify-content: center;
     transition: all 0.3s ease;
     position: relative;
     overflow: hidden;
 }

 .play-btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 15px 40px rgba(140, 122, 203, 0.4);
 }

 .bookmark-btn {
     background: var(--surface);
     border: 1px solid var(--border);
     border-radius: var(--radius-lg);
     width: 44px;
     height: 44px;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: var(--transition);
     font-size: 1.2rem;
 }

 .bookmark-btn:hover {
     background: var(--bio-primary);
     color: white;
     border-color: var(--bio-primary);
 }

 /* Progress Indicator */
 .progress-indicator {
     position: absolute;
     top: 1rem;
     right: 1rem;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: var(--bio-primary);
     color: white;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.875rem;
     font-weight: 600;
 }

 /* AI Chatbot Styles */
 .ai-chatbot {
     position: fixed;
     bottom: 2rem;
     left: 2rem;
     width: 400px;
     height: 600px;
     background: var(--bg-primary);
     border: 1px solid var(--border);
     border-radius: var(--radius-xl);
     box-shadow: var(--shadow-xl);
     z-index: 1001;
     display: flex;
     flex-direction: column;
     transform: translateY(100%);
     opacity: 0;
     transition: var(--transition);
     pointer-events: none;
 }

 .ai-chatbot.active {
     transform: translateY(0);
     opacity: 1;
     pointer-events: all;
 }

 .ai-chatbot.minimized .chatbot-content {
     display: none;
 }

 .ai-chatbot.minimized {
     height: auto;
 }

 .chatbot-header {
     display: flex;
     align-items: center;
     gap: 1rem;
     padding: 1rem;
     border-bottom: 1px solid var(--border);
     background: var(--bg-primary);
     color: var(--text-primary);
     border-radius: var(--radius-xl) var(--radius-xl) 0 0;
 }

 .chatbot-avatar {
     width: 40px;
     height: 40px;
     background: var(--bg-secondary);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.2rem;
 }

 .chatbot-info {
     flex: 1;
 }

 .chatbot-info h4 {
     font-size: 1rem;
     margin-bottom: 0.25rem;
     color: var(--text-primary);
 }

 .chatbot-status {
     font-size: 0.8rem;
     opacity: 0.8;
     margin: 0;
 }

 .chatbot-controls {
     display: flex;
     gap: 0.5rem;
 }

 .chatbot-voice-btn,
 .chatbot-minimize {
     background: var(--bg-secondary);
     border: none;
     border-radius: 50%;
     width: 32px;
     height: 32px;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: var(--transition);
     color: var(--text-primary);
 }

 .chatbot-voice-btn:hover,
 .chatbot-minimize:hover {
     background: var(--bg-secondary);
     transform: scale(1.1);
 }

 .chatbot-voice-btn.active {
     background: var(--bg-secondary);
     animation: pulse 2s infinite;
 }

 .chatbot-content {
     display: flex;
     flex-direction: column;
     height: 100%;
     overflow: hidden;
 }

 .chat-messages {
     flex: 1;
     overflow-y: auto;
     padding: 1rem;
     display: flex;
     flex-direction: column;
     gap: 1rem;
 }

 .message {
     display: flex;
     gap: 0.75rem;
     max-width: 85%;
 }

 .ai-message {
     align-self: flex-start;
 }

 .user-message {
     align-self: flex-end;
     flex-direction: row-reverse;
 }

 .message-avatar {
     width: 32px;
     height: 32px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1rem;
     flex-shrink: 0;
 }

 .ai-message .message-avatar {
     background: var(--gradient-bio);
     color: var(--text-primary);
 }

 .user-message .message-avatar {
     background: var(--primary);
     color: var(--text-primary);
 }

 .message-content {
     background: var(--bg-secondary);
     padding: 0.75rem 1rem;
     border-radius: var(--radius-lg);
     position: relative;
 }

 .user-message .message-content {
     background: var(--primary);
     color: var(--text-primary);
 }

 .message-content p {
     margin: 0;
     line-height: 1.5;
     font-size: 0.9rem;
 }

 .message-actions {
     display: flex;
     gap: 0.5rem;
     margin-top: 0.5rem;
     opacity: 0;
     transition: var(--transition);
 }

 .message:hover .message-actions {
     opacity: 1;
 }

 .play-message-btn {
     background: none;
     border: none;
     cursor: pointer;
     padding: 0.25rem;
     border-radius: var(--radius-sm);
     transition: var(--transition);
     font-size: 0.8rem;
 }

 .play-message-btn:hover {
     background: var(--border);
 }

 .chat-input-container {
     padding: 1rem;
     border-top: 1px solid var(--border);
 }

 .chat-input-wrapper {
     display: flex;
     gap: 0.5rem;
     margin-bottom: 0.75rem;
 }

 .chat-input {
     flex: 1;
     padding: 0.75rem;
     border: 1px solid var(--border);
     border-radius: var(--radius-lg);
     background: var(--bg-secondary);
     color: var(--text-primary);
     font-size: 0.9rem;
     outline: none;
     transition: var(--transition);
 }

 .chat-input:focus {
     border-color: var(--bio-primary);
     box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
 }

 .chat-voice-input,
 .chat-send-btn {
     background: var(--bio-primary);
     border: none;
     border-radius: var(--radius-lg);
     width: 40px;
     height: 40px;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: var(--transition);
     color: var(--text-secondary);
 }

 .chat-voice-input:hover,
 .chat-send-btn:hover {
     background: var(--secondary);
     transform: scale(1.05);
 }

 .chat-voice-input.active {
     background: var(--error);
     animation: pulse 2s infinite;
 }

 .quick-questions {
     display: flex;
     flex-wrap: wrap;
     gap: 0.5rem;
 }

 .quick-question {
     background: var(--bg-tertiary);
     border: 1px solid var(--border);
     border-radius: 1rem;
     padding: 0.5rem 0.75rem;
     font-size: 0.8rem;
     cursor: pointer;
     transition: var(--transition);
     color: var(--text-secondary);
 }

 .quick-question:hover {
     background: var(--bio-primary);
     color: white;
     border-color: var(--bio-primary);
 }

 .chatbot-toggle-btn {
     position: fixed;
     bottom: 2rem;
     left: 2rem;
     width: 60px;
     height: 60px;
     background: var(--gradient-bio);
     border: none;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: var(--transition);
     box-shadow: var(--shadow-lg);
     z-index: 1000;
     color: var(--text-primary);
     font-size: 1.5rem;
 }

 .chatbot-toggle-btn:hover {
     transform: scale(1.1);
     box-shadow: var(--shadow-xl);
 }

 .chatbot-notification {
     position: absolute;
     top: -5px;
     right: -5px;
     background: var(--error);
     color: var(--text-primary);
     border-radius: 50%;
     width: 20px;
     height: 20px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.7rem;
     font-weight: 600;
 }

 .typing-indicator {
     display: flex;
     gap: 0.25rem;
     padding: 0.75rem 1rem;
 }

 .typing-dot {
     width: 8px;
     height: 8px;
     background: var(--text-secondary);
     border-radius: 50%;
     animation: typing 1.4s infinite ease-in-out;
 }

 .typing-dot:nth-child(2) {
     animation-delay: 0.2s;
 }

 .typing-dot:nth-child(3) {
     animation-delay: 0.4s;
 }

 @keyframes typing {

     0%,
     60%,
     100% {
         transform: translateY(0);
         opacity: 0.4;
     }

     30% {
         transform: translateY(-10px);
         opacity: 1;
     }
 }

 /* Mobile Responsive */
 @media (max-width: 768px) {
     .ai-chatbot {
         left: 1rem;
         right: 1rem;
         width: auto;
         bottom: 1rem;
     }

     .chatbot-toggle-btn {
         left: 1rem;
         bottom: 1rem;
     }

     .quick-questions {
         flex-direction: column;
     }

     .quick-question {
         text-align: center;
     }
 }

 /* Dark theme adjustments */
 [data-theme="dark"] .message-content {
     background: var(--bg-tertiary);
 }

 [data-theme="dark"] .chat-input {
     background: var(--bg-secondary);
 }

 [data-theme="dark"] .quick-question {
     background: var(--bg-tertiary);
 }

 .hdbtn {
     background: none;
     border: none;
     cursor: pointer;
 }


 /*Audio player*/
 .audio-player {
     position: fixed;
     bottom: 20px;
     right: 20px;
     background: var(--bg-secondary);
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
     border-radius: 12px;
     padding: 1rem;
     display: flex;
     color: var(--text-primary);
     flex-direction: column;
     gap: 0.5rem;
     width: 380px;
     z-index: 1000;
 }

 .top {
     display: flex;
     align-items: center;
     gap: 1rem;
 }

 .thumb {
     width: 50px;
     height: 50px;
     background: var(--bg-primary);
     border-radius: 8px;
     display: flex;
     justify-content: center;
     align-items: center;
 }

 .title-info {
     flex: 1;
 }

 .title-info h4 {
     margin: 0;
     font-size: 16px;
 }

 .title-info span {
     font-size: 13px;
     color: var(--text-secondary);
 }

 .controls {
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .controls button {
     background: none;
     border: none;
     cursor: pointer;
     padding: 0.4rem;
     font-size: 18px;
 }

 .controls .play {
     background: var(--bg-primary);
     color: var(--text-primary);
     border-radius: 50%;
     width: 40px;
     height: 40px;
 }

 .progress-bar,
 .volume-bar {
     -webkit-appearance: none;
     appearance: none;
     height: 4px;
     background: #ccc;
     border-radius: 2px;
 }

 .progress-container {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 0.3rem;
     flex-direction: row;
 }

 .time {
     font-size: 12px;
 }

 .volume-container {
     display: flex;
     align-items: center;
     gap: 0.3rem;
     flex: 1;
 }

 .close-btn {
     margin-left: auto;
     cursor: pointer;
     font-size: 18px;
 }

 .bookuliks {
     width: 50px;
     margin-top: 12px;
 }

 a {
     text-decoration: none;
 }

 /*PROFILE PIC*/
 .profile-dropdown {
     position: relative;
     display: inline-block;
 }

 .profile-button {
     width: 44px;
     height: 44px;
     background: linear-gradient(135deg, var(--primary), var(--secondary));
     border: none;
     border-radius: var(--radius-md);
     display: flex;
     align-items: center;
     justify-content: center;
     color: white;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s ease;
 }

 .dropdown-menu {
     display: none;
     position: absolute;
     right: 0;
     top: 50px;
     background: var(--bg-glass-strong);
     color: var(--text-primary);
     border: 1px solid #ddd;
     border-radius: 6px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
     min-width: 150px;
     z-index: 1000;
 }

 .dropdown-item {
     width: 100%;
     padding: 10px 15px;
     background: none;
     border: none;
     text-align: left;
     cursor: pointer;
     font-size: 0.95rem;
     color: var(--text-primary);
 }

 .dropdown-item:hover {
     background: var(--bg-glass);
 }

 /* =======================    Mobile Responsiveness    ======================= */
 @media (max-width: 768px) {

     /* Container and General Layout */
     .container {
         padding: 0 1rem;
     }

     .theme-toggle,
     .profile-button {
         margin-top: 0.5rem;
     }

     /* Subject Header */
     .subject-header {
         padding: 100px 1rem 40px;
         text-align: center;
     }

     .subject-icon-large {
         font-size: 3rem;
     }

     .subject-title {
         font-size: 2rem;
     }

     .subject-description {
         font-size: 1rem;
         margin-left: auto;
         margin-right: auto;
     }

     .subject-stats {
         flex-direction: column;
         gap: 1rem;
     }

     /* Topics Grid */
     .topics-grid {
         grid-template-columns: 1fr;
         gap: 1.5rem;
     }

     .topic-card {
         padding: 1.5rem;
     }

     .topic-header {
         flex-direction: column;
         align-items: flex-start;
     }

     .topic-icon {
         width: 50px;
         height: 50px;
         font-size: 1.25rem;
     }

     .topic-actions {
         flex-direction: column;
     }

     .play-btn,
     .bookmark-btn {
         width: 100%;
         justify-content: center;
     }

     /* Audio Player */
     .audio-player {
         bottom: 100px;
         right: 10px;
         width: calc(100% - 20px);
         max-width: 100%;
         padding: 1rem;
         flex-direction: column;
         align-items: stretch;
     }

     .progress-container {
         flex-direction: column;
         align-items: center;
         gap: 0.25rem;
         flex-direction: row;
     }

     .volume-container {
         flex-direction: row;
         width: 100%;
     }

     /* Chatbot */
     .ai-chatbot {
         width: 100%;
         max-width: 100%;
         left: 0;
         right: 0;
         bottom: 0;
         height: 80vh;
         border-radius: var(--radius-xl) var(--radius-xl) 0 0;
     }

     .chatbot-toggle-btn {
         bottom: 1rem;
         left: 1rem;
     }

     .chat-input-wrapper {
         flex-direction: column;
     }

     .chat-input,
     .chat-send-btn,
     .chat-voice-input {
         width: 100%;
     }

     .quick-questions {
         flex-direction: column;
     }

     /* Profile Dropdown */
     .dropdown-menu {
         right: auto;
         left: 0;
         position: static;
         background: none;
         box-shadow: none;
     }

     /* Typography tweaks */
     .section-header h2 {
         font-size: 1.75rem;
     }

     .section-header p {
         font-size: 1rem;
     }
 }