html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1f2d21 0%, #000 100%);
    background-color: #000;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    overflow-x: hidden;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes cardFadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

header, main, section, footer {
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 1rem 1rem 0.5rem 1rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

main {
    flex: 1;
}

.grid, .primary-grid, .secondary-grid, .third-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: rgba(36, 50, 38, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.6s forwards;
}

.card:nth-child(1)  { animation-delay: 0.1s; }
.card:nth-child(2)  { animation-delay: 0.2s; }
.card:nth-child(3)  { animation-delay: 0.3s; }
.card:nth-child(4)  { animation-delay: 0.4s; }
.card:nth-child(5)  { animation-delay: 0.5s; }
.card:nth-child(6)  { animation-delay: 0.6s; }
.card:nth-child(7)  { animation-delay: 0.7s; }
.card:nth-child(8)  { animation-delay: 0.8s; }
.card:nth-child(9)  { animation-delay: 0.9s; }
.card:nth-child(10) { animation-delay: 1.0s; }
.card:nth-child(11) { animation-delay: 1.1s; }
.card:nth-child(12) { animation-delay: 1.2s; }
.card:nth-child(13) { animation-delay: 1.3s; }
.card:nth-child(14) { animation-delay: 1.4s; }
.card:nth-child(15) { animation-delay: 1.5s; }
.card:nth-child(16) { animation-delay: 1.6s; }
.card:nth-child(17) { animation-delay: 1.7s; }
.card:nth-child(18) { animation-delay: 1.8s; }

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
    background-color: rgba(46, 70, 48, 0.9);
}

.card img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    background: transparent;
    transition: transform 0.3s ease;
    margin-top: 0.5rem;
}

.card:hover img {
    transform: scale(1.05);
}

.card a {
    display: block;
    padding: 0.5rem;
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.card a:hover {
    color: #c8ffc8;
}

footer {
    background: #111;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    padding: 1rem;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #fff;
}

#resolution {
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.5rem;
}

.google-search {
    margin: 2rem auto;
    text-align: center;
}

.google-search form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.google-search input[type="text"] {
    padding: 0.5rem;
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
}

.google-search button {
    background-color: #4CAF50;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.google-search button:hover {
    background-color: #45a049;
}

.google-search button svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: white;
}

.floating-back {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(60, 90, 60, 0.9);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
    z-index: 1000; /* Erhöht, um sicherzustellen, dass es über allem liegt */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
}

.floating-back:hover {
    background-color: rgba(80, 120, 80, 1);
}

.floating-back a {
    color: white;
    text-decoration: none;
}

a:link,
a:visited,
a:hover,
a:active {
    color: white;
    text-decoration: none;
}
