/* BrightIQ Tutor Chat Pro - Modern Frontend Styles */

:root {
    --brightiq-primary: #7C3AED;
    --brightiq-secondary: #EC4899;
    --brightiq-gradient: linear-gradient(135deg, var(--brightiq-primary) 0%, var(--brightiq-secondary) 100%);
    --brightiq-bg-light: #FFFFFF;
    --brightiq-bg-dark: #1F2937;
    --brightiq-surface-light: #F9FAFB;
    --brightiq-surface-dark: #111827;
    --brightiq-text-light: #1F2937;
    --brightiq-text-dark: #F3F4F6;
    --brightiq-border-light: #D1D5DB;
    --brightiq-border-dark: #4B5563;
    --brightiq-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --brightiq-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Widget Container */
.brightiq-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Toggle Button */
.brightiq-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--brightiq-gradient);
    border: none;
    cursor: pointer;
    box-shadow: var(--brightiq-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.brightiq-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--brightiq-shadow-lg);
}

.brightiq-toggle-btn svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.brightiq-toggle-btn .brightiq-icon-close {
    display: none;
    position: absolute;
}

.brightiq-widget.open .brightiq-toggle-btn .brightiq-icon-chat {
    display: none;
}

.brightiq-widget.open .brightiq-toggle-btn .brightiq-icon-close {
    display: block;
}

/* Chat Container */
.brightiq-chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 650px;
    max-height: calc(100vh - 120px);
    background: var(--brightiq-bg-light);
    border-radius: 16px;
    box-shadow: var(--brightiq-shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brightiq-widget.open .brightiq-chat-container {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Dark Mode */
.brightiq-chat-container.dark-mode {
    background: var(--brightiq-bg-dark);
    color: var(--brightiq-text-dark);
}

/* Persona Selection Screen */
.brightiq-persona-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.brightiq-header {
    padding: 24px;
    text-align: center;
    background: var(--brightiq-gradient);
    color: white;
}

.brightiq-logo {
    width: 80px;
    height: auto;
    margin-bottom: 12px;
}

.brightiq-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
}

.brightiq-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.brightiq-persona-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    align-content: start;
}

.brightiq-persona-card {
    background: var(--brightiq-surface-light);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dark-mode .brightiq-persona-card {
    background: var(--brightiq-surface-dark);
}

.brightiq-persona-card:hover {
    transform: translateY(-4px);
    border-color: var(--brightiq-primary);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.2);
}

.brightiq-persona-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.brightiq-persona-card:hover .brightiq-persona-avatar {
    border-color: var(--brightiq-primary);
    transform: scale(1.1);
}

.brightiq-persona-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--brightiq-text-light);
    margin: 0;
    line-height: 1.2;
}

.dark-mode .brightiq-persona-name {
    color: var(--brightiq-text-dark);
}

/* Chat Screen */
.brightiq-chat-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brightiq-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--brightiq-gradient);
    color: white;
}

.brightiq-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.brightiq-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.brightiq-back-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.brightiq-chat-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brightiq-current-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.brightiq-chat-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.brightiq-chat-header-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.brightiq-header-actions {
    display: flex;
    gap: 8px;
}

.brightiq-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.brightiq-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.brightiq-icon-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.brightiq-icon-sun {
    display: none;
}

.dark-mode .brightiq-icon-sun {
    display: block;
}

.dark-mode .brightiq-icon-moon {
    display: none;
}

/* Messages Area */
.brightiq-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--brightiq-surface-light);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dark-mode .brightiq-messages {
    background: var(--brightiq-surface-dark);
}

.brightiq-message {
    display: flex;
    gap: 12px;
    animation: messageSlideIn 0.3s ease;
}

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

.brightiq-message.user {
    flex-direction: row-reverse;
}

.brightiq-message-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.brightiq-message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.brightiq-message.user .brightiq-message-avatar {
    background: var(--brightiq-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.brightiq-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--brightiq-bg-light);
    color: var(--brightiq-text-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark-mode .brightiq-message-content {
    background: var(--brightiq-bg-dark);
    color: var(--brightiq-text-dark);
}

.brightiq-message.user .brightiq-message-content {
    background: var(--brightiq-gradient);
    color: white;
}

.brightiq-message-content p {
    margin: 0 0 8px 0;
    line-height: 1.5;
    font-size: 14px;
}

.brightiq-message-content p:last-child {
    margin-bottom: 0;
}

.brightiq-message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}

.dark-mode .brightiq-message-content pre {
    background: rgba(0, 0, 0, 0.3);
}

.brightiq-message-content code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
}

.brightiq-message-content :not(pre) > code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.dark-mode .brightiq-message-content :not(pre) > code {
    background: rgba(0, 0, 0, 0.3);
}

.brightiq-welcome-message {
    display: flex;
    gap: 12px;
}

.brightiq-welcome-message .brightiq-message-content {
    background: var(--brightiq-gradient);
    color: white;
}

/* Typing Indicator */
.brightiq-typing {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    animation: messageSlideIn 0.3s ease;
}

.brightiq-typing-dots {
    background: var(--brightiq-bg-light);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark-mode .brightiq-typing-dots {
    background: var(--brightiq-bg-dark);
}

.brightiq-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brightiq-primary);
    animation: typingBounce 1.4s infinite;
}

.brightiq-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.brightiq-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Input Area */
.brightiq-input-area {
    padding: 16px;
    background: var(--brightiq-bg-light);
    border-top: 1px solid var(--brightiq-border-light);
}

.dark-mode .brightiq-input-area {
    background: var(--brightiq-bg-dark);
    border-top-color: var(--brightiq-border-dark);
}

#brightiq-chat-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.brightiq-message-input {
    flex: 1;
    border: 2px solid var(--brightiq-border-light);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    background: var(--brightiq-surface-light);
    color: var(--brightiq-text-light);
    transition: all 0.2s ease;
}

.dark-mode .brightiq-message-input {
    background: var(--brightiq-surface-dark);
    color: var(--brightiq-text-dark);
    border-color: var(--brightiq-border-dark);
}

.brightiq-message-input:focus {
    outline: none;
    border-color: var(--brightiq-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.brightiq-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brightiq-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.brightiq-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.brightiq-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.brightiq-send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Scrollbar Styling */
.brightiq-messages::-webkit-scrollbar,
.brightiq-persona-grid::-webkit-scrollbar {
    width: 6px;
}

.brightiq-messages::-webkit-scrollbar-track,
.brightiq-persona-grid::-webkit-scrollbar-track {
    background: transparent;
}

.brightiq-messages::-webkit-scrollbar-thumb,
.brightiq-persona-grid::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

.brightiq-messages::-webkit-scrollbar-thumb:hover,
.brightiq-persona-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .brightiq-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .brightiq-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: -10px;
    }
    
    .brightiq-persona-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

/* Loading State */
.brightiq-loading {
    pointer-events: none;
    opacity: 0.6;
}




/* ========================================
   FULLSCREEN MODE STYLES
   ======================================== */

.brightiq-fullscreen {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--brightiq-surface-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.brightiq-fullscreen.dark-mode {
    background: var(--brightiq-surface-dark);
    color: var(--brightiq-text-dark);
}

/* Persona Selection Screen - Fullscreen */
.brightiq-persona-screen-fs {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.brightiq-header-fs {
    padding: 48px 24px;
    text-align: center;
    background: var(--brightiq-gradient);
    color: white;
}

.brightiq-logo-fs {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
}

.brightiq-header-fs h1 {
    margin: 0 0 12px 0;
    font-size: 36px;
    font-weight: 700;
}

.brightiq-header-fs p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

.brightiq-persona-grid-fs {
    flex: 1;
    overflow-y: auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    align-content: start;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.brightiq-persona-card-fs {
    background: var(--brightiq-surface-light);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dark-mode .brightiq-persona-card-fs {
    background: var(--brightiq-bg-dark);
}

.brightiq-persona-card-fs:hover {
    transform: translateY(-8px);
    border-color: var(--brightiq-primary);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.3);
}

.brightiq-persona-avatar-fs {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    transition: all 0.3s ease;
}

.brightiq-persona-card-fs:hover .brightiq-persona-avatar-fs {
    border-color: var(--brightiq-primary);
    transform: scale(1.1);
}

.brightiq-persona-name-fs {
    font-size: 16px;
    font-weight: 600;
    color: var(--brightiq-text-light);
    margin: 0;
    line-height: 1.3;
}

.dark-mode .brightiq-persona-name-fs {
    color: var(--brightiq-text-dark);
}

/* Chat Screen - Fullscreen */
.brightiq-chat-screen-fs {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brightiq-chat-header-fs {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--brightiq-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.brightiq-back-btn-fs {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.brightiq-back-btn-fs:hover {
    background: rgba(255, 255, 255, 0.3);
}

.brightiq-back-btn-fs svg {
    width: 24px;
    height: 24px;
    color: white;
}

.brightiq-chat-header-info-fs {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brightiq-current-avatar-fs {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.brightiq-chat-header-info-fs h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.brightiq-chat-header-info-fs p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.brightiq-header-actions-fs {
    display: flex;
    gap: 12px;
}

.brightiq-icon-btn-fs {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.brightiq-icon-btn-fs:hover {
    background: rgba(255, 255, 255, 0.3);
}

.brightiq-icon-btn-fs svg {
    width: 20px;
    height: 20px;
    color: white;
}

.brightiq-icon-sun-fs {
    display: none;
}

.dark-mode .brightiq-icon-sun-fs {
    display: block;
}

.dark-mode .brightiq-icon-moon-fs {
    display: none;
}

/* Messages Area - Fullscreen */
.brightiq-messages-fs {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--brightiq-surface-light);
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.dark-mode .brightiq-messages-fs {
    background: var(--brightiq-surface-dark);
}

.brightiq-message-fs {
    display: flex;
    gap: 16px;
    animation: messageSlideIn 0.3s ease;
}

.brightiq-message-fs.user {
    flex-direction: row-reverse;
}

.brightiq-message-avatar-fs {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.brightiq-message-avatar-fs img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.brightiq-message-fs.user .brightiq-message-avatar-fs {
    background: var(--brightiq-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.brightiq-message-content-fs {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--brightiq-bg-light);
    color: var(--brightiq-text-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    line-height: 1.6;
}

.dark-mode .brightiq-message-content-fs {
    background: var(--brightiq-bg-dark);
    color: var(--brightiq-text-dark);
}

.brightiq-message-fs.user .brightiq-message-content-fs {
    background: var(--brightiq-gradient);
    color: white;
}

.brightiq-message-content-fs p {
    margin: 0 0 12px 0;
}

.brightiq-message-content-fs p:last-child {
    margin-bottom: 0;
}

.brightiq-welcome-message-fs {
    display: flex;
    gap: 16px;
}

.brightiq-welcome-message-fs .brightiq-message-content-fs {
    background: var(--brightiq-gradient);
    color: white;
}

/* Typing Indicator - Fullscreen */
.brightiq-typing-fs {
    display: flex;
    gap: 16px;
    padding: 0 32px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    animation: messageSlideIn 0.3s ease;
}

.brightiq-typing-dots-fs {
    background: var(--brightiq-bg-light);
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dark-mode .brightiq-typing-dots-fs {
    background: var(--brightiq-bg-dark);
}

.brightiq-typing-dots-fs span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brightiq-primary);
    animation: typingBounce 1.4s infinite;
}

.brightiq-typing-dots-fs span:nth-child(2) {
    animation-delay: 0.2s;
}

.brightiq-typing-dots-fs span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Input Area - Fullscreen */
.brightiq-input-area-fs {
    padding: 24px 32px;
    background: var(--brightiq-bg-light);
    border-top: 1px solid var(--brightiq-border-light);
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.dark-mode .brightiq-input-area-fs {
    background: var(--brightiq-bg-dark);
    border-top-color: var(--brightiq-border-dark);
}

#brightiq-chat-form-fs {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.brightiq-message-input-fs {
    flex: 1;
    border: 2px solid var(--brightiq-border-light);
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    max-height: 150px;
    background: var(--brightiq-surface-light);
    color: var(--brightiq-text-light);
    transition: all 0.2s ease;
}

.dark-mode .brightiq-message-input-fs {
    background: var(--brightiq-surface-dark);
    color: var(--brightiq-text-dark);
    border-color: var(--brightiq-border-dark);
}

.brightiq-message-input-fs:focus {
    outline: none;
    border-color: var(--brightiq-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.brightiq-send-btn-fs {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--brightiq-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.brightiq-send-btn-fs:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.brightiq-send-btn-fs:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.brightiq-send-btn-fs svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Mobile Responsive - Fullscreen */
@media (max-width: 768px) {
    .brightiq-header-fs h1 {
        font-size: 28px;
    }
    
    .brightiq-persona-grid-fs {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 24px 16px;
        gap: 16px;
    }
    
    .brightiq-persona-avatar-fs {
        width: 80px;
        height: 80px;
    }
    
    .brightiq-messages-fs {
        padding: 20px 16px;
    }
    
    .brightiq-input-area-fs {
        padding: 16px;
    }
    
    .brightiq-message-content-fs {
        max-width: 85%;
    }
}




/* ========================================
   QUIZ FEATURE STYLES
   ======================================== */

.brightiq-quiz-container {
    background: var(--brightiq-bg-light);
    border: 2px solid var(--brightiq-primary);
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
}

.dark-mode .brightiq-quiz-container {
    background: var(--brightiq-bg-dark);
}

.brightiq-quiz-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--brightiq-border-light);
}

.dark-mode .brightiq-quiz-header {
    border-bottom-color: var(--brightiq-border-dark);
}

.brightiq-quiz-icon {
    width: 40px;
    height: 40px;
    background: var(--brightiq-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.brightiq-quiz-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--brightiq-text-light);
}

.dark-mode .brightiq-quiz-title {
    color: var(--brightiq-text-dark);
}

.brightiq-quiz-question {
    margin-bottom: 20px;
}

.brightiq-question-number {
    display: inline-block;
    background: var(--brightiq-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.brightiq-question-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--brightiq-text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.dark-mode .brightiq-question-text {
    color: var(--brightiq-text-dark);
}

.brightiq-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brightiq-quiz-option {
    background: var(--brightiq-surface-light);
    border: 2px solid var(--brightiq-border-light);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark-mode .brightiq-quiz-option {
    background: var(--brightiq-surface-dark);
    border-color: var(--brightiq-border-dark);
}

.brightiq-quiz-option:hover {
    border-color: var(--brightiq-primary);
    background: rgba(124, 58, 237, 0.05);
}

.brightiq-quiz-option.selected {
    border-color: var(--brightiq-primary);
    background: rgba(124, 58, 237, 0.1);
}

.brightiq-quiz-option.correct {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.brightiq-quiz-option.incorrect {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.brightiq-option-letter {
    width: 32px;
    height: 32px;
    background: var(--brightiq-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.brightiq-option-text {
    flex: 1;
    color: var(--brightiq-text-light);
    font-size: 15px;
}

.dark-mode .brightiq-option-text {
    color: var(--brightiq-text-dark);
}

.brightiq-quiz-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--brightiq-border-light);
}

.dark-mode .brightiq-quiz-actions {
    border-top-color: var(--brightiq-border-dark);
}

.brightiq-quiz-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.brightiq-quiz-btn-primary {
    background: var(--brightiq-gradient);
    color: white;
}

.brightiq-quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

.brightiq-quiz-btn-secondary {
    background: var(--brightiq-surface-light);
    color: var(--brightiq-text-light);
    border: 2px solid var(--brightiq-border-light);
}

.dark-mode .brightiq-quiz-btn-secondary {
    background: var(--brightiq-surface-dark);
    color: var(--brightiq-text-dark);
    border-color: var(--brightiq-border-dark);
}

.brightiq-quiz-btn-secondary:hover {
    border-color: var(--brightiq-primary);
}

.brightiq-quiz-score {
    text-align: center;
    padding: 24px;
    background: var(--brightiq-gradient);
    color: white;
    border-radius: 12px;
    margin-top: 20px;
}

.brightiq-score-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.brightiq-score-text {
    font-size: 16px;
    opacity: 0.9;
}

/* ========================================
   ACTION BUTTONS STYLES
   ======================================== */

.brightiq-action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.brightiq-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid var(--brightiq-border-light);
    background: var(--brightiq-surface-light);
    color: var(--brightiq-text-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-mode .brightiq-action-btn {
    background: var(--brightiq-surface-dark);
    color: var(--brightiq-text-dark);
    border-color: var(--brightiq-border-dark);
}

.brightiq-action-btn:hover {
    border-color: var(--brightiq-primary);
    background: rgba(124, 58, 237, 0.05);
}

.brightiq-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   VOICE INPUT STYLES
   ======================================== */

.brightiq-voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brightiq-surface-light);
    border: 2px solid var(--brightiq-border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dark-mode .brightiq-voice-btn {
    background: var(--brightiq-surface-dark);
    border-color: var(--brightiq-border-dark);
}

.brightiq-voice-btn:hover {
    border-color: var(--brightiq-primary);
}

.brightiq-voice-btn.recording {
    background: #EF4444;
    border-color: #EF4444;
    animation: pulse 1.5s infinite;
}

.brightiq-voice-btn svg {
    width: 20px;
    height: 20px;
    color: var(--brightiq-text-light);
}

.dark-mode .brightiq-voice-btn svg {
    color: var(--brightiq-text-dark);
}

.brightiq-voice-btn.recording svg {
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   STUDY TIMER STYLES
   ======================================== */

.brightiq-timer-widget {
    position: fixed;
    bottom: 100px;
    right: 100px;
    background: var(--brightiq-bg-light);
    border: 2px solid var(--brightiq-primary);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--brightiq-shadow-lg);
    z-index: 999998;
    min-width: 200px;
}

.dark-mode .brightiq-timer-widget {
    background: var(--brightiq-bg-dark);
}

.brightiq-timer-display {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: var(--brightiq-text-light);
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.dark-mode .brightiq-timer-display {
    color: var(--brightiq-text-dark);
}

.brightiq-timer-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.brightiq-timer-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--brightiq-gradient);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.brightiq-timer-btn:hover {
    transform: translateY(-2px);
}

/* ========================================
   BOOKMARK STYLES
   ======================================== */

.brightiq-bookmark-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.brightiq-message-content:hover .brightiq-bookmark-btn {
    opacity: 1;
}

.brightiq-bookmark-btn.bookmarked {
    opacity: 1;
    background: #F59E0B;
}

.brightiq-bookmark-btn svg {
    width: 14px;
    height: 14px;
    color: var(--brightiq-text-light);
}

.brightiq-bookmark-btn.bookmarked svg {
    color: white;
    fill: white;
}

/* ========================================
   HINT SYSTEM STYLES
   ======================================== */

.brightiq-hint-container {
    background: rgba(124, 58, 237, 0.05);
    border-left: 4px solid var(--brightiq-primary);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

.brightiq-hint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--brightiq-primary);
    font-weight: 600;
    font-size: 14px;
}

.brightiq-hint-text {
    color: var(--brightiq-text-light);
    font-size: 14px;
    line-height: 1.6;
}

.dark-mode .brightiq-hint-text {
    color: var(--brightiq-text-dark);
}

/* ========================================
   IMPROVED READABILITY
   ======================================== */

.brightiq-message-content {
    position: relative;
}

.brightiq-message-content strong {
    color: var(--brightiq-text-light);
    font-weight: 700;
}

.dark-mode .brightiq-message-content strong {
    color: var(--brightiq-text-dark);
}

.brightiq-message-content a {
    color: var(--brightiq-primary);
    text-decoration: underline;
    font-weight: 600;
}

.brightiq-message-content a:hover {
    color: var(--brightiq-secondary);
}

/* Better contrast for code blocks */
.brightiq-message-content pre {
    background: #1F2937;
    color: #F3F4F6;
}

.dark-mode .brightiq-message-content pre {
    background: #0F172A;
    color: #E5E7EB;
}

/* Better list styling */
.brightiq-message-content ul,
.brightiq-message-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.brightiq-message-content li {
    margin: 6px 0;
    line-height: 1.6;
}

