/* Dark themed Game Explorer UI for AI JSON Mode */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #05060a;
    color: #f5f5f5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

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

header h1 {
    font-size: 2.3rem;
    margin: 0 0 8px;
}

.subtitle {
    margin: 0;
    color: #a0a0b0;
    font-size: 0.95rem;
}

.debug-note {
    margin-top: 8px;
    color: #ffcf70;
    font-size: 0.8rem;
}

.search-box {
    background: #111320;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.search-box form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-box input[type="text"],
.search-box select {
    flex: 1;
    min-width: 160px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #33374a;
    background: #050812;
    color: #f5f5f5;
}

.search-box button {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #5b8dff, #9b5bff);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.2s;
    white-space: nowrap;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
    opacity: 0.95;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-card {
    background: #0b0d18;
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    border: 1px solid #1c2136;
}

.game-header {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.game-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: #1f253b;
    color: #ced4ff;
}

.badge-f2p {
    background: #145a32;
    color: #b9f6ca;
}

.game-body {
    display: flex;
    gap: 14px;
}

.thumb img {
    width: 150px;
    height: auto;
    border-radius: 12px;
    display: block;
}

.meta {
    flex: 1;
    font-size: 0.9rem;
}

.meta p {
    margin: 4px 0 6px;
}

.ai-summary {
    margin-top: 4px;
    line-height: 1.4;
}

.json-details {
    margin-top: 10px;
    font-size: 0.85rem;
}

.json-details summary {
    cursor: pointer;
    color: #9ecbff;
}

.json-block {
    margin-top: 6px;
    padding: 10px 12px;
    background: #050812;
    border-radius: 8px;
    border: 1px solid #262b3f;
    overflow-x: auto;
    font-family: "Fira Code", Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.4;
}

.error {
    background: #3d1220;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #ff5670;
    color: #ffd6de;
    font-size: 0.92rem;
}

footer {
    margin-top: 32px;
    font-size: 0.8rem;
    color: #7f8294;
    text-align: center;
}

code {
    background: #191c2a;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Responsiveness */
@media (max-width: 700px) {
    .game-body {
        flex-direction: column;
    }
    .thumb img {
        width: 100%;
        max-width: 320px;
    }
}
