/*
This project is licensed under the MIT License.
See the LICENSE file in the project root for details.

Copyright (c) 2024-2026 Florian Reuth <git@florianreuth.de>
*/

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: #121212;
    color: #e0e0e0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

body.loaded {
    opacity: 1;
}

body.spin {
    animation: spin 5s linear infinite;
}

h1 {
    text-align: center;
    color: #f1f1f1;
    margin-bottom: 20px;
    transition: color 0.8s ease-in-out;
}

p, ol, table {
    margin: 20px;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: #1e1e1e;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 5px;
    transition: background-color 0.8s ease-in-out;
}

.header img {
    width: 150px;
    height: 150px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

nav li {
    float: left;
}

nav li a {
    display: block;
    padding: 8px;
    background-color: #333;
    color: #e0e0e0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease, background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

nav li a:hover {
    transform: scale(1.05);
    background-color: #555;
}

nav .selected {
    background-color: #555;
    color: #e0e0e0 !important;
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

.button-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.action-button {
    padding: 8px 16px;
    font-size: 14px;
    color: #f0f0f0;
    background-color: #444;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease, background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

.action-button:hover {
    background-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out, border-color 0.8s ease-in-out;
}

table, th, td {
    border: 1px solid #666;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #333;
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

pre {
    background-color: #333;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 5px;
    margin: 20px;
    overflow-x: auto;
    border: 1px solid #666;
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out, border-color 0.8s ease-in-out;
}

a {
    color: #a1c9f1;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:visited {
    color: #8ab0e3;
}

a:hover {
    color: #d0e2f9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

a:active {
    color: #f28c8c;
}

form {
    margin: 20px auto;
    max-width: 600px;
}

label {
    display: block;
    margin-top: 15px;
    color: #f1f1f1;
    transition: color 0.8s ease-in-out;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 1em;
    background-color: #333;
    color: #e0e0e0;
    transition: background-color 0.8s ease-in-out, color 0.8s ease-in-out, border-color 0.8s ease-in-out;
}

button[type="submit"] {
    margin-top: 15px;
    background-color: #444;
    color: #f0f0f0;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease, background-color 0.8s ease-in-out, color 0.8s ease-in-out;
}

button[type="submit"]:hover {
    background-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

fieldset {
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
    margin-top: 15px;
    transition: border-color 0.8s ease-in-out;
}

legend {
    padding: 0 5px;
    font-weight: bold;
    color: #f1f1f1;
    transition: color 0.8s ease-in-out;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #ff9933;
    outline-offset: 2px;
}

#form-status {
    color: #ff9933;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1em;
}

main {
    flex: 1;
}

footer {
    text-align: center;
    padding: 10px;
    color: #e0e0e0;
    transition: color 0.8s ease-in-out;
}

body.white-theme {
    background-color: white;
    color: #333;
}

body.white-theme h1,
body.white-theme label,
body.white-theme legend {
    color: #2e3b4e;
}

body.white-theme .header {
    background-color: white;
}

body.white-theme th {
    background-color: #2e3b4e;
    color: white;
}

body.white-theme pre {
    background-color: #2e3b4e;
    color: white;
    border: 1px solid #ccc;
}

body.white-theme nav li a {
    background-color: #ddd;
    color: black !important;
}

body.white-theme nav li a:hover {
    background-color: #b0c4de;
}

body.white-theme nav .selected {
    background-color: #2e3b4e;
    color: white !important;
}

body.white-theme .action-button {
    background-color: #2e3b4e;
    color: white;
}

body.white-theme .action-button:hover {
    background-color: #3f4e64;
}

body.white-theme input[type="text"],
body.white-theme input[type="email"],
body.white-theme input[type="tel"],
body.white-theme textarea,
body.white-theme select {
    background-color: white;
    border-color: #ccc;
    color: #333;
}

body.white-theme button[type="submit"] {
    background-color: #2e3b4e;
}

body.white-theme button[type="submit"]:hover {
    background-color: #246ec9;
}

body.white-theme fieldset {
    border-color: #ccc;
}

body.white-theme input[type="radio"],
body.white-theme input[type="checkbox"] {
    accent-color: #2e3b4e;
}

body.white-theme footer {
    color: black;
}
