/* Grundlegendes */
body {
    font-family: 'Inter', 'Roboto', Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

/* Tabs */
#tabs {
    display: flex;
    background-color: #1e1e1e;
    border-bottom: 2px solid #333;
}

#tabs button {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s, color 0.3s;
}

#tabs button:hover {
    background-color: #2a2a2a;
}

#tabs button.active {
    border-bottom: 3px solid #4CAF50;
    color: #4CAF50;
}

/* Inhalte */
#home-container, #images-container {
    padding: 20px;
    display: none; /* nur aktiver Tab sichtbar */
}

#home-container.active, #images-container.active {
    display: block;
}

/* README */
#readme-container {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#readme-content {
    overflow: hidden;
    font-size: 1em;
    max-height: 25em;
    position: relative;
    transition: max-height 0.5s ease;
}

#readme-content.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3em;
    background: linear-gradient(rgba(18,18,18,0), rgba(18,18,18,1));
}

#toggleReadme {
    margin-top: 10px;
    cursor: pointer;
    background-color: #4CAF50;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: #fff;
    transition: background 0.3s;
}

#toggleReadme:hover {
    background-color: #45a049;
}

/* Repos */
#repo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.repo {
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    flex: 1 1 calc(50% - 20px);
    min-width: 280px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.repo:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.repo img {
    width: 100%;
    height: auto;
    display: block;
}

.repo h3 {
    margin: 10px 0 5px;
}

.repo a {
    color: #4CAF50;
    text-decoration: none;
}

.repo a:hover {
    text-decoration: underline;
}

.repo p {
    font-size: 0.85em;
    color: #aaa;
    margin-bottom: 10px;
}

/* Galerie */
#images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.image-card {
    position: relative;
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.image-card img {
    width: 100%;
    height: auto;
    display: block;
}

.image-info {
    padding: 10px;
    font-size: 0.85em;
    color: #ddd;
}

.image-info p {
    margin: 2px 0;
    word-break: break-word;
}

/* Dark/Light Mode (weiterhin optional) */
.gh-light-mode-only,
.gh-dark-mode-only {
    display: none;
}

@media (prefers-color-scheme: light) {
    body {
        background-color: #f9f9f9;
        color: #222;
    }
    #readme-container, .repo, .image-card {
        background-color: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        color: #222;
    }
    #toggleReadme {
        background-color: #4CAF50;
        color: #fff;
    }
    #tabs button.active {
        color: #4CAF50;
    }
    .gh-light-mode-only {
        display: inline;
    }
}

@media (prefers-color-scheme: dark) {
    .gh-dark-mode-only {
        display: inline;
    }
}

/* Tab-Styling */
header nav.tabs button {
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s, border-bottom 0.2s;
}

header nav.tabs button.selected {
    color: magenta;
    border-bottom: 2px solid magenta;
}