/* 3 Patti Jeet - 3pattimall style */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-input: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-gold: #f0c14b;
  --star: #ffc107;
  --success: #3fb950;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; background: var(--bg-dark); color: var(--text); line-height: 1.5; min-height: 100vh; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 12px 0; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo { font-size: 1.4rem; font-weight: 700; color: var(--accent-gold); }
.logo img { height: 36px; vertical-align: middle; margin-right: 8px; }

.search-form { display: flex; flex: 1; max-width: 400px; min-width: 200px; }
.search-form input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); color: var(--text); font-size: 1rem; }
.search-form input::placeholder { color: var(--text-muted); }
.search-form button { padding: 10px 18px; background: var(--accent); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; margin-left: 6px; }
.search-form button:hover { opacity: .9; }

/* Nav */
.nav-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nav-cats a { padding: 6px 12px; background: var(--bg-input); border-radius: 8px; color: var(--text); font-size: .9rem; }
.nav-cats a:hover { background: var(--border); text-decoration: none; }

/* Ad slot */
.ad-slot { text-align: center; margin: 12px 0; min-height: 50px; }
.ad-slot div { margin: 0 auto; }

/* Main */
main { padding: 24px 0 40px; min-height: 60vh; }

h1 { font-size: 1.75rem; margin: 0 0 20px; color: var(--text); }
.page-desc { color: var(--text-muted); margin-bottom: 24px; }

/* Game grid */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.game-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.game-card a { color: inherit; text-decoration: none; display: block; padding: 14px; }
.game-card a:hover { text-decoration: none; }
.game-card .thumb { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg-input); border-radius: 8px; }
.game-card .name { font-weight: 600; margin: 10px 0 4px; font-size: .95rem; line-height: 1.3; }
.game-card .meta { font-size: .8rem; color: var(--text-muted); }
.game-card .rating { color: var(--star); }
.game-card .pin-badge { position: absolute; top: 8px; right: 8px; background: var(--accent-gold); color: #000; font-size: .7rem; padding: 2px 6px; border-radius: 4px; }

/* Pinned section */
.pinned-section { margin-bottom: 32px; }
.pinned-section h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--accent-gold); }
.pinned-section .games-grid { gap: 16px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0; }
.pagination a, .pagination span { padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.pagination a:hover { background: var(--border); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Game single page */
.game-single { max-width: 900px; margin: 0 auto; }
.game-single .top-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; align-items: flex-start; }
.game-single .game-icon { width: 120px; height: 120px; object-fit: contain; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); flex-shrink: 0; }
.game-single .game-info h1 { margin: 0 0 8px; font-size: 1.75rem; }
.game-single .dev-name { color: var(--text-muted); font-size: .95rem; }
.game-single .rating-stars { color: var(--star); font-size: 1.1rem; margin: 6px 0; }
.game-single .rating-stars span { color: var(--text-muted); font-size: .9rem; margin-left: 6px; }
.game-single .btn-download { display: inline-block; padding: 14px 28px; background: var(--success); color: #fff; font-weight: 700; border-radius: 8px; margin-top: 12px; border: none; cursor: pointer; font-size: 1rem; text-decoration: none; }
.game-single .btn-download:hover { opacity: .95; text-decoration: none; color: #fff; }

.game-single .seo-image { width: 100%; max-width: 600px; height: auto; border-radius: var(--radius); margin: 20px 0; border: 1px solid var(--border); }
.game-single .article-content { margin: 24px 0; line-height: 1.7; }
.game-single .article-content img { max-width: 100%; height: auto; }

/* Comments */
.comments-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments-section h3 { margin-bottom: 16px; }
.comment-form input, .comment-form textarea { width: 100%; max-width: 400px; padding: 10px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); color: var(--text); }
.comment-form button { padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.comment-item { background: var(--bg-card); padding: 14px; border-radius: 8px; margin-bottom: 10px; border: 1px solid var(--border); }
.comment-item .author { font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.comment-item .date { font-size: .8rem; color: var(--text-muted); }

/* Related games */
.related-games { margin-top: 32px; }
.related-games h3 { margin-bottom: 16px; }
.related-games .games-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* Footer */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 24px 0; margin-top: 40px; }
.site-footer .container { text-align: center; color: var(--text-muted); font-size: .9rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* Add game page */
.add-game-form label { display: block; margin: 10px 0 4px; font-weight: 500; }
.add-game-form input[type="text"], .add-game-form input[type="url"], .add-game-form input[type="number"], .add-game-form select, .add-game-form textarea { width: 100%; max-width: 500px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); color: var(--text); }
.add-game-form .hint { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }
.add-game-form .btn { padding: 12px 24px; background: var(--accent); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; margin-top: 12px; }
.add-game-form .already-added { color: #f85149; margin-top: 6px; }
.add-game-form .editor-wrap { max-width: 700px; }
.add-game-form .editor-wrap textarea { min-height: 200px; }

/* Search / Category page */
.breadcrumb { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }

/* Mobile */
@media (max-width: 768px) {
  .site-header .container { flex-direction: column; align-items: stretch; }
  .search-form { max-width: none; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .game-single .top-row { flex-direction: column; }
  .game-single .game-icon { width: 100px; height: 100px; }
}

/* Utility */
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 16px; }
