/* BirdFly Games — Playables-style layout (original design, light theme) */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: #f9f9f9; color: #0f0f0f; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid #e5e5e5; position: sticky; top: 0; z-index: 50; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { font-size: 22px; font-weight: 900; white-space: nowrap; }
.logo span { color: #e67e22; }
.search { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.search input { flex: 1; padding: 9px 14px; border: 1px solid #ccc; border-right: none; border-radius: 20px 0 0 20px; font-size: 15px; outline: none; }
.search button { padding: 9px 16px; border: 1px solid #ccc; border-radius: 0 20px 20px 0; background: #f0f0f0; cursor: pointer; font-size: 15px; }
.topnav { display: flex; gap: 16px; font-weight: 700; white-space: nowrap; }
.topnav a:hover { color: #e67e22; }

/* Page headings + category chips */
.page-title { font-size: 26px; margin: 22px 0 6px; }
.page-sub { color: #606060; margin-bottom: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.chip { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #ddd; font-size: 14px; font-weight: 700; }
.chip.active, .chip:hover { background: #0f0f0f; color: #fff; border-color: #0f0f0f; }

/* Game grid — like the Playables browse page (portrait 5:7 thumbs) */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-bottom: 24px; }
.card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.card img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; display: block; background: #ddd; }
.card-body { padding: 12px; }
.card-body h3 { font-size: 16px; margin-bottom: 4px; }
.card-body p { font-size: 13px; color: #606060; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 13px; color: #606060; margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; background: #fff3d6; color: #7a4a00; border-radius: 999px; padding: 2px 8px; }

/* Empty Google Ads slots — reserved space, no ads loaded yet */
.ad-slot { border: 2px dashed #d0d0d0; border-radius: 12px; background: #f2f2f2; min-height: 90px; display: flex; align-items: center; justify-content: center; margin: 18px 0; }
.ad-leaderboard { max-width: 728px; height: 90px; margin: 18px auto; }
.ad-slot .ad-label { color: #999; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.ad-slot.ad-sidebar { min-height: 250px; }

/* Play page */
.play-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; margin: 22px 0; align-items: start; }
.game-frame { background: #111; border-radius: 16px; overflow: hidden; display: flex; justify-content: center; }
.game-frame iframe { border: 0; display: block; background: #79c7e8; }
.game-frame.portrait iframe { width: 480px; height: 800px; max-width: 100%; }
.game-frame.square iframe { width: 640px; height: 640px; max-width: 100%; }
.game-frame.landscape iframe { width: 800px; height: 500px; max-width: 100%; }
.play-title { font-size: 24px; margin: 14px 0 6px; }
.play-desc { color: #333; line-height: 1.6; margin-bottom: 12px; }
.play-stats { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.stat { background: #fff; border: 1px solid #ddd; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.like-btn { border: none; background: #ffd93d; border-radius: 999px; padding: 10px 18px; font-size: 15px; font-weight: 800; cursor: pointer; }
.like-btn.liked { background: #ff6b81; color: #fff; }
.like-btn:disabled { opacity: .7; cursor: default; }
.side-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.side-card img { width: 100%; max-width: 220px; margin: 0 auto; display: block; border-radius: 10px; aspect-ratio: 5 / 7; object-fit: cover; }
.side-card h3 { margin: 10px 0 6px; }
.side-card p { color: #606060; font-size: 14px; line-height: 1.5; }
.section-title { font-size: 20px; margin: 26px 0 14px; }

/* Forms / admin */
.form-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 20px; max-width: 640px; margin: 22px auto; }
.form-card label { display: block; font-weight: 700; margin: 12px 0 4px; }
.form-card input[type=text], .form-card input[type=password], .form-card select, .form-card textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; }
.form-card textarea { min-height: 90px; resize: vertical; }
.btn { display: inline-block; border: none; background: #0f0f0f; color: #fff; border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 800; cursor: pointer; }
.btn:hover { background: #e67e22; }
.btn.danger { background: #c0392b; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border: 1px solid #e5e5e5; padding: 9px; text-align: left; font-size: 14px; }
.table th { background: #f0f0f0; }
.notice { background: #fff3d6; border: 1px solid #f0c36d; border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.error { background: #fdecea; border: 1px solid #f5b7b1; border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.footer { border-top: 1px solid #e5e5e5; background: #fff; padding: 22px 0; margin-top: 30px; color: #606060; font-size: 14px; }
.footer .muted { font-size: 12px; margin-top: 6px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .play-layout { grid-template-columns: 1fr; }
  .game-frame.portrait iframe { height: 700px; }
  .topnav { display: none; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .search input { font-size: 14px; }
}

/* ===== Admin v2 ===== */
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.admin-nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 8px; }
.admin-nav a:hover { background: rgba(255,255,255,.15); }
.admin-nav a.active { background: #ffd93d; color: #0f0f0f; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0; }
.stat-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 18px; text-align: center; }
.stat-num { font-size: 34px; font-weight: 900; line-height: 1.1; }
.stat-label { color: #666; font-weight: 700; margin-top: 6px; }
.admin-thumb { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; align-items: center; }
.admin-filter input[type=search] { flex: 1; min-width: 200px; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; }
.admin-filter select { padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; }
.form-card input[readonly] { background: #f5f5f5; color: #666; }

/* ===== Player accounts + comments (v4) ===== */
.topnav-user { font-weight: 700; color: #606060; white-space: nowrap; }
.social-btn { text-decoration: none; }
.social-google { background: #fff; color: #0f0f0f; border: 1px solid #ccc; }
.social-google:hover { background: #f0f0f0; }
.social-facebook { background: #1877f2; }
.social-facebook:hover { background: #0d65d9; }
.comment-form { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 16px; margin: 16px 0; }
.comment-form textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; font-family: inherit; resize: vertical; }
.comment-list { margin: 16px 0 24px; }
.comment { display: flex; gap: 12px; background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: #ffd93d; color: #0f0f0f; font-weight: 900; font-size: 18px; }
.comment-body { flex: 1; min-width: 0; }
.comment-body p { color: #333; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.comment-meta { margin-bottom: 4px; }
.comment-delete { background: none; border: none; color: #c0392b; font-size: 13px; cursor: pointer; padding: 0; margin-top: 6px; }
.comment-delete:hover { text-decoration: underline; }
.muted { color: #909090; font-size: 13px; }
