/* ===== NLP TUTORIAL COURSE STYLES ===== */
/* Complete standalone CSS for NLP course functionality */

/* NLP Course Root Container */
.nlp-course {
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif);
    background: linear-gradient(135deg, #9cacf5 0%, #bc97fa 100%);
    min-height: 100vh;
    color: #1e293b;
}

.nlp-course-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Section */
.nlp-header {
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    width: 100%;
    max-width: 100%;
}

.nlp-header h1 {
    color: white !important;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    line-height: 1.1;
}

.nlp-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Progress Bar */
.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    margin-top: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-fill {
    background: white;
    height: 100%;
    width: 12.5%;
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Course Navigation - CRITICAL FOR TAB FUNCTIONALITY */
.course-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    width: 100%;
    max-width: 100%;
}

.nav-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 150ms ease-in-out;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 120px;
    text-align: center;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Section Content - CRITICAL FOR TAB FUNCTIONALITY */
.nlp-section {
    display: none;
    background: white;
    padding: 3rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.5s ease-in;
    width: 100%;
    max-width: 100%;
}

.nlp-section.active {
    display: block;
}

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

/* Typography within sections */
.nlp-section h2 {
    color: #667eea !important;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.nlp-section h3 {
    color: #764ba2 !important;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
}

.nlp-section h4 {
    color: #2d3748 !important;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.nlp-section p {
    color: #4a5568 !important;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.nlp-section ul,
.nlp-section ol {
    color: #4a5568 !important;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.nlp-section li {
    color: #4a5568 !important;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.nlp-section strong {
    color: #2d3748 !important;
    font-weight: 600;
}

/* Interactive Demos */
.interactive-demo {
    background: linear-gradient(135deg, #f8f9ff 0%, #e5e5f5 100%);
    border: 2px solid #667eea;
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.interactive-demo::before {
    content: "🧪 Interactive Demo";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.interactive-demo h4 {
    color: #667eea !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.demo-input,
.demo-input input,
.demo-input textarea,
.demo-input select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 150ms ease-in-out;
    background: white;
    color: #1e293b;
    font-family: inherit;
    box-sizing: border-box;
}

.demo-input:focus,
input.demo-input:focus,
textarea.demo-input:focus,
select.demo-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.demo-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 150ms ease-in-out;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    font-family: inherit;
}

.demo-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.demo-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.demo-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.demo-output {
    background: #eef2ff;
    border: 2px solid #c7d2fe;
    border-left: 5px solid #667eea;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Segoe UI Mono', monospace;
    color: #1e40af !important;
    white-space: pre-wrap;
    min-height: 50px;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Special Content Boxes */
.formula-box {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border: 2px solid #fb923c;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-weight: 600;
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Segoe UI Mono', monospace;
    color: #9a3412 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.example-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    color: #166534 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.example-box h4 {
    color: #166534 !important;
    margin-bottom: 1rem;
    font-weight: 600;
}

.example-box p,
.example-box ul,
.example-box li {
    color: #166534 !important;
}

/* Pros and Cons Grid */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.pros,
.cons {
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.pros {
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
    border-left: 5px solid #16a34a;
}

.cons {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-left: 5px solid #dc2626;
}

.pros h4 {
    color: #166534 !important;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.cons h4 {
    color: #991b1b !important;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.pros ul,
.pros li {
    color: #166534 !important;
}

.cons ul,
.cons li {
    color: #991b1b !important;
}

/* Architecture Diagrams */
.architecture-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
}

.layer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 150ms ease-in-out;
    min-width: 120px;
}

.layer:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.arrow {
    font-size: 1.8rem;
    color: #667eea;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quiz Components */
.quiz-container {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    position: relative;
}

.quiz-container::before {
    content: "🧠 Quick Quiz";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.quiz-question {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #92400e !important;
    font-size: 1.1rem;
    line-height: 1.5;
}

.quiz-option {
    background: white;
    border: 2px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 150ms ease-in-out;
    color: #92400e !important;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    box-sizing: border-box;
}

.quiz-option:hover {
    background: #fef3c7;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.quiz-option.correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
    font-weight: 600;
}

.quiz-option.incorrect {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
    font-weight: 600;
}

/* Attention Visualization */
.attention-visualization {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
}

.attention-word {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 150ms ease-in-out;
    border: 2px solid transparent;
    color: #1e293b;
    background: white;
    cursor: pointer;
}

.attention-word:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Back to Tutorials Link */
.back-to-tutorials {
    text-align: center;
    margin-bottom: 1.5rem;
}

.back-to-tutorials a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #9d99f1;
    text-decoration: none;
    font-weight: 500;
    transition: gap 150ms ease-in-out;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.back-to-tutorials a:hover {
    gap: 1rem;
    background: rgba(79, 70, 229, 0.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nlp-course-container {
        padding: 1rem;
    }
    
    .nlp-header {
        padding: 1.5rem;
    }
    
    .nlp-header h1 {
        font-size: 2rem;
    }
    
    .course-nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .nlp-section {
        padding: 1.5rem;
    }
    
    .nlp-section h2 {
        font-size: 1.8rem;
    }
    
    .nlp-section h3 {
        font-size: 1.4rem;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
    
    .architecture-diagram {
        flex-direction: column;
        gap: 1rem;
    }
    
    .attention-visualization {
        justify-content: center;
    }
    
    .interactive-demo {
        padding: 1rem;
    }
    
    .demo-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .nlp-course-container {
        padding: 0.5rem;
    }
    
    .nlp-section {
        padding: 1rem;
    }
    
    .interactive-demo {
        padding: 1rem;
    }
    
    .quiz-container {
        padding: 1rem;
    }
    
    .course-nav {
        padding: 0.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.nav-btn:focus,
.demo-btn:focus,
.quiz-option:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== PRINT STYLES ===== */
@media print {
    .nlp-course,
    .nlp-course-container {
        background: white !important;
    }
    
    .interactive-demo {
        background: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
    }
    
    .nav-btn {
        display: none !important;
    }
    
    .nlp-section {
        display: block !important;
        page-break-inside: avoid;
    }
}