/* Enhanced PDF Viewer Styles */
.pdf-viewer-header {
    @apply py-4 mb-8 rounded-b-3xl shadow-xl relative overflow-hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    border-bottom: 4px solid #ff0000;
}

.pdf-viewer-header::after {
    content: '';
    @apply absolute inset-0 opacity-5;
    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='%23ff0000' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Header Styles */
.navbar-brand {
    @apply flex items-center gap-4 transition-all duration-300 hover:opacity-90;
}

.navbar-brand img {
    height: 80px !important;
    width: auto;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover img {
    transform: scale(1.05) rotate(-3deg);
}

.brand-text {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ff0000, #ff4d4d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    padding: 0;
}

.pdf-viewer-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

/* Navigation Buttons */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
    z-index: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ff0000;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff0000;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff0000, #ff4d4d);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Active State */
.nav-link.active {
    background: linear-gradient(45deg, #ff0000, #ff4d4d);
    color: white;
    border-color: #ff0000;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

/* Button Group */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        margin-top: 1rem;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.8rem 1.5rem;
    }
    
    .nav-buttons {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 1rem;
    }
    
    .brand-text {
        font-size: 2.2rem;
    }
    
    .navbar-brand img {
        height: 65px !important;
    }
}

/* Modern Button Styles */
.btn {
    position: relative;
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 8px;
    overflow: hidden;
    z-index: 1;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Back to Tools Button */
.btn-back-to-tools {
    background: white;
    color: #f000 !important;
    border: 2px solid #f000;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-back-to-tools::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(240, 0, 0, 0.1);
    transition: all 0.4s ease;
    z-index: -1;
    opacity: 0;
}

.btn-back-to-tools:hover {
    background: rgba(240, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-back-to-tools:hover::before {
    left: 0;
    opacity: 1;
}

/* Back to Chapter Button */
.btn-back-to-chapter {
    background: linear-gradient(45deg, #2d3748, #4a5568);
    color: white !important;
    border: 2px solid #2d3748;
}

.btn-back-to-chapter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #4a5568, #2d3748);
    transition: all 0.6s ease;
    z-index: -1;
    opacity: 0;
}

.btn-back-to-chapter:hover::before {
    left: 0;
    opacity: 1;
}

/* Hover Effects for All Buttons */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: white !important;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Interactive Buttons in Tools Section */
.tool-btn {
    background: linear-gradient(45deg, #ff0000, #ff6b6b);
    color: white !important;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
    display: inline-block;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tool-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ff0000);
    z-index: -1;
    transition: all 0.3s ease;
    transform: scaleX(0);
    transform-origin: right;
}

.tool-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Button Group Styling */
.btn-group {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
    display: inline-flex;
}

.btn-group .btn {
    margin: 0;
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group .btn:first-child {
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    border-right: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
        margin: 0.3rem;
    }
    
    .btn-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        border-radius: 8px;
    }
    
    .btn-group .btn {
        flex: 1;
        min-width: 120px;
        margin: 2px;
        border-radius: 6px !important;
    }
}

.breadcrumb-custom {
    background: rgba(255,255,255,0.15);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.breadcrumb-custom .breadcrumb-item a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb-custom .breadcrumb-item a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.breadcrumb-custom .breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

.pdf-container {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 800px;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}

.tools-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: calc(100vh - 200px);
    min-height: 800px;
    overflow-y: auto;
}

.content-area {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    height: calc(100vh - 200px);
    min-height: 800px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.content-area.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    border: none;
    padding: 2rem;
    background: white;
}

/* Hide header and language controls in fullscreen for distraction-free viewing */
.content-area.fullscreen .content-header {
    display: none;
}
.content-area.fullscreen #language-container,
.content-area.fullscreen #language-select {
    display: none;
}

.content-area.fullscreen .content-body {
    height: calc(100vh - 24px);
    overflow: auto;
}

.content-body {
    min-height: 300px;
}

.content-controls {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
    white-space: nowrap;
}

/* Ensure small, consistent sizing and spacing for controls */
.content-controls .btn,
.content-controls .dropdown > .btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.1;
    border-radius: 6px;
}

/* Override large margins from Bootstrap utilities to keep one line */
.content-controls .btn {
    margin-right: 0.25rem !important;
}
.content-controls .btn:last-child {
    margin-right: 0 !important;
}

/* Slightly smaller icons for compact look */
.content-controls .btn i {
    font-size: 0.85rem;
}

/* Unified red styling for action buttons (Back, Zoom) */
.content-controls .btn-danger {
    background-color: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.15);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.content-controls .btn-danger:hover,
.content-controls .btn-danger:focus {
    background-color: #cc0000;
    border-color: #cc0000;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.25);
}

/* Floating Back button for fullscreen mode */
.fullscreen-back-btn {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.1;
    border-radius: 6px;
    background-color: #F00000;
    border-color: #F00000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(240, 0, 0, 0.2);
}
.content-area.fullscreen .fullscreen-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fullscreen-back-btn:hover,
.fullscreen-back-btn:focus {
    background-color: #CC0000;
    border-color: #CC0000;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(240, 0, 0, 0.3);
}

/* Language dropdown: make toggle and menu entirely red-themed */
.content-controls #language-select .btn-outline-danger,
.content-controls #language-select .btn.dropdown-toggle {
    background-color: #ff0000;
    border-color: #ff0000;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.15);
}
.content-controls #language-select .btn-outline-danger:hover,
.content-controls #language-select .btn.dropdown-toggle:hover,
.content-controls #language-select .btn-outline-danger:focus,
.content-controls #language-select .btn.dropdown-toggle:focus {
    background-color: #cc0000;
    border-color: #cc0000;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.25);
}
.content-controls .btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(255, 0, 0, 0.25);
}

.content-controls #language-select .dropdown-menu {
    --bs-dropdown-link-color: #1f2937;
    --bs-dropdown-link-hover-color: #cc0000;
    --bs-dropdown-link-active-color: #cc0000;
    --bs-dropdown-link-hover-bg: rgba(255, 0, 0, 0.08);
    --bs-dropdown-link-active-bg: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.15);
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}
.content-controls #language-select .dropdown-item:hover,
.content-controls #language-select .dropdown-item:focus {
    color: #cc0000;
}
.content-controls #language-select .dropdown-item.active,
.content-controls #language-select .dropdown-item:active {
    color: #cc0000;
    background-color: rgba(255, 0, 0, 0.15);
}

/* Hide Google Translate 'Powered by' text and related elements */
.goog-logo-link,
.goog-te-gadget span,
.goog-te-gadget-simple,
.skiptranslate,
#google_translate_element,
#\:0\.container,
#\:0\.goog-te-gadget,
#\:0\.goog-te-gadget-simple,
#\:0\.goog-te-menu-value,
#\:0\.goog-te-menu-value span,
#\:0\.goog-te-menu-value span:first-child,
#\:0\.goog-te-menu-value span:last-child,
#\:0\.goog-te-gadget .goog-te-menu-value,
#\:0\.goog-te-gadget .goog-te-menu-value span,
#\:0\.goog-te-gadget .goog-te-menu-value span:first-child,
#\:0\.goog-te-gadget .goog-te-menu-value span:last-child,
#\:0\.goog-te-gadget-simple .goog-te-menu-value,
#\:0\.goog-te-gadget-simple .goog-te-menu-value span,
#\:0\.goog-te-gadget-simple .goog-te-menu-value span:first-child,
#\:0\.goog-te-gadget-simple .goog-te-menu-value span:last-child {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* Loading Animation Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.loading-subtext {
    color: #9ca3af;
    font-size: 0.8rem;
}

.content-display {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-text {
    line-height: 1.6;
    color: #374151;
}

.content-text h6,
.content-text h5,
.content-text h4,
.content-text h3,
.content-text h2,
.content-text h1,
.content-title,
.content-area h4,
.content-area h5,
.content-area h6,
.content-display h1,
.content-display h2,
.content-display h3,
.content-display h4,
.content-display h5,
.content-display h6 {
    color: #ff0000 !important;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 0, 0, 0.1);
}

/* Ensure all other headings are also red */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.card-title, .card-header,
.modal-title, .modal-header,
.accordion-button:not(.collapsed) {
    color: #ff0000 !important;
}

/* Adjust border colors for better visibility with red text */
.content-text h6,
.content-area h4,
.content-area h5,
.content-area h6 {
    border-bottom-color: rgba(255, 0, 0, 0.1);
}

.content-generation-area h5 {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.content-placeholder {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Interactive Learning Tools Section */
.tools-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: calc(100vh - 200px);
    min-height: 800px;
    overflow-y: auto;
    position: relative;
    overflow: hidden;
}

/* Layout override: adjust PDF vs Tools widths on large screens */
@media (min-width: 992px) {
    /* Scope to the specific row containing the PDF and Tools columns */
    .row.g-1.mb-0.align-items-stretch > .col-lg-8.order-lg-1.px-1.d-flex {
        flex: 0 0 55%;
        max-width: 55%;
    }
    .row.g-1.mb-0.align-items-stretch > .col-lg-4.order-lg-2.px-1.d-flex {
        flex: 0 0 45%;
        max-width: 45%;
    }
}

.tools-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #ff6b6b);
    z-index: 1;
}

.tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.tools-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ff0000;
    border-radius: 3px;
}

.tools-header h4 {
    color: #ff0000;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding: 0 15px;
}

.tools-header h4::before,
.tools-header h4::after {
    content: '✦';
    color: #ff0000;
    margin: 0 10px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.tools-header p {
    color: #666;
    margin: 0.5rem 0 0;
    font-size: 1rem;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.tool-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    margin-bottom: 1.25rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255,0,0,0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.1);
}

.tool-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.8rem;
    transition: all 0.5s ease;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%) !important;
    color: #ff0000 !important;
    box-shadow: 0 8px 16px rgba(255, 0, 0, 0.1), inset 0 2px 4px rgba(255,255,255,1);
    border: 1px solid rgba(255,255,255,0.5);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
    /* Removed background/color change to keep icon visible */
    box-shadow: 0 15px 30px rgba(255, 0, 0, 0.2);
}

.tool-card h6 {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    color: #444;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    padding-bottom: 25px; /* Space for hover badge */
}

.tool-card:hover h6 {
    color: #ff0000;
    transform: translateY(-2px);
}

.tool-hover {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: auto;
    min-width: 140px;
    padding: 0.5rem 1rem;
    background: white;
    color: #ff0000;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
    border: 1px solid rgba(255,0,0,0.1);
    white-space: nowrap;
}

.tool-card:hover .tool-hover {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tool-hover i {
    font-size: 0.9rem;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .tool-card {
        padding: 1.25rem 0.75rem;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .tools-header h4 {
        font-size: 1.5rem;
    }
}

/* Dark theme enhancements */
[data-theme="dark"] .pdf-viewer-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3748 100%);
}

[data-theme="dark"] .pdf-container {
    background: linear-gradient(145deg, #2d3748, #1a202c);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

[data-theme="dark"] .tools-container {
    background: linear-gradient(145deg, #2d3748, #1a202c);
}

[data-theme="dark"] .tool-card {
    background: linear-gradient(145deg, #374151, #2d3748);
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .tool-card h6 {
    color: #e2e8f0;
}

[data-theme="dark"] .tool-card:hover h6 {
    color: #ff6b7a;
}

[data-theme="dark"] .tools-header h4 {
    color: #e2e8f0;
}

[data-theme="dark"] .tool-hover {
    background: #ffcccc; /* Light red background for dark mode */
    color: #cc0000; /* Darker red text for contrast */
}

/* Custom scrollbar for tools container */
.tools-container::-webkit-scrollbar {
    width: 8px;
}

.tools-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.tools-container::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    border-radius: 10px;
}

.tools-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #c82333, #e8650e);
}

/* Interactive Keywords Styles */
.keyword-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.keyword-item:hover {
    background: #f0f0f0;
    border-color: #cccccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.keyword-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.keyword-text {
    font-weight: 600;
    color: #000000;
    margin: 0;
    display: flex;
    align-items: center;
}

.keyword-star {
    color: #ff9800;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.keyword-toggle {
    color: #666;
    transition: transform 0.3s ease;
}

.keyword-item.active .keyword-toggle {
    transform: rotate(180deg);
}

.keyword-summary {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid #e0e0e0;
    background: #ffffff;
    color: #000000;
    border-radius: 0 0 8px 8px;
    display: none;
    animation: slideDown 0.3s ease;
}

.keyword-summary.show {
    display: block;
}

.content-text {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Summary content formatting */
.main-heading {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff0000;
    margin: 1.5rem 0 1rem 0;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 0.5rem;
}

.sub-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin: 1rem 0 0.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid #ff0000;
}

/* ELI5 content formatting */
.eli5-heading {
    font-size: 1.2rem;
    font-weight: 600;
    color: #16a34a;
    margin: 1rem 0 0.75rem 0;
}

.eli5-bold {
    font-weight: bold;
    color: #374151;
}

/* Point-by-point content formatting */
.point-main-heading {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff0000;
    margin: 1.5rem 0 1rem 0;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 0.75rem;
}

.point-list {
    margin: 1.25rem 0;
    padding: 1.25rem 1.5rem;
    list-style: none;
    background: #fff5f5;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.point-bold-bullet {
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05em;
}

.point-bold-bullet::before {
    content: '★';
    color: #ff0000;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.05em;
    font-size: 1.2rem;
}

.point-normal-bullet {
    color: #555;
    margin: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
}

.point-normal-bullet::before {
    content: '★';
    color: #ff6b6b;
    position: absolute;
    left: 0;
    top: 0.18em;
    font-size: 0.9rem;
}

/* Quiz content formatting */
.quiz-question {
    background: #fff5f5;
    border-left: 4px solid #ff0000;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

/* Quiz explanation styles */
.quiz-explanation {
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: none;
    animation: slideDown 0.3s ease;
}

/* Q&A Content Formatting */
.qa-question {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.qa-question-text {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.qa-answer {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.75rem 0;
}

.qa-section-title {
    font-weight: bold;
    color: #495057;
    margin: 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #dee2e6;
}

.qa-content {
    padding: 0.75rem 0;
    line-height: 1.6;
    color: #374151;
}

/* ===== COMPLETELY INDEPENDENT CSS FOR 2/4/6 MARKS Q&A ONLY ===== */
.marks-qa-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    margin: 20px 0;
}

.marks-qa-question-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.marks-qa-question-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-size: 14px;
}

.marks-qa-question-text {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.5;
}

.marks-qa-answer-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
}

.marks-qa-section-header {
    background: #ffffff;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
}

.marks-qa-section-icon {
    margin-right: 8px;
    font-size: 16px;
}

.marks-qa-answer-header .marks-qa-section-icon { color: #10b981; }
.marks-qa-eli5-header .marks-qa-section-icon { color: #f59e0b; }
.marks-qa-example-header .marks-qa-section-icon { color: #ff0000; }
.marks-qa-application-header .marks-qa-section-icon { color: #8b5cf6; }

.marks-qa-section-content {
    padding: 18px;
    line-height: 1.7;
    color: #4b5563;
}

.marks-qa-bold-bullet-item {
    display: block;
    margin: 12px 0;
    padding-left: 30px;
    position: relative;
    font-weight: 700;
    color: #1f2937;
    font-size: 1.02em;
}

.marks-qa-bold-bullet-item::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 0;
    color: #fbbf24;
    font-size: 18px;
    font-weight: normal;
}

.marks-qa-normal-bullet-item {
    display: block;
    margin: 8px 0;
    padding-left: 30px;
    position: relative;
    color: #6b7280;
    line-height: 1.6;
}

.marks-qa-normal-bullet-item::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 0;
    color: #d1d5db;
    font-size: 16px;
}

.marks-qa-bold-inline {
    font-weight: 600;
    color: #374151;
}

.marks-qa-formula-display {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.1em;
}

.marks-qa-formula-inline {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Times New Roman', serif;
    font-size: 1.05em;
}
/* ===== END OF INDEPENDENT 2/4/6 MARKS Q&A STYLES ===== */

/* Formula and equation styles */
.formula-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.formula-inline {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* MathJax styling */
.MathJax {
    font-size: 1.1em !important;
}

.MathJax_Display {
    margin: 1rem 0 !important;
}

.quiz-explanation.show {
    display: block;
}

.explanation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #ff0000;
}

.explanation-content {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
}

.explanation-toggle {
    background: none;
    border: none;
    color: #ff0000;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.explanation-toggle:hover {
    background: rgba(239, 68, 68, 0.1);
    text-decoration: none;
}

.explanation-icon {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.explanation-toggle.active .explanation-icon {
    transform: rotate(180deg);
}

.question-number {
    color: #ff0000;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.question-text {
    color: #2c3e50;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background: #f1f3f4;
    border-color: #ff0000;
}

.option-letter {
    background: #ff0000;
    color: white;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.75rem;
    min-width: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.option-text {
    color: #495057;
    line-height: 1.4;
    flex: 1;
}

.correct-answer {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
    font-weight: 500;
}

.correct-answer i {
    color: #28a745;
    margin-right: 0.5rem;
}

.summary-content {
    color: #555;
    line-height: 1.6;
    padding-top: 0.75rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.keywords-container {
    max-height: 500px;
    overflow-y: auto;
}

.keywords-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.keywords-header h5 {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.keywords-header p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .pdf-viewer-title {
        font-size: 1.5rem;
    }
    
    .pdf-container,
    .tools-container {
        height: auto;
        min-height: 400px;
    }
    
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .keyword-header {
        padding: 0.75rem;
    }
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    color: var(--text-primary);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);
    display: none;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid var(--neutral-border);
    transition: box-shadow 0.3s ease, transform 0.2s ease, background 0.3s ease, border-color 0.3s ease;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100% - 120px);
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.18);
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.28);
}

.chatbot-header {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.chatbot-logo { display: none !important; }

.chatbot-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.chatbot-controls {
    display: flex;
    gap: 5px;
}

.chatbot-maximize,
.chatbot-close {
    background: none;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.chatbot-maximize:hover,
.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

.chatbot-container.maximized {
    width: calc(100vw - 60% - 40px);
    height: calc(100vh - 140px);
    right: 20px;
    bottom: 20px;
    top: 100px;
    max-width: none;
    box-shadow: var(--shadow-xl);
}

.message {
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

.message.user {
    text-align: right;
}

.message.bot {
    text-align: left;
}

.message-bubble {
    display: inline-block;
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.user .message-bubble {
    background: var(--gradient-primary);
    color: #fff;
}

.message.bot .message-bubble {
    background: var(--primary-bg);
    color: var(--text-primary);
    border: 1px solid var(--neutral-border);
}

.chatbot-input {
    position: sticky;
    bottom: 0;
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

.input-group {
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--neutral-border);
    border-radius: 28px;
    outline: none;
    font-size: 0.9rem;
    background: var(--primary-bg);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.chatbot-input input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.22);
}

.send-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.send-btn:hover {
    transform: translateY(-1px) scale(1.05);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 999;
}

.chatbot-toggle:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.34);
}

.typing-indicator {
    display: none;
    padding: 10px 15px;
    background: var(--primary-bg);
    border-radius: 18px;
    border: 1px solid var(--neutral-border);
    margin-bottom: 15px;
    max-width: 80%;
    width: fit-content;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.typing-indicator.show {
    display: block !important;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flashcard Styles */
.flashcard-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.flashcard-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-counter {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 20px auto;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
}

.flashcard-front {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.flashcard-back {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    transform: rotateY(180deg);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.flashcard-content {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 500;
}

.flashcard-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    opacity: 0.8;
}

.flashcard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}

.flashcard-btn {
    padding: 6px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 130px;
    text-align: center;
    background: white;
    color: #333;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-prev {
    /* Minimal specific styling */
}

.btn-prev:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: #f8f8f8;
    color: #000;
}

.btn-next {
    /* Minimal specific styling */
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: #f8f8f8;
    color: #000;
}

/* Dark Mode for Flashcard Buttons */
[data-theme="dark"] .flashcard-btn {
    background: black !important;
    background-color: black !important;
    color: white !important;
    border-color: #333;
    box-shadow: none;
}

[data-theme="dark"] .flashcard-btn:hover {
    background: #1a1a1a !important;
    border-color: #555;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Quiz Styles */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 30px;
}

.quiz-progress {
    background: #f3f4f6;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.quiz-progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
    height: 100%;
    transition: width 0.3s ease;
}

.question-counter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.question-counter {
    font-size: 1.1rem;
    color: #6b7280;
}

.difficulty-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-easy {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.difficulty-medium {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.difficulty-hard {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.quiz-question {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 25px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.quiz-option:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.quiz-option.selected {
    background: #fee2e2;
    border-color: #ff0000;
    color: #7f1d1d;
}

.quiz-option.correct {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.quiz-option.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.option-letter {
    background: #6b7280;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    font-size: 0.9rem;
}

.quiz-option.selected .option-letter {
    background: #ff0000;
}

.quiz-option.correct .option-letter {
    background: #10b981;
}

.quiz-option.incorrect .option-letter {
    background: #ef4444;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}

.quiz-btn {
    padding: 6px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 110px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-quiz-previous {
    /* Rely on base styles */
}

.btn-quiz-previous:hover {
    background: #f8f8f8;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-quiz-next {
    /* Rely on base styles */
}

.btn-quiz-next:hover {
    background: #f8f8f8;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Dark Mode for Quiz Buttons */
[data-theme="dark"] .quiz-btn {
    background: black !important;
    background-color: black !important;
    color: white !important;
    border-color: #333;
    box-shadow: none;
}

[data-theme="dark"] .quiz-btn:hover {
    background: #1a1a1a !important;
    border-color: #555;
}

/* Ensure Submit button keeps its distinct style */
.btn-quiz-submit {
    background: #10b981 !important; /* Force green */
    color: white !important;
    flex: 2;
    max-width: 200px;
    border: none;
}

.btn-quiz-submit:hover {
    background: #059669;
    transform: translateY(-2px);
}

.quiz-results {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.score-excellent {
    color: #10b981;
}

.score-good {
    color: #ff0000;
}

.score-average {
    color: #f59e0b;
}

.score-poor {
    color: #ef4444;
}

.score-message {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #4b5563;
}

.quiz-restart-btn {
    background: #ff0000;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-restart-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .quiz-question {
        padding: 20px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .quiz-option {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-btn {
        max-width: none;
        width: 100%;
    }
    
    .flashcard {
        height: 250px;
    }
    
    .flashcard-content {
        font-size: 1rem;
    }
    
    .flashcard-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .flashcard-btn {
        max-width: none;
        width: 100%;
    }
    
    .chatbot-container {
        width: calc(100vw - 40px);
        height: 400px;
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .chatbot-container.maximized {
        width: calc(100vw - 40px);
        height: calc(100vh - 200px);
        left: 10px;
        right: 10px;
        bottom: 10px;
        top: 120px;
    }
    
    .chatbot-toggle {
        bottom: 10px;
        right: 10px;
    }
}

/* Q&A Styles */
.qa-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.qa-header {
    margin-bottom: 30px;
}

.question-counter {
    background: linear-gradient(135deg, #ff0000 0%, #b91c1c 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.qa-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.qa-section {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 20px;
}

.qa-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.qa-label {
    color: #1f2937;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.qa-label strong {
    color: #dc2626;
}

.qa-text {
    color: #4b5563;
    line-height: 1.7;
    font-size: 1rem;
    padding-left: 10px;
    border-left: 3px solid #e5e7eb;
}

/* ===== BULLET STYLES FOR .qa-text SECTIONS ===== */
.qa-text .marks-qa-bold-bullet-item {
    display: block;
    margin: 12px 0;
    padding-left: 30px;
    position: relative;
    font-weight: 700;
    color: #1f2937;
    font-size: 1.02em;
}

.qa-text .marks-qa-bold-bullet-item::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 0;
    color: #fbbf24;
    font-size: 18px;
    font-weight: normal;
}

.qa-text .marks-qa-normal-bullet-item {
    display: block;
    margin: 8px 0;
    padding-left: 30px;
    position: relative;
    color: #6b7280;
    line-height: 1.6;
}

.qa-text .marks-qa-normal-bullet-item::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 0;
    color: #d1d5db;
    font-size: 16px;
}

.qa-text .marks-qa-bold-inline {
    font-weight: 600;
    color: #374151;
}

.qa-text .marks-qa-formula-display {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.1em;
}

.qa-text .marks-qa-formula-inline {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Times New Roman', serif;
    font-size: 1.05em;
}
/* ===== END BULLET STYLES FOR .qa-text SECTIONS ===== */

.qa-controls {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.qa-controls .btn {
    padding: 6px 16px;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.qa-controls .btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Dark Mode for Q&A Buttons */
[data-theme="dark"] .qa-controls .btn {
    background: black !important;
    background-color: black !important;
    color: white !important;
    border-color: #333;
}

.qa-controls .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile responsiveness for Q&A */
@media (max-width: 768px) {
    .qa-container {
        padding: 15px;
    }
    
    .qa-content {
        padding: 20px;
    }
    
    .qa-label {
        font-size: 1.1rem;
    }
    
    .qa-text {
        font-size: 0.95rem;
    }
    
    .qa-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .qa-controls .btn {
        width: 100%;
    }
}
/* PDF Viewer Styles */
