/* Reset und Basisstile */
html {
    box-sizing: border-box;
    font-size: 16px;
}
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img {
    max-width: 100%;
    height: auto;
}
/* Layout */
main {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    flex-grow: 1;
    box-sizing: border-box;
}
/* Header */
header {
    background-color: #f8f8f8;
    color: #333;
    text-align: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}
header > div {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo {
    width: 200px;
    max-width: 250px;
    margin-right: 1rem;
    margin-top: 0.5rem;
}
h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #222;
}
/* Suchfeld */
.search-container {
    width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
#searchInput {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#searchInput:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
}
/* Kategorien */
.category-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 1rem;
}
.category {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.category::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border: 4px solid transparent;
    border-radius: 10px;
    background: linear-gradient(90deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000);
    background-size: 200% 100%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rainbow-border 16s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.category:hover {
    background-color: rgba(30, 30, 30, 0.9);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.category:hover::before {
    opacity: 1;
}
@keyframes rainbow-border {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.category:hover h2 {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}
.category:hover a {
    color: #99ccff;
}
h2 {
    color: #222;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-top: 0;
    transition: color 0.5s ease, border-bottom-color 0.5s ease;
}
ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
li {
    margin-bottom: 0.5rem;
}
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.5s ease;
}
a:hover, a:focus {
    color: #ffffff;
    text-decoration: underline;
}
/* Footer */
footer {
    text-align: center;
    color: #333;
    padding: 0.5rem;
    font-size: 0.875rem;
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
footer p {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}
footer span {
    margin: 0 0.5rem;
}
/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.category {
    animation: fadeIn 1s ease-in-out;
}
/* Responsive Design */
@media screen and (max-width: 600px) {
    body {
        font-size: 14px;
    }
    main, header > div, .search-container, .category-container {
        padding: 0.5rem;
    }
    .category {
        margin-bottom: 0.5rem;
    }
    footer {
        font-size: 0.75rem;
    }
    footer p {
        flex-wrap: wrap;
    }
    footer span {
        margin: 0 0.25rem;
    }
}
@media screen and (max-width: 400px) {
    footer {
        font-size: 0.7rem;
    }
}
@media screen and (min-width: 601px) and (max-width: 767px) {
    footer {
        font-size: 0.8rem;
    }
}
@media screen and (min-width: 1024px) {
    .category {
        width: calc(50% - 0.5rem);
    }
}
/* Druckstile */
@media print {
    body, header, footer {
        background: none;
        color: #000;
    }
    .category {
        page-break-inside: avoid;
    }
}
