:root {
    /* Light Mode Colors */
    --background-color: #f3f4f6;
    --card-background: #ffffff;
    --text-color: #1f2937;
    --secondary-text-color: #6b7280;
    --border-color: #e5e7eb;
    --button-color: #559d77;
    --button-hover: #42785d;
    --button-text: #ffffff;
    --link-color: #559d77;
    --link-hover-color: #42785d;
    --divider-color: #e5e7eb;
}

:root.dark {
    /* Dark Mode Colors */
    --background-color: #111827;
    --card-background: #1f2937;
    --text-color: #f3f4f6;
    --secondary-text-color: #9ca3af;
    --border-color: #374151;
    --button-color: #559d77;
    --button-hover: #42785d;
    --button-text: #ffffff;
    --link-color: #8ac09c;
    --link-hover-color: #9cd5ae;
    --divider-color: #374151;
}

html {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s, color 0.3s;
}

body {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

/* Layout and Container Styling */
.error-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100svh;
    text-align: center;
}

.error-container {
    max-width: 500px;
    width: 100%;
    padding: 0 15px;
}

/* Card Styling */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.error-message {
    font-size: 1.5rem;
    font-weight: 600;
}

.error-code {
    font-size: 0.875rem;
    color: var(--secondary-text-color);
    margin-top: 0.5rem;
}

.error-description {
    margin-top: 1rem;
    text-align: left;
    font-size: 0.875rem;
    color: var(--secondary-text-color);
}

.error-description p {
    margin-top: 0.5rem;
}

/* Divider */
hr {
    border: none;
    border-top: 1px solid var(--divider-color);
    margin: 1.5rem 0;
}

/* Button Styling */
.button {
    display: block;
    background-color: var(--button-color);
    color: var(--button-text);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s linear;
}

.button:hover {
    background-color: var(--button-hover);
}

/* Logo */
.logo {
    height: 75px;
    width: 100%;
    background-image: url('/images/logo-light.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

:root.dark .logo {
    background-image: url('/images/logo-dark.png');
}

/* Details at the bottom */
.error-details {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--secondary-text-color);
    opacity: 0.8;
}

.error-details .trace-id {
    display: block;
    margin-top: 0.25rem;
}

/* Link styling */
a.link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}

a.link:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Theme toggle button */

.theme-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

#theme-toggle-btn {
    background-color: transparent;
    background-image: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    outline: none;
}

#sun-icon {
    color: #f8fafc;
}

.hidden {
    display: none;
}