:root {
    --primary-color: #4f46e5;
    --primary-light: rgba(79, 70, 229, 0.05);
    --text-color: #333;
    --text-light: #666;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --border-radius: 12px;
    --spacing: 1.5rem;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --header-height: 120px;
    --sidebar-width: 300px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.header {
    background: var(--primary-color);
    color: white;
    padding: 1rem var(--spacing);
    text-align: center;
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    margin: 0px 160px;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 12px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 2;
}

.header p {
    opacity: 0.9;
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
}

.main-content {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
    margin: 0px 160px 30px 160px;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--card-background);
    position: fixed;
    top: 140px;
    left: 160px;
    height: 510px;
    overflow-y: auto;
    padding: var(--spacing);
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    height: 80%;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 20px;
}

p,
li {
    font-size: 18px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-color);
    color: white;
}

.container {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing);
    max-width: calc(100% - var(--sidebar-width));
}

.intro-section {
    background: var(--card-background);
    padding: var(--spacing);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.term-card {
    background: var(--card-background);
    padding: var(--spacing);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.term-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.term-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.term-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.term-card h3 {
    color: var(--primary-color);
    margin: 1rem 0 0.5rem;
    font-size: 1.1rem;
}

.term-card ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.term-card li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
}

.term-card li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.sub-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--primary-light);
    border-radius: var(--border-radius);
}

.warning-section {
    background: #fff5f5;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #fc8181;
}

.highlight-card {
    background: linear-gradient(to bottom right, var(--card-background), var(--primary-light));
    border: none;
}

.responsibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing);
    margin-top: var(--spacing);
}

.responsibility-item {
    padding: var(--spacing);
    background: var(--card-background);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.responsibility-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.responsibility-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}


footer {
    background: var(--primary-color);
    color: white;
    margin-top: auto;
    position: fixed;
    bottom: 0px;
    width: calc(100% - 320px);
    margin: 0px 160px;
}


.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    justify-content: space-between;
}

.footer-content p {
    font-size: 1rem;
}

.section {
    scroll-margin-top: var(--header-height);
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 2rem;
    z-index: 1001;
    background: var(--primary-color);
    border: 10px;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 80%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

.mobile-nav-toggle .bar {
    position: relative;
    width: 20px;
    height: 2px;
    background: white;
    transition: all var(--transition-speed) ease;
}

.mobile-nav-toggle .bar::before,
.mobile-nav-toggle .bar::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    transition: all var(--transition-speed) ease;
    left: 2px;
}

.mobile-nav-toggle .bar::before {
    transform: translateY(-6px);
}

.mobile-nav-toggle .bar::after {
    transform: translateY(6px);
}

.mobile-nav-toggle.active .bar {
    background: transparent;
}

.mobile-nav-toggle.active .bar::before {
    transform: rotate(45deg);
}

.mobile-nav-toggle.active .bar::after {
    transform: rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }

    .container {
        padding: var(--spacing);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing: 1rem;
        --sidebar-width: 100%;
    }

    .main-content,
    .header {
        margin: auto;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .header {
        padding: 0.75rem;
        z-index: 998;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 999;
        background: var(--card-background);
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-speed) ease;
        padding-top: 4rem;
    }

    .sidebar.active {
        left: 0;
    }

    .container {
        margin-left: 0;
        max-width: 100%;
        padding: var(--spacing);
        margin-bottom: 25px;
    }

    .responsibility-grid {
        grid-template-columns: 1fr;
    }

    .term-card {
        padding: var(--spacing);
    }
    .mobile-nav-toggle {
        display: flex !important;
    }

    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 997;
        opacity: 0;
        transition: opacity var(--transition-speed) ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    footer {
        margin: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing: 0.75rem;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .header p {
        font-size: 0.8rem;
    }

    .term-card {
        padding: 1rem;
    }

    .term-card h2 {
        font-size: 1.1rem;
    }

    .responsibility-item {
        padding: 1rem;
    }

    .sidebar {
        padding: 1rem;
    }

    .sidebar-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 18px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.5rem;
    }
    .mobile-nav-toggle {
        display:flex !important;
    }
    footer {
        margin: 0;
        width: 100%;
    }

    .sidebar {
        margin-bottom: 25px;
    }
}

*::-webkit-scrollbar {
    display: none;
}