@import "https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Signika+Negative:wght@400;600;700&family=Source+Code+Pro:wght@400;700&display=swap";

:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --border: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header h1 a {
    background: linear-gradient(135deg, #58a6ff 0%, #79c0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

header h1 a:hover {
    opacity: 0.8;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.3s;
    text-decoration: none;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item.fan-art {
    box-shadow: 0px 0px 10px 0px rgb(0, 135, 255);
    border: 1px solid rgba(0, 183, 255, 0.58);
}

.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .image-container img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.95), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay .title {
    font-size: 0.9em;
    color: white;
    margin-bottom: 10px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag {
    display: inline-block;
    background-color: var(--accent);
    color: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

/* Image View Page */
.image-view {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

.image-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    min-height: 400px;
}

.image-display img {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 4px;
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-info h2 {
    font-size: 1.5em;
    word-break: normal;
    overflow-wrap: normal; 
}

.meta {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    font-size: 0.95em;
}

.meta p {
    margin: 5px 0;
}

.tags-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
}

.tags-section h3 {
    margin-bottom: 12px;
    font-size: 1.1em;
}

.tags-section .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    background-color: var(--accent);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.tag-link:hover {
    opacity: 0.8;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    padding: 10px 16px;
    background-color: var(--accent);
    color: var(--bg-dark);
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nav-btn:hover {
    opacity: 0.8;
}

.nav-btn.home {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

footer {
    text-align: center;
    color: var(--text-secondary);
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .image-view {
        grid-template-columns: 1fr;
    }

    .image-display {
        min-height: auto;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 40px;
    padding: 20px;
}

.page-btn {
    padding: 10px 16px;
    background-color: var(--accent);
    color: var(--bg-dark);
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    margin: 0 6px;
}

.page-btn:hover {
    opacity: 0.8;
}

.page-num {
    padding: 8px 12px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.page-num:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.page-num.active {
    background-color: var(--accent);
    color: var(--bg-dark);
    cursor: default;
}

.page-ellipsis {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0 4px;
    user-select: none;
}

.page-info {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.toggle-label span {
    font-weight: 500;
}


/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}


/* Search and Filter Container */
.search-filter-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

#searchInput {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95em;
    border: 2px solid var(--accent);
    border-radius: 6px;
    background-color: var(--bg-light);
    color: var(--text);
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(255, 100, 100, 0.2);
}

.autocomplete-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text);
    transition: background-color 0.2s;
    font-size: 0.9em;
    border-bottom: 1px solid var(--bg-dark);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

.tag-link {
    background-color: var(--accent);  /* default */
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

/* Title Color */
header h1 a {
    color: white
    fill: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    fill: white;
}
