/*
Theme Name: GameZone Dark
Theme URI: https://yoursite.com
Author: GameZone
Author URI: https://yoursite.com
Description: A fast, dark gaming theme for PC game download websites. Ocean of Games style layout with sidebar, categories, and game cards.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gamezone-dark
Tags: dark, gaming, blog, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  background: #111111;
  color: #dddddd;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

a {
  color: #e53e3e;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fc8181;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ===========================
   TOP BAR
=========================== */
#topbar {
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  padding: 5px 0;
  font-size: 11px;
}

#topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#topbar .topbar-left {
  color: #888;
}

#topbar .topbar-right a {
  color: #aaa;
  margin-left: 14px;
  font-size: 11px;
}

#topbar .topbar-right a:hover {
  color: #e53e3e;
}

/* ===========================
   HEADER
=========================== */
#header {
  background: #1a1a1a;
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#site-logo {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  flex-shrink: 0;
}

#site-logo span {
  color: #e53e3e;
}

#site-logo:hover {
  color: #fff;
}

/* Search Form */
#header-search {
  display: flex;
  max-width: 340px;
  width: 100%;
}

#header-search input[type="search"] {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #ddd;
  font-size: 12px;
  padding: 8px 12px;
  outline: none;
}

#header-search input[type="search"]::placeholder {
  color: #666;
}

#header-search input[type="search"]:focus {
  border-color: #e53e3e;
  background: #222;
}

#header-search button {
  background: #e53e3e;
  border: none;
  border-radius: 0 4px 4px 0;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 16px;
  transition: background 0.2s;
}

#header-search button:hover {
  background: #c53030;
}

/* ===========================
   NAVIGATION
=========================== */
#navbar {
  background: #e53e3e;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

#navbar .container {
  display: flex;
  align-items: center;
}

#primary-menu {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#primary-menu::-webkit-scrollbar {
  display: none;
}

#primary-menu li a {
  color: #fff;
  display: block;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 14px;
  white-space: nowrap;
  transition: background 0.2s;
}

#primary-menu li a:hover,
#primary-menu li.current-menu-item a {
  background: rgba(0,0,0,0.25);
  color: #fff;
}

/* ===========================
   CONTAINER
=========================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ===========================
   MAIN LAYOUT
=========================== */
#main-wrapper {
  padding: 14px 0;
}

#main-wrapper .container {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

#content {
  flex: 1;
  min-width: 0;
}

#sidebar {
  width: 210px;
  flex-shrink: 0;
}

/* ===========================
   SECTION TITLE
=========================== */
.section-title {
  background: #1e1e1e;
  border-left: 4px solid #e53e3e;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding: 7px 12px;
  text-transform: uppercase;
}

/* ===========================
   GAME CARDS GRID
=========================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.game-card {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.game-card:hover {
  border-color: #e53e3e;
  transform: translateY(-2px);
}

.game-card .card-thumb {
  width: 100%;
  height: 90px;
  object-fit: cover;
  background: #2a2a2a;
}

.game-card .card-thumb-placeholder {
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 11px;
}

.game-card .card-body {
  padding: 7px 9px;
}

.game-card .card-title {
  color: #ddd;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card .card-title a {
  color: #ddd;
}

.game-card .card-title a:hover {
  color: #e53e3e;
}

.game-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-card .card-cat {
  color: #e53e3e;
  font-size: 10px;
}

.game-card .card-size {
  color: #666;
  font-size: 10px;
}

/* ===========================
   POST LIST (Recent Posts)
=========================== */
.post-list {
  margin-bottom: 18px;
}

.post-list-item {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  display: flex;
  gap: 10px;
  margin-bottom: 7px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.post-list-item:hover {
  border-color: #e53e3e;
}

.post-list-item .post-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  object-fit: cover;
  background: #2a2a2a;
}

.post-list-item .post-thumb-placeholder {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 11px;
}

.post-list-item .post-info {
  flex: 1;
  padding: 8px 10px 8px 0;
  min-width: 0;
}

.post-list-item .post-title {
  color: #ddd;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 5px;
}

.post-list-item .post-title a {
  color: #ddd;
}

.post-list-item .post-title a:hover {
  color: #e53e3e;
}

.post-list-item .post-meta {
  color: #666;
  font-size: 10px;
}

.post-list-item .post-meta .cat-link {
  color: #e53e3e;
  margin-right: 6px;
}

/* ===========================
   SINGLE POST
=========================== */
.single-post-box {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.single-post-box .post-featured-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

.single-post-box .post-content-wrap {
  padding: 18px;
}

.single-post-box h1.post-title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.single-post-box .post-meta-bar {
  border-bottom: 1px solid #2a2a2a;
  color: #666;
  font-size: 11px;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.single-post-box .post-meta-bar a {
  color: #e53e3e;
}

.single-post-box .post-body {
  color: #ccc;
  font-size: 13px;
  line-height: 1.8;
}

.single-post-box .post-body h2,
.single-post-box .post-body h3 {
  color: #fff;
  margin: 16px 0 8px;
}

.single-post-box .post-body p {
  margin-bottom: 12px;
}

.single-post-box .post-body ul,
.single-post-box .post-body ol {
  list-style: disc;
  margin: 10px 0 10px 20px;
}

.single-post-box .post-body img {
  border-radius: 4px;
  margin: 12px 0;
}

/* Download Button */
.download-btn {
  background: #e53e3e;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0;
  padding: 12px 28px;
  text-align: center;
  text-transform: uppercase;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #c53030;
  color: #fff;
}

/* Info Box */
.info-box {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  margin: 14px 0;
  overflow: hidden;
}

.info-box table {
  width: 100%;
  border-collapse: collapse;
}

.info-box table tr {
  border-bottom: 1px solid #2a2a2a;
}

.info-box table tr:last-child {
  border-bottom: none;
}

.info-box table td {
  padding: 7px 12px;
  font-size: 12px;
  color: #ccc;
}

.info-box table td:first-child {
  color: #e53e3e;
  font-weight: 600;
  width: 130px;
}

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0;
}

.pagination a,
.pagination span {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: #bbb;
  font-size: 12px;
  padding: 5px 10px;
  transition: background 0.2s;
}

.pagination a:hover,
.pagination .current {
  background: #e53e3e;
  border-color: #e53e3e;
  color: #fff;
}

/* ===========================
   SIDEBAR WIDGETS
=========================== */
.widget {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}

.widget-title {
  background: #e53e3e;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  text-transform: uppercase;
}

.widget-body {
  padding: 10px;
}

/* Category list widget */
.cat-widget-list li {
  border-bottom: 1px solid #2a2a2a;
}

.cat-widget-list li:last-child {
  border-bottom: none;
}

.cat-widget-list li a {
  align-items: center;
  color: #bbb;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  padding: 5px 2px;
  transition: color 0.2s;
}

.cat-widget-list li a:hover {
  color: #e53e3e;
}

.cat-widget-list .count {
  background: #e53e3e;
  border-radius: 2px;
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
}

/* Recent posts widget */
.recent-post-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.recent-post-item:last-child {
  margin-bottom: 0;
}

.recent-post-item img {
  border-radius: 3px;
  flex-shrink: 0;
  height: 44px;
  object-fit: cover;
  width: 60px;
}

.recent-post-item .rp-placeholder {
  background: #2a2a2a;
  border-radius: 3px;
  flex-shrink: 0;
  height: 44px;
  width: 60px;
}

.recent-post-item .rp-title {
  color: #bbb;
  font-size: 11px;
  line-height: 1.4;
}

.recent-post-item .rp-title a {
  color: #bbb;
}

.recent-post-item .rp-title a:hover {
  color: #e53e3e;
}

.recent-post-item .rp-date {
  color: #555;
  font-size: 10px;
  margin-top: 3px;
}

/* Search Widget */
.widget-search {
  display: flex;
}

.widget-search input {
  background: #111;
  border: 1px solid #333;
  border-right: none;
  border-radius: 3px 0 0 3px;
  color: #ddd;
  flex: 1;
  font-size: 12px;
  outline: none;
  padding: 7px 10px;
}

.widget-search button {
  background: #e53e3e;
  border: none;
  border-radius: 0 3px 3px 0;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  padding: 7px 12px;
}

/* ===========================
   FOOTER
=========================== */
#footer {
  background: #161616;
  border-top: 3px solid #e53e3e;
  margin-top: 20px;
}

#footer-widgets {
  border-bottom: 1px solid #2a2a2a;
  padding: 24px 0 16px;
}

#footer-widgets .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

#footer-widgets h3 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}

#footer-widgets p,
#footer-widgets li a {
  color: #888;
  font-size: 12px;
  line-height: 1.7;
}

#footer-widgets li {
  border-bottom: 1px solid #222;
}

#footer-widgets li a {
  display: block;
  padding: 4px 0;
}

#footer-widgets li a:hover {
  color: #e53e3e;
}

#footer-bottom {
  padding: 12px 0;
}

#footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #666;
  font-size: 11px;
}

.footer-links a:hover {
  color: #e53e3e;
}

.footer-copy {
  color: #444;
  font-size: 11px;
}

/* ===========================
   BADGES
=========================== */
.badge {
  border-radius: 2px;
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
}

.badge-red { background: #e53e3e; color: #fff; }
.badge-blue { background: #2b6cb0; color: #fff; }
.badge-green { background: #276749; color: #fff; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  #main-wrapper .container {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
  }

  #header .container {
    flex-direction: column;
    gap: 10px;
  }

  #header-search {
    max-width: 100%;
  }

  #site-logo {
    font-size: 22px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  #footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .post-list-item .post-thumb,
  .post-list-item .post-thumb-placeholder {
    width: 80px;
    height: 60px;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
