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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: #2c3e50;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.5em;
    margin: 0;
    font-weight: 700;
}

.sidebar-nav {
    padding: 10px 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 25px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95em;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #34495e;
    color: #3498db;
    border-left-color: #3498db;
}

.menu-category {
    padding: 15px 25px 8px 25px;
    color: #95a5a6;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 15px;
}

.menu-category:first-of-type {
    margin-top: 10px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 40px;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.section-desc {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hero p {
    font-size: 1.1em;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto;
}

/* Subjects Section */
.subjects h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
}

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

.subject-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.subject-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.subject-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subject-card p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

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

/* Features Section */
.features {
    margin-top: 60px;
}

.features h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.feature-item {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.feature-item p {
    color: #7f8c8d;
}

/* Subject Page */
.subject-header {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.subject-header .subject-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.subject-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subject-description {
    color: #7f8c8d;
    font-size: 1.2em;
}

/* Content Sections */
.content-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.content-section h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    margin-top: 25px;
    color: #34495e;
}

.content-section p {
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

.content-section ul,
.content-section ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 8px;
    color: #555;
}

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

/* Topic Cards */
.topic-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.topic-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topic-card h3 {
    margin-top: 0;
    color: #2c3e50;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 10px;
    color: white;
    margin-top: 20px;
}

.highlight-box h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.highlight-box ul {
    margin-left: 20px;
}

.highlight-box li {
    margin-bottom: 10px;
    color: #ecf0f1;
}

.highlight-box strong {
    color: #fff;
    font-weight: 600;
}

/* Related Subjects */
.related-subjects {
    margin-top: 40px;
}

.related-subjects h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.subject-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.related-link {
    display: inline-block;
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.related-link:hover {
    background-color: #2980b9;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

footer p {
    margin: 0;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    position: fixed;
    left: 10px;
    top: 10px;
    z-index: 1001;
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .sidebar-toggle {
        display: block;
        position: fixed;
        left: 10px;
        top: 10px;
        z-index: 1001;
        background: #3498db;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 1.2em;
    }
    
    .subject-grid,
    .feature-list {
        grid-template-columns: 1fr;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: #3498db;
    color: white;
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}