@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* Landing Demo Widget Styles */

/* Tab Navigation */
.demo-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.demo-tab {
    flex: 1;
    min-width: 120px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1rem;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.demo-tab:hover {
    background: #f9fafb;
    color: #374151;
}

.demo-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

/* Tab Content */
.demo-content {
    min-height: 400px;
}

.demo-panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.demo-panel.active {
    display: block;
}

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

/* Buttons */
.start-demo-btn,
.demo-panel button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-demo-btn:hover,
.demo-panel button:hover {
    transform: scale(1.05);
}

/* Reading Demo */
#reading-options button,
#vocab-options button {
    width: 100%;
    padding: 1rem;
    text-align: left;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #374151;
}

#reading-options button:hover,
#vocab-options button:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateX(4px);
}

#reading-options button.selected,
#vocab-options button.selected {
    border-color: #667eea;
    background: #eef2ff;
}

#reading-options button.correct,
#vocab-options button.correct {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}

#reading-options button.incorrect,
#vocab-options button.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

/* Feedback Messages */
#reading-feedback,
#grammar-feedback,
#vocab-feedback {
    animation: slideDown 0.3s ease-out;
}

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

.feedback-correct {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.feedback-incorrect {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.feedback-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* Grammar Input */
#grammar-answer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
}

#grammar-answer:focus {
    outline: none;
}

/* Essay Textarea */
#essay-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
}

#essay-text:focus {
    outline: none;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Progress Bar */
#grammar-progress-bar {
    transition: width 0.8s ease-out;
}

/* Results Cards */
#vocabulary-results .bg-green-50,
#vocabulary-results .bg-blue-50,
#vocabulary-results .bg-purple-50 {
    transition: transform 0.3s ease;
}

#vocabulary-results .bg-green-50:hover,
#vocabulary-results .bg-blue-50:hover,
#vocabulary-results .bg-purple-50:hover {
    transform: scale(1.05);
}

/* Rubric Scores */
#essay-results .bg-blue-50,
#essay-results .bg-green-50,
#essay-results .bg-purple-50,
#essay-results .bg-indigo-50 {
    transition: transform 0.3s ease;
}

#essay-results .bg-blue-50:hover,
#essay-results .bg-green-50:hover,
#essay-results .bg-purple-50:hover,
#essay-results .bg-indigo-50:hover {
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .demo-tab {
        flex: 1 1 50%;
        min-width: 50%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .demo-tab span:first-child {
        font-size: 1.25rem;
    }

    .demo-content {
        padding: 1rem;
        min-height: 350px;
    }

    #reading-options button,
    #vocab-options button {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    #essay-results .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .demo-tab {
        flex: 1 1 100%;
        min-width: 100%;
    }

    #essay-input-area .flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    #grade-essay-btn {
        width: 100%;
    }
}

/* Accessibility */
.demo-tab:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

