* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 60px);
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.beta-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 0.4em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: super;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(238, 90, 36, 0.3);
    animation: pulse-beta 2s infinite;
}

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

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.topic-selector {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #333;
    background-color: #f9f9f9;
    cursor: pointer;
}

select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.flashcard-container {
    text-align: center;
}

.flashcard {
    width: 100%;
    max-width: 600px;
    min-height: 250px;
    margin: 0 auto;
    perspective: 1000px;
    margin-bottom: 3rem;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    min-height: 250px;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    min-height: 250px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box;
}

.flashcard-front h2, .flashcard-back h2 {
    color: #3498db;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.flashcard-front p, .flashcard-back p {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    text-align: center;
}

.flashcard-back {
    transform: rotateY(180deg);
    background-color: #f1f9ff;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Make other buttons smaller to emphasize flip button */
.controls button:not(#flip-btn) {
    font-size: 0.9em;
    padding: 10px 20px;
}

#back-btn {
    background-color: #e74c3c;
}

#back-btn:hover {
    background-color: #c0392b;
}

.card-counter {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

#prev-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

#prev-btn:disabled:hover {
    background-color: #6c757d;
}

.flashcard-warning {
    margin-top: 15px;
    padding: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
    font-size: 0.9em;
    line-height: 1.4;
}

.flashcard-warning p {
    margin: 0;
}

.flashcard-warning strong {
    color: #d63031;
}

/* Prominent Flip Button Styling */
#flip-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    transform: scale(1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* SVG icon styling within flip button */
#flip-btn svg {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

#flip-btn:hover svg {
    transform: rotate(180deg);
}

#flip-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

#flip-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

#flip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#flip-btn:hover::before {
    left: 100%;
}

/* Flip button animation pulse effect */
@keyframes flipPulse {
    0% { box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(231, 76, 60, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3); }
}

#flip-btn {
    animation: flipPulse 2s infinite;
}

.progress {
    font-size: 1.1rem;
    font-weight: 500;
    color: #7f8c8d;
}

.disclaimer {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.disclaimer p {
    font-size: 0.8rem;
    color: #95a5a6;
    font-style: italic;
    line-height: 1.4;
}

/* Sticky Navigation Styles */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    padding: 0.8rem 0;
}

.sticky-nav.nav-visible {
    transform: translateY(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: #3498db;
}

.nav-logo {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.nav-demo {
    background-color: #e8f4fd;
    color: #3498db !important;
}

.nav-register {
    background-color: #3498db;
    color: white !important;
}

.nav-register:hover {
    background-color: #2980b9;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
}

.nav-mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    transition: 0.3s;
}

/* Access Notice Styles */
.access-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: center;
}

.access-notice p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

.access-link {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.access-link:hover {
    border-bottom-color: #0056b3;
}

/* Enhanced Demo Card Styles */
.demo-controls {
    margin-top: 1rem;
    text-align: center;
}

.demo-cycle-btn {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.demo-cycle-btn:hover {
    background-color: #138496;
}

/* Learning Journey Styles */
.learning-journey {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 15px;
    margin: 4rem 0;
    text-align: center;
}

.learning-journey h2 {
    margin-bottom: 3rem;
    font-size: 2.2rem;
    font-weight: 600;
}

.journey-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.step p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
}

.step-arrow {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

/* FAQ Styles */
.faq-section {
    background-color: white;
    padding: 4rem 2rem;
    border-radius: 15px;
    margin: 4rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 600;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.faq-item.faq-open .faq-question {
    background-color: #e8f4fd;
}

.faq-question h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    transition: transform 0.3s ease;
}

.faq-item.faq-open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: white;
}

.faq-item.faq-open .faq-answer {
    max-height: 200px;
    padding: 1.5rem;
}

.faq-answer p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.faq-answer a {
    color: #3498db;
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Exit Intent Modal Styles */
.exit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.exit-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.exit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.exit-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.exit-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #adb5bd;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.exit-modal-close:hover {
    background-color: #f8f9fa;
    color: #6c757d;
}

.exit-modal-body {
    padding: 2rem;
    text-align: center;
}

.exit-modal-body p {
    margin-bottom: 2rem;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
}

.exit-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.exit-modal-buttons .btn-primary,
.exit-modal-buttons .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.exit-modal-buttons .btn-primary {
    background-color: #3498db;
    color: white;
}

.exit-modal-buttons .btn-primary:hover {
    background-color: #2980b9;
}

.exit-modal-buttons .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.exit-modal-buttons .btn-secondary:hover {
    background-color: #5a6268;
}

/* Enhanced Button Styles */
.btn-tertiary {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.btn-tertiary:hover {
    background-color: #6c757d;
    color: white;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        gap: 0.5rem;
    }
    
    .nav-mobile-open .nav-links {
        display: flex;
    }
    
    .nav-mobile-toggle {
        display: flex;
    }
    
    .journey-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }
    
    .learning-journey {
        padding: 3rem 1rem;
    }
    
    .learning-journey h2 {
        font-size: 1.8rem;
    }
    
    .faq-section {
        padding: 3rem 1rem;
    }
    
    .faq-section h2 {
        font-size: 1.8rem;
    }
    
    .exit-modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .exit-modal-header,
    .exit-modal-body {
        padding: 1.5rem;
    }
    
    .exit-modal-buttons {
        flex-direction: column;
    }
    
    .sticky-nav {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}

/* Demo-specific styles */
.demo-notice {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.demo-banner {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.demo-notice p, .demo-banner p {
    margin: 0;
}

/* Demo Onboarding */
.demo-onboarding {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.onboarding-overlay {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.onboarding-step {
    display: none;
}

.onboarding-step.active {
    display: block;
}

.onboarding-step h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.onboarding-step p {
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.onboarding-step .btn-primary,
.onboarding-step .btn-secondary {
    margin: 0 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.onboarding-step .btn-primary {
    background: #3498db;
    color: white;
}

.onboarding-step .btn-secondary {
    background: #95a5a6;
    color: white;
}

/* Demo User Widget */
.demo-user-widget {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-size: 0.85rem;
    min-width: 200px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.demo-user-widget .user-info {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.demo-user-widget .flashcard-count,
.demo-user-widget .daily-limit {
    color: #555;
    margin-bottom: 0.3rem;
}

.demo-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.stat-item {
    font-size: 0.8rem;
    color: #666;
}

/* Demo Features Showcase */
.demo-features-showcase {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    text-align: center;
}

.demo-features-showcase h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.demo-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.demo-feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.demo-feature:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Demo Watermark */
.demo-watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Demo Comparison Table */
.demo-comparison {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.demo-comparison h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-row {
    display: contents;
}

.comparison-header {
    font-weight: 600;
    background: #3498db;
    color: white;
}

.comparison-feature,
.comparison-demo,
.comparison-full {
    padding: 1rem;
    background: white;
    text-align: center;
}

.comparison-demo {
    background: #fff3cd;
    color: #856404;
}

.comparison-full {
    background: #d4edda;
    color: #155724;
    font-weight: 500;
}

/* Demo CTA Overlay */
.demo-cta-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.demo-cta-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.demo-cta-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.demo-cta-content p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.demo-cta-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.benefit-item {
    color: #27ae60;
    font-size: 0.9rem;
}

.demo-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-cta-buttons .btn-primary,
.demo-cta-buttons .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.demo-cta-buttons .btn-primary {
    background: #3498db;
    color: white;
}

.demo-cta-buttons .btn-secondary {
    background: #95a5a6;
    color: white;
}

/* Chat message markdown formatting */
.chat-message .message-content {
    line-height: 1.5;
}

.chat-message .message-content p {
    margin: 0.5rem 0;
}

.chat-message .message-content p:first-child {
    margin-top: 0;
}

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

.chat-message .message-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.chat-message .message-content em {
    font-style: italic;
    color: #34495e;
}

.chat-message .message-content code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    padding: 2px 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.chat-message .message-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.chat-message .message-content a:hover {
    border-bottom-color: #3498db;
}

.chat-message .message-content ul,
.chat-message .message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.chat-message .message-content li {
    margin: 0.25rem 0;
}

.chat-message .message-content ul li {
    list-style-type: disc;
}

.chat-message .message-content ol li {
    list-style-type: decimal;
}

/* Special styling for AI messages */
.chat-message.ai .message-content strong {
    color: #3498db;
}

.chat-message.ai .message-content code {
    background-color: #e8f4fd;
    border-color: #3498db;
    color: #2980b9;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-message .message-content ul,
    .chat-message .message-content ol {
        padding-left: 1rem;
    }
    
    .chat-message .message-content code {
        font-size: 0.8em;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .demo-user-widget {
        top: 5px;
        right: 5px;
        padding: 0.8rem;
        font-size: 0.8rem;
        min-width: 180px;
    }
    
    .demo-stats {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .demo-features-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        grid-template-columns: 1fr;
    }
    
    .demo-cta-benefits {
        grid-template-columns: 1fr;
    }
    
    .demo-cta-buttons {
        flex-direction: column;
    }
}

.landing-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-header h1 .beta-tag {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    -webkit-text-fill-color: white;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.tagline {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 400;
}

.landing-main {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
    padding: 40px 0;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.btn-demo {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-demo:hover::before {
    left: 100%;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sample-flashcard {
    perspective: 1000px;
}

.flashcard-demo {
    width: 300px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
}

.flashcard-demo-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flashcard-demo.flipped .flashcard-demo-inner {
    transform: rotateY(180deg);
}

.flashcard-demo-front, .flashcard-demo-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    padding: 30px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.flashcard-demo-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.flashcard-demo-back {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    transform: rotateY(180deg);
}

.flashcard-demo-front h3, .flashcard-demo-back h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.flashcard-demo-front p, .flashcard-demo-back p {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.flip-hint {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 10px;
    font-style: italic;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.innovation-highlight {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.innovation-content h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.innovation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.innovation-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.innovation-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.innovation-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.innovation-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.innovation-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.features-section {
    margin-bottom: 80px;
    text-align: center;
}

/* Chat Showcase Section */
.chat-showcase-section {
    margin-bottom: 80px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 40px;
    border-radius: 20px;
}

.chat-showcase-section h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.section-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.chat-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
    justify-items: center;
}

.screenshot-container {
    text-align: center;
}

.phone-mockup {
    width: 280px;
    height: 500px;
    background: #1a1a1a;
    border-radius: 25px;
    padding: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #52a9de;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-title {
    font-size: 0.9rem;
}

.close-btn {
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-message {
    background: #e9ecef;
    padding: 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
}

.ai-message p {
    margin: 0;
    color: #333;
}

.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 3px solid #52a9de;
}

.suggestions-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 5px;
}

.suggestion-btn {
    background: #52a9de;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    align-self: flex-start;
    margin: 2px 0;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.suggestion-btn:hover {
    background: #4a96c4;
    transform: translateY(-1px);
}

.user-message {
    background: #dee2e6;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-style: italic;
    color: #6c757d;
    text-align: left;
    margin-top: 5px;
}

.chat-input {
    padding: 10px;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 0.8rem;
    outline: none;
}

.chat-input button {
    background: #52a9de;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.screenshot-caption {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.features-section h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 50px;
    color: #2c3e50;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
}

.subjects-section {
    margin-bottom: 80px;
    text-align: center;
}

.subjects-section h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: #2c3e50;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.subject-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.subject-item:hover {
    transform: scale(1.05);
}

.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 60px;
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-note {
    margin-top: 20px;
    font-size: 1rem;
    opacity: 0.8;
}

.link-primary {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

/* Responsive Design for Landing Page */
@media (max-width: 768px) {
    .landing-header h1 {
        font-size: 2.2rem;
    }
    
    .landing-header h1 .beta-tag {
        background: linear-gradient(135deg, #ff6b6b, #ee5a24);
        color: white;
        -webkit-text-fill-color: white;
        -webkit-background-clip: initial;
        background-clip: initial;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .flashcard-demo {
        width: 250px;
        height: 160px;
    }
    
    .flashcard-demo-front, .flashcard-demo-back {
        padding: 20px;
    }
    
    .flashcard-demo-front h3, .flashcard-demo-back h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .flashcard-demo-front p, .flashcard-demo-back p {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .flip-hint {
        font-size: 0.7rem;
        margin-top: 8px;
    }
    
    /* Chat Showcase Responsive */
    .chat-showcase-section {
        padding: 40px 20px;
        margin-bottom: 60px;
    }

    .chat-showcase-section h2 {
        font-size: 1.8rem;
    }

    .section-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .chat-screenshots {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 30px;
    }

    .phone-mockup {
        width: 250px;
        height: 450px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .cta-section {
        padding: 40px 20px;
    }
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #2c3e50;
    color: white;
    font-size: 0.9rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.easter-egg {
    color: #5a6c7d;
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85em;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ecf0f1;
    text-decoration: underline;
}

.footer-links span {
    color: #7f8c8d;
    margin: 0 5px;
}

/* Registration styles */
.registration-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.registration-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.registration-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.register-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.register-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
}

.register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #e7f3ff;
    color: #0066cc;
    border-left: 4px solid #0066cc;
}

/* Invite Status Styles */
.invite-status {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.invite-status.checking {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.invite-status.valid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.invite-status.invalid {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.login-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .registration-container {
        margin: 1rem auto;
    }
    
    .registration-form {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.login-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.loading-spinner {
    color: #666;
}

/* Register link */
.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link a {
    color: #007bff;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Responsive design for login */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 20px;
    }
    
    .login-description {
        font-size: 13px;
    }
}

/* Verification page styles */
.verify-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.verify-loading h1,
.verify-success h1,
.verify-error h1 {
    margin-bottom: 20px;
    color: #333;
}

.verify-loading p,
.verify-success p,
.verify-error p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.loading-spinner-large {
    font-size: 48px;
    margin: 20px 0;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.verify-success {
    color: #28a745;
}

.verify-success h1 {
    color: #28a745;
}

.verify-error {
    color: #dc3545;
}

.verify-error h1 {
    color: #dc3545;
}

.redirect-info {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.redirect-info a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.redirect-info a:hover {
    text-decoration: underline;
}

.error-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

/* Responsive design for verification */
@media (max-width: 480px) {
    .verify-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 250px;
    }
}

/* Chat Widget Styles */
    text-overflow: ellipsis;
}

.chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 188, 212, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.95);
    max-height: 350px;
    min-height: 200px;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.user {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.bot {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 10px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.1);
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

#chat-send {
    padding: 8px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    height: 36px;
    width: 36px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-send:hover {
    background-color: #2980b9;
}

.chat-loading {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7f8c8d;
    font-style: italic;
}

.chat-loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* User Info Widget Styles */
.user-info-widget {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.user-info-widget button {
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.user-info-widget button:hover {
    background: #c82333 !important;
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-widget {
        width: 100%;
        height: calc(100vh - 160px);
        max-height: 500px;
        bottom: 70px;
        right: 0;
        left: 0;
        border-radius: 10px 10px 0 0;
        margin: 0 10px;
        box-sizing: border-box;
    }
    
    /* Add top spacing for header to prevent overlap with logout widget */
    header {
        margin-top: 80px;
        margin-bottom: 2rem;
    }
    
    .container {
        padding-top: 1rem;
        padding-bottom: 100px;
    }
    
    footer {
        margin-bottom: 20px;
    }
    
    .chat-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .chat-messages {
        flex: 1;
        padding: 10px;
        overflow-y: auto;
        background-color: #f8f9fa;
        min-height: 0;
    }
    
    .chat-input-container {
        padding: 10px;
        border-top: 1px solid #e9ecef;
        display: flex !important;
        gap: 8px;
        background-color: white;
        flex-shrink: 0;
        min-height: 68px;
        box-sizing: border-box;
        width: 100%;
    }
    
    #chat-input {
        flex: 1;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        height: 44px;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
    }
    
    #chat-send {
        padding: 0 12px;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-family: 'Poppins', sans-serif;
        height: 36px;
        width: 36px;
        white-space: nowrap;
        flex-shrink: 0;
        box-sizing: border-box;
        font-size: 14px;
    }
    
    .container {
        padding: 1rem;
    }
    
    .flashcard {
        min-height: 200px;
    }
    
    .flashcard-inner {
        min-height: 200px;
    }
    
    .flashcard-front, .flashcard-back {
        min-height: 200px;
        padding: 1.5rem;
    }
    
    .flashcard-front p, .flashcard-back p {
        font-size: 1rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    /* Mobile flip button adjustments */
    #flip-btn {
        font-size: 1.1em;
        padding: 12px 25px;
        margin: 10px 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #flip-btn svg {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }
    
    .controls button:not(#flip-btn) {
        font-size: 0.85em;
        padding: 8px 16px;
    }
    
    button {
        width: 100%;
        max-width: 300px;
    }
}