#container {
    width: 90%;
    margin: 0.3rem auto;
    padding: 0.3rem 1.9rem;
    border: solid 0.06rem grey;
    border-collapse: collapse;
    color: #5B5B5B;
    transition: box-shadow 0.3s ease;
}

#container:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

#header {
    width: 100%;
}

#header h1 {
    margin: 0;
    transition: color 0.3s ease;
}

#header h1:hover {
    color: #3a7bd5;
}

#header h2 {
    font-style: italic;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#header h2:hover {
    opacity: 1;
}

#nav {
    clear: both;
    padding: 0.3rem 0.9rem;
    margin: 0 -1.9rem;
    list-style-type: none;
    background-color: black;
    color: white;
}

.item {
    display: inline-block;
    padding: 0.125rem 0.6rem;
    text-align: center;
    transition: all 0.3s ease;
}

.item a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.item a:hover {
    text-decoration: underline;
    background-color: #5B5B5B;
    border-radius: 0.25rem;
}

.active {
    border-bottom: solid 0.2rem white;
}

#content {
    padding: 1rem 0;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

#content h4 {
    color: #2c3e50;
    border-bottom: 0.125rem solid #3a7bd5;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

#content h4:hover {
    color: #3a7bd5;
}

blockquote {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 0.25rem solid #5B5B5B;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

blockquote:hover {
    background-color: #f5f5f5;
    transform: translateX(0.25rem);
}

#content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

#content p:hover {
    color: #2c3e50;
}

#footer {
    width: 100%;
    color: #D86836;
    text-align: center;
    padding: 1rem 0;
    border-top: 0.06rem solid #e9ecef;
    animation: fadeIn 0.6s ease-out 0.3s both;
    transition: color 0.3s ease;
}

#footer:hover {
    color: #c75722;
}

/* Skip links for accessibility */
#skip-links {
    width: 100%;
    background-color: black;
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#skip-links a {
    color: white;
    padding: 0.5rem;
    text-decoration: none;
}

#skip-links a:focus {
    position: static;
    width: auto;
    height: auto;
    left: 0;
    top: 0;
    z-index: 999;
    background-color: black;
    display: block;
}

form {
    max-width: 25rem;
    margin: 0 auto;
}

form div {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

input,
textarea {
    width: 100%;
    padding: 0.5rem;
    border: 0.06rem solid #ddd;
    border-radius: 0.25rem;
    font-size: 1rem;
}

button {
    background-color: #3a7bd5;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2859a8;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
}

.dark-mode-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background-color: #333;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.dark-mode #container {
    background-color: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

.dark-mode #nav {
    background-color: #111;
}

.dark-mode blockquote {
    background-color: #333;
    color: #e0e0e0;
}

.dark-mode #footer {
    color: #ff9966;
}

.dark-mode input,
.dark-mode textarea {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

.dark-mode .popup-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-2rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 48rem) {
    #container {
        width: 95%;
        padding: 0.3rem 1rem;
    }

    #nav {
        margin: 0 -1rem;
    }

    .item {
        display: block;
        margin-bottom: 0.25rem;
    }
}