html {
    scroll-behavior: smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    margin: 0;
    background-color: #f8f9fa;
}
header {
    background-color: #343a40;
    color: #fff;
    padding: 1rem 1rem 0 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}
nav {
    background: #495057;
    text-align: center;
    padding: 0.5rem 0;
}
main {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}
.nav-group {
    position: relative;
    display: inline-block;
}
.nav-top-level {
    background-color: transparent;
    color: white;
    padding: 14px 16px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.nav-group:hover .nav-top-level {
    background-color: #5a6268;
}
.nav-sub-menu {
    display: none;
    position: absolute;
    background-color: #f8f9fa;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}
.nav-sub-menu a {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s;
}
.nav-sub-menu a:hover {
    background-color: #e9ecef;
}
.nav-group:hover .nav-sub-menu {
    display: block;
}
section {
    scroll-margin-top: 120px;
}
h2 {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    margin-top: 0;
}
details {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: box-shadow 0.3s;
}
details:hover {
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
summary {
    padding: 0.8rem 1.2rem;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
    outline: none;
}
details[open] > summary {
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}
.definition {
    padding: 1.2rem;
    background: #fff;
}
#to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #343a40;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: opacity 0.3s, visibility 0.3s;
}
#to-top.show {
    display: flex;
}

/* Status Message Styles */
#status-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    display: none; /* Hidden by default */
}

#status-message.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#status-message.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

#status-message ul {
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
}