/* ==========================================================
   WIKIGAMES - TEMA VISUAL NOVEL DATABASE (ESTILO VNDB)
   ========================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    background-color: #05070a;
    color: #c5c8c6;
    font-size: 13px;
    line-height: 1.5;
}

.vndb-bg-wrapper {
    min-height: 100vh;
    background: linear-gradient(rgba(5, 7, 10, 0.4), rgba(5, 7, 10, 0.6)),
                url('https://i.8upload.com/image/609e2998ae1139ae/caefdfcdf0a24a1f8dfae4e80cb65a6e.jpg') no-repeat center top fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
}

a { color: #6897bb; text-decoration: none; }
a:hover { color: #80bcd8; text-decoration: underline; }

#top-header {
    background: rgba(15, 22, 34, 0.85);
    backdrop-filter: blur(2px);
    border-bottom: 2px solid #283850;
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.logo a { text-decoration: none; }
.logo h1 {
    font-family: Georgia, serif;
    font-size: 22px;
    color: #e0e6ed;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.logo span {
    font-size: 11px;
    color: #7a8b9e;
    font-style: italic;
    display: block;
}

#hamburgerBtn, #closeMenuBtn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #a9c5df;
}

.search-bar { position: relative; display: flex; }
.search-bar input {
    padding: 6px 10px;
    background: rgba(11, 17, 24, 0.8);
    border: 1px solid #283850;
    border-right: none;
    color: #fff;
    border-radius: 3px 0 0 3px;
    width: 240px;
    font-size: 12px;
}
.search-bar input:focus { outline: none; border-color: #4a75a0; background: rgba(11, 17, 24, 0.95); }
.search-bar button {
    padding: 6px 12px;
    background: rgba(28, 43, 62, 0.9);
    border: 1px solid #283850;
    color: #a9c5df;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
}
.search-bar button:hover { background: #283850; }

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(17, 24, 34, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #283850;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 6px 16px rgba(0,0,0,0.7);
}
.search-results-dropdown a {
    display: block;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(26, 38, 54, 0.8);
    color: #c5c8c6;
    font-size: 12px;
}
.search-results-dropdown a:hover { background: #1c2b3e; color: #fff; text-decoration: none; }

.container {
    display: flex;
    max-width: 1280px;
    width: 100%;
    margin: 20px auto;
    padding: 0 15px;
    gap: 20px;
    flex-grow: 1;
}

#content {
    flex-grow: 1;
    background-color: rgba(15, 22, 34, 0.85);
    backdrop-filter: blur(2px);
    border: 1px solid #202e42;
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

#content h1 {
    font-family: Georgia, serif;
    font-size: 24px;
    color: #e0e6ed;
    border-bottom: 1px solid rgba(32, 46, 66, 0.8);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

#content h2 {
    font-family: Georgia, serif;
    font-size: 18px;
    color: #d0dbe7;
    border-bottom: 1px solid rgba(26, 38, 54, 0.8);
    padding-bottom: 5px;
    margin: 25px 0 12px;
}

#content p { margin-bottom: 12px; color: #b8c2cd; }
#content ul, #content ol { margin: 0 0 15px 20px; color: #b8c2cd; }
#content li { margin-bottom: 4px; }

.home-banner {
    text-align: center;
    padding: 30px 20px;
    background: rgba(11, 17, 24, 0.6);
    border-radius: 6px;
    border: 1px solid #202e42;
    margin-bottom: 30px;
}
.home-banner h2 {
    border: none;
    margin: 0 0 10px 0;
    font-size: 26px;
    color: #fff;
}
.home-section {
    margin-bottom: 35px;
}
.home-section h3 {
    font-size: 16px;
    color: #e0e6ed;
    border-bottom: 1px solid #202e42;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}
.home-card {
    background: rgba(11, 17, 24, 0.8);
    border: 1px solid #202e42;
    border-radius: 4px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    border-color: #4a75a0;
    text-decoration: none;
}
.home-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 1px solid #202e42;
}
.home-card span {
    padding: 10px;
    font-weight: bold;
    color: #c5c8c6;
    font-size: 13px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-card:hover span { color: #fff; }

.play-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    margin-bottom: 20px;
}
.play-links a {
    padding: 8px 12px;
    background: rgba(28, 43, 62, 0.8);
    border: 1px solid #283850;
    border-radius: 3px;
    color: #a9c5df;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.play-links a:hover {
    background: #283850;
    color: #fff;
    text-decoration: none;
}

.infobox {
    float: right;
    width: 280px;
    background-color: rgba(11, 17, 24, 0.7);
    border: 1px solid #283850;
    margin: 0 0 15px 20px;
    padding: 4px;
    font-size: 12px;
    border-radius: 3px;
}
.infobox-title {
    background: rgba(22, 32, 46, 0.9);
    text-align: center;
    font-weight: bold;
    color: #e0e6ed;
    padding: 6px;
    font-size: 13px;
    border-bottom: 1px solid #283850;
}
.infobox img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #283850;
}
.infobox table { width: 100%; border-collapse: collapse; }
.infobox th, .infobox td { padding: 6px; border-bottom: 1px solid rgba(22, 32, 46, 0.5); vertical-align: top; }
.infobox th { text-align: left; background-color: rgba(15, 22, 34, 0.6); width: 38%; color: #8fa3bc; }
.infobox td { color: #c5c8c6; }

.toc {
    background-color: rgba(11, 17, 24, 0.7);
    border: 1px solid #202e42;
    display: inline-block;
    padding: 12px 20px;
    margin: 15px 0 20px;
    font-size: 13px;
    border-radius: 3px;
    min-width: 220px;
}
.toc-title { font-weight: bold; text-align: center; margin-bottom: 8px; color: #d0dbe7; border-bottom: 1px solid rgba(26, 38, 54, 0.8); padding-bottom: 4px;}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 5px; }

.category-list, .all-games-list { list-style: none; margin: 0; padding: 0; }
.category-list li, .all-games-list li {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(22, 32, 46, 0.6);
    padding-bottom: 12px;
}
.category-list h3, .all-games-list h3 { font-size: 16px; margin-bottom: 4px; font-family: Georgia, serif; }
.category-list p, .all-games-list p { font-size: 12px; color: #8fa3bc; margin: 0; }

#sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.sidebar-box {
    background-color: rgba(15, 22, 34, 0.85);
    backdrop-filter: blur(2px);
    border: 1px solid #202e42;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.sidebar-box h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7a8b9e;
    border-bottom: 1px solid rgba(32, 46, 66, 0.8);
    padding-bottom: 5px;
    margin-bottom: 8px;
}
.vndb-menu { list-style: none; }
.vndb-menu li { margin-bottom: 6px; font-size: 12.5px; }
.vndb-menu li a { display: block; color: #a9c5df; padding: 2px 0; }
.vndb-menu li a:hover { color: #fff; padding-left: 3px; text-decoration: none; }
.vndb-menu li i { width: 16px; text-align: center; color: #637d9c; margin-right: 4px; }

.discord-box p { font-size: 11px; color: #7a8b9e; margin-bottom: 8px; }
.discord-btn {
    display: block;
    background-color: #5865F2;
    color: white;
    text-align: center;
    padding: 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}
.discord-btn:hover { background-color: #4752C4; color: white; text-decoration: none; }

.vndb-footer {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: #637d9c;
    border-top: 1px solid rgba(22, 32, 46, 0.5);
    margin-top: 40px;
}

#menuOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 1500;
}

.advanced-filters {
    background: rgba(11, 17, 24, 0.8);
    border: 1px solid #202e42;
    border-radius: 4px;
    padding: 16px;
    margin: 14px 0 20px;
}
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #9fb4c8;
}
.filter-field input,
.filter-field select {
    background: rgba(11, 17, 24, 0.95);
    border: 1px solid #283850;
    color: #edf2f8;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 12px;
}
.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #4a75a0;
}

.all-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.all-game-card {
    display: flex;
    flex-direction: column;
    background: rgba(11, 17, 24, 0.8);
    border: 1px solid #202e42;
    border-radius: 4px;
    overflow: hidden;
    color: #c5c8c6;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.all-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    border-color: #4a75a0;
    text-decoration: none;
}
.all-game-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #202e42;
}
.all-game-card-content {
    padding: 12px;
}
.all-game-card-content h3 {
    font-size: 15px;
    color: #edf2f8;
    margin-bottom: 8px;
    font-family: Georgia, serif;
}
.all-game-card-content p {
    font-size: 11px;
    color: #8fa3bc;
    margin: 0;
    line-height: 1.55;
}
.all-games-empty {
    padding: 18px;
    border: 1px dashed #283850;
    border-radius: 4px;
    color: #9fb4c8;
    background: rgba(11,17,24,0.5);
}

.trailer-panel {
    background: rgba(11, 17, 24, 0.8);
    border: 1px solid #202e42;
    border-radius: 5px;
    padding: 16px;
    margin: 20px 0;
}
.trailer-header {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a9c5df;
    margin-bottom: 12px;
    font-weight: bold;
}
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #283850;
    background: #000;
}
.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.trailer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.trailer-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(28, 43, 62, 0.9);
    border: 1px solid #283850;
    border-radius: 3px;
    color: #a9c5df;
    padding: 8px 12px;
    font-size: 12px;
}
.trailer-actions a:hover {
    background: #283850;
    color: #fff;
    text-decoration: none;
}

.article-actions {
    margin-top: 26px;
}
.share-page-btn {
    border: 1px solid #283850;
    background: rgba(28, 43, 62, 0.9);
    color: #dfeaf7;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}
.share-page-btn:hover {
    background: #283850;
    color: #fff;
}

@media (max-width: 900px) {
    .header-content { flex-direction: column; align-items: stretch; }
    .logo { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    #hamburgerBtn { display: block; }
    .search-bar { width: 100%; margin-top: 5px; }
    .search-bar input { width: 100%; }

    .container { flex-direction: column; padding: 10px; }
    #content { padding: 15px; }

    .infobox { float: none; width: 100%; margin: 0 0 15px 0; }
    .home-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .home-card img { height: 80px; }
    .play-links { flex-direction: column; }
    .play-links a { text-align: center; justify-content: center; padding: 10px; }

    #sidebar {
        position: fixed;
        top: 0; right: -300px;
        width: 260px; height: 100vh;
        background-color: rgba(15, 22, 34, 0.95);
        backdrop-filter: blur(10px);
        z-index: 2000;
        box-shadow: -5px 0 20px rgba(0,0,0,0.8);
        padding: 20px;
        overflow-y: auto;
        transition: right 0.3s ease;
        gap: 20px;
    }

    #closeMenuBtn { display: block; text-align: right; margin-bottom: 10px; }
    #sidebar.active { right: 0; }
    #menuOverlay.active { display: block; }
}
