/* Theme Variables */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #333;
    --header-bg: #2b5b84;
    --article-bg: #ffffff;
    --border-color: #e0e0e0;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --header-bg: #2d2d2d;
    --article-bg: #2d2d2d;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background: var(--header-bg);
    padding: 1rem;
    margin-bottom: 2rem;
    border-bottom: solid 1px var(--border-color);
    
}
h1 {
    color: white;
    margin-left: 17%;
}
nav a {
    margin-left: 17%;
}


nav h1 {
    color: white;
    margin-bottom: 1rem;
    
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}



main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.article-section {
    background: var(--article-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

h3 {
    color: var(--text-color);
    margin: 1rem 0;
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.term {
    font-weight: bold;
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--text-color);
}

.term:hover::after {
    content: attr(data-explanation);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
    background: var(--header-bg);
    color: white;
    border-radius: 4px;
    font-size: 0.9em;
    width: max-content;
    max-width: 200px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    padding: 1rem;
    background: var(--header-bg);
    color: white;
    margin-top: 2rem;
}

.dark-mode-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 10px;
    border-radius: 50%;
    border: none;
    background: var(--header-bg);
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 9px;
    transition: all 0.3s ease;
    display: inline-block;
    border-radius: 25px;
    letter-spacing: 0.5px;
    position: relative;
}

nav a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover:before {
    width: 85%;
}

nav a:hover,
nav a.active {
    color: white;
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


nav a.active:before {
    width: 70%;
}