/* Formal Language Theory CSS */

/* Hero Section */
.heroSection {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.heroSection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.2;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.heroContent {
    position: relative;
    z-index: 1;
}

.heroTitle {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.heroSubtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.heroBadges {
    margin: 30px 0;
}

.topicBadge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    margin: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.topicBadge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.badgeIcon {
    margin-right: 8px;
}

/* Breadcrumb Navigation */
.breadcrumbNavigation {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumbItem {
    display: inline-block;
}

.breadcrumbItem + .breadcrumbItem::before {
    content: ">";
    color: #6c757d;
    margin: 0 10px;
}

.breadcrumbItem a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbItem a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumbItem.active {
    color: #6c757d;
}

/* General Section Styles */
.introductionSection,
.chomskyHierarchySection,
.languageClassesSection,
.simulationsSection,
.relatedConceptsSection {
    padding: 80px 0;
}

.introductionSection {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.chomskyHierarchySection {
    background: white;
}

.languageClassesSection {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.simulationsSection {
    background: white;
}

.relatedConceptsSection {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Section Headers */
.sectionHeader {
    text-align: center;
    margin-bottom: 60px;
}

.sectionHeading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.sectionDescription {
    color: #7f8c8d;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Introduction Card */
.introductionCard {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.introductionCard:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.sectionHeading {
    color: #3498db;
    font-weight: 700;
    margin-bottom: 20px;
}

.sectionDescription {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #7f8c8d;
}

.sectionText {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.languageApplicationsList {
    margin-top: 20px;
    padding-left: 20px;
}

.languageApplicationsList li {
    margin-bottom: 10px;
}

/* Visualization Controls */
.visualizationControls {
    margin: 30px 0;
}

.controlPanel {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.controlGroup {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.controlGroup:last-child {
    margin-bottom: 0;
}

.controlLabel {
    font-weight: 600;
    color: #3498db;
    min-width: 150px;
}

.modeToggle,
.speedControl {
    display: flex;
    gap: 10px;
}

.modeButton,
.speedButton {
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #3498db;
    background: white;
    color: #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modeButton:hover:not(.active),
.speedButton:hover:not(.active) {
    background: #ebf5fb;
    transform: translateY(-2px);
}

.modeButton.active,
.speedButton.active {
    background: #3498db;
    color: white;
}

/* Hierarchy Visualization */
.hierarchyVisualizationContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.hierarchyDiagram {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.hierarchyDetails {
    flex: 0 0 350px;
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 500px;
}

.detailCard h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.detailCard p {
    color: #7f8c8d;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Language Cards */
.languageCard {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.languageCard:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.cardHeader {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 25px;
    display: flex;
    align-items: center;
}

.languageIcon {
    font-size: 2.5rem;
    margin-right: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.cardTitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.cardBody {
    padding: 25px;
}

.cardDescription {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.languageProperties {
    margin-bottom: 20px;
}

.propertyItem {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.propertyItem:last-child {
    border-bottom: none;
}

.propertyLabel {
    font-weight: 600;
    color: #3498db;
}

.propertyValue {
    color: #555;
}

.languageApplications h4 {
    color: #3498db;
    margin-bottom: 15px;
}

.languageApplications ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.languageApplications li {
    margin-bottom: 8px;
    color: #7f8c8d;
}

.simulationButton {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.simulationButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Simulation Tabs */
.simulationTabs {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.navTabs {
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.navItem {
    margin-bottom: -1px;
}

.navLink {
    border: none;
    border-radius: 0;
    padding: 15px 25px;
    color: #7f8c8d;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navLink:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.navLink.active {
    color: #3498db;
    background: white;
    border-bottom: 3px solid #3498db;
}

.tabPane {
    padding: 30px;
}

.simulationContainer {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
}

.simulationControls h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.simulationControls p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.controlRow {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 25px;
}

.formGroup {
    flex: 1;
    min-width: 200px;
}

.formGroup label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.formControl {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.formControl:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.simulationCanvas {
    background: white;
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.simulationStatus {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
    text-align: center;
}

.simulationStatus p {
    margin: 0;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Related Concepts */
.conceptGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.conceptCard {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.conceptCard:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.conceptIcon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
}

.conceptTitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.conceptDescription {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 100px;
}

.btnOutlinePrimary {
    border: 2px solid #3498db;
    color: #3498db;
    background: transparent;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btnOutlinePrimary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btnLarge {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btnPrimary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btnPrimary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btnSecondary {
    background: #7f8c8d;
    color: white;
}

.btnSecondary:hover {
    background: #6c757d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(127, 140, 141, 0.4);
}

.btnLight {
    background: white;
    color: #3498db;
}

.btnLight:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btnOutlineLight {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btnOutlineLight:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Animations */
.animatedElement {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animatedElement.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* Interactive Elements */
.interactiveElement {
    cursor: pointer;
    user-select: none;
}

.interactiveElement:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.highlightedElement {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid #3498db;
}

/* Progress Indicators */
.progressIndicator {
    height: 8px;
    background: #d6eaf8;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progressBar {
    height: 100%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

/* Diagram Elements */
.diagramNode {
    background: white;
    border: 2px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #3498db;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    transition: all 0.3s ease;
    cursor: pointer;
}

.diagramNode.accepting {
    background: #3498db;
    color: white;
}

.diagramEdge {
    stroke: #3498db;
    stroke-width: 2;
    marker-end: url(#arrowhead);
}

.diagramLabel {
    fill: #3498db;
    font-size: 14px;
    font-weight: bold;
    text-anchor: middle;
}

/* Simulation Status Indicators */
.statusIndicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.statusRunning {
    background: #27ae60;
    box-shadow: 0 0 8px #27ae60;
}

.statusPaused {
    background: #f39c12;
}

.statusStopped {
    background: #e74c3c;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .heroTitle {
        font-size: 2.8rem;
    }
    
    .heroSubtitle {
        font-size: 1.3rem;
    }
    
    .sectionHeading {
        font-size: 2.2rem;
    }
    
    .hierarchyVisualizationContainer {
        flex-direction: column;
    }
    
    .hierarchyDetails {
        flex: 1;
    }
    
    .controlGroup {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .controlLabel {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .heroSection {
        padding: 60px 0;
    }
    
    .heroTitle {
        font-size: 2.2rem;
    }
    
    .heroSubtitle {
        font-size: 1.1rem;
    }
    
    .introductionSection,
    .chomskyHierarchySection,
    .languageClassesSection,
    .simulationsSection,
    .relatedConceptsSection {
        padding: 50px 0;
    }
    
    .sectionHeading {
        font-size: 1.8rem;
    }
    
    .sectionDescription {
        font-size: 1rem;
    }
    
    .introductionCard {
        padding: 25px;
    }
    
    .cardHeader {
        padding: 20px;
    }
    
    .languageIcon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
    
    .cardTitle {
        font-size: 1.3rem;
    }
    
    .cardBody {
        padding: 20px;
    }
    
    .controlRow {
        flex-direction: column;
    }
    
    .formGroup {
        min-width: 100%;
    }
    
    .simulationCanvas {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .heroTitle {
        font-size: 1.8rem;
    }
    
    .topicBadge {
        display: block;
        margin: 10px auto;
        max-width: 250px;
    }
    
    .btnLarge {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .sectionHeading {
        font-size: 1.5rem;
    }
    
    .conceptGrid {
        grid-template-columns: 1fr;
    }
}