/*
Theme Name: OceanStyle Gaming
Theme URI: https://yoursite.com
Author: Your Name
Description: A premium gaming theme inspired by Ocean of Games. Features game character header, light content area, dark navigation, sidebar, SEO optimized, fully customizable via WordPress Customizer.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oceanstyle-gaming
Tags: gaming, two-columns, right-sidebar, custom-header, custom-menu, custom-logo, featured-images, translation-ready, blog
*/

/* ===========================
   RESET
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  background: #f0f0f0;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}
a { color: #1a6496; text-decoration: none; transition: color 0.2s; }
a:hover { color: #e53e3e; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

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

/* ===========================
   TOP BAR
=========================== */
#topbar {
  background: #2c2c2c;
  border-bottom: 1px solid #1a1a1a;
  font-size: 11px;
  padding: 5px 0;
}
#topbar .tb-inner { display: flex; justify-content: space-between; align-items: center; }
#topbar .tb-left { color: #aaa; }
#topbar .tb-right a { color: #bbb; margin-left: 12px; font-size: 11px; }
#topbar .tb-right a:hover { color: #fff; }

/* ===========================
   HEADER / BANNER
=========================== */
#site-header {
  background-color: #1a1a2e;
  background-image: var(--header-bg, none);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  position: relative;
  /* min-height set by dynamic CSS from Customizer */
}
#site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}
#site-header .container { position: relative; z-index: 2; width: 100%; display: block; }
#site-header { margin-bottom: 0 !important; padding-bottom: 0 !important; }
/* Header inner — the real flex row */
#site-header .header-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  width: 100%;
  padding: 14px 0;
  box-sizing: border-box;
}


/* Logo/Search alignment handled via inline <style> in header.php — no CSS classes needed */

/* Logo */
#site-logo-wrap { flex-shrink: 0; }
#site-logo-wrap img { max-height: 90px; width: auto; display: block; }
.text-logo {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  color: #fff;
}
.text-logo span { color: var(--accent, #4a9edd); }

/* Header Search */
#header-search-form {
  display: flex;
  width: 280px;
  flex-shrink: 0;
  flex-grow: 0;
}
#header-search-form input[type="search"] {
  flex: 1;
  background: rgba(255,255,255,0.92);
  border: 2px solid rgba(255,255,255,0.6);
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #333;
  font-size: 12px;
  padding: 9px 13px;
  outline: none;
}
#header-search-form input[type="search"]::placeholder { color: #888; }
#header-search-form input[type="search"]:focus { border-color: var(--accent, #4a9edd); background: #fff; }
#header-search-form button {
  background: var(--accent, #4a9edd);
  border: none;
  border-radius: 0 4px 4px 0;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}
#header-search-form button:hover { filter: brightness(1.15); }

/* ===========================
   NAVIGATION
=========================== */
#main-nav {
  background: var(--nav-bg, #3a3a3a);
  border-bottom: 2px solid var(--accent, #4a9edd);
  position: static; /* default: flows normally — dynamic CSS sets sticky if ON */
  z-index: 200;
  margin: 0;
  padding: 0;
}
/* When sticky is ON, dynamic CSS sets: position:sticky; top:0; */
#main-nav .container { position: relative; }

/* Breadcrumbs */
#breadcrumbs {
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
  padding: 7px 12px;
  font-size: 11px;
  color: #888;
  margin-bottom: 10px;
  border-radius: 3px;
}
#breadcrumbs .bc-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
#breadcrumbs a { color: #555; text-decoration: none; }
#breadcrumbs a:hover { color: var(--accent, #4a9edd); }
#breadcrumbs span { color: #bbb; margin: 0 4px; }
#breadcrumbs .bc-current { color: #333; font-weight: 600; }

#primary-menu {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#primary-menu::-webkit-scrollbar { display: none; }
#primary-menu > li > a {
  color: #fff;
  display: block;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background 0.2s, color 0.2s;
  border-right: 1px solid rgba(255,255,255,0.08);
}
#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-menu-ancestor > a {
  background: var(--accent, #4a9edd);
  color: #fff;
}

/* Mobile hamburger */
#nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  padding: 10px 14px;
}

/* Breadcrumbs CSS defined in Navigation section above */

/* ===========================
   MAIN LAYOUT
=========================== */
#page-wrapper { padding: 14px 0 20px; }
#page-wrapper .inner { display: flex; gap: 14px; align-items: flex-start; }
#content-area { flex: 1; min-width: 0; }
#sidebar-area { width: 220px; flex-shrink: 0; }

/* ===========================
   SECTION HEADING
=========================== */
.block-heading {
  background: var(--nav-bg, #3a3a3a);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding: 8px 14px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-heading::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--accent, #4a9edd);
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

/* ===========================
   POST LIST (main style like OOG)
=========================== */
.posts-list { margin-bottom: 16px; }

.post-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.post-item:hover { border-color: var(--accent, #4a9edd); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.post-item .pi-thumb {
  flex-shrink: 0;
  width: 115px;
  height: 85px;
  overflow: hidden;
}
.post-item .pi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-item:hover .pi-thumb img { transform: scale(1.05); }
.post-item .pi-thumb-ph {
  width: 115px;
  height: 85px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 11px;
  flex-shrink: 0;
}

.post-item .pi-info {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
}
.post-item .pi-title {
  color: #333;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}
.post-item .pi-title a { color: #1a6496; }
.post-item .pi-title a:hover { color: #e53e3e; }
.post-item .pi-meta {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
.post-item .pi-meta .time-badge {
  background: var(--accent, #4a9edd);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 2px;
  margin-right: 6px;
}
.post-item .pi-meta .cat-links a {
  color: #888;
  font-size: 11px;
}
.post-item .pi-meta .cat-links a:hover { color: var(--accent, #4a9edd); }
.post-item .pi-excerpt { color: #666; font-size: 11px; line-height: 1.5; }

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

.game-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.game-card:hover { border-color: var(--accent, #4a9edd); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

.game-card .gc-thumb {
  width: 100%;
  height: 95px;
  overflow: hidden;
  background: #eee;
  position: relative;
}
.game-card .gc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.game-card:hover .gc-thumb img { transform: scale(1.07); }
.game-card .gc-thumb-ph {
  width: 100%;
  height: 95px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 11px;
}
.game-card .gc-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-card:hover .gc-overlay { background: rgba(0,0,0,0.35); }
.gc-overlay-text { color: #fff; font-size: 11px; font-weight: 700; opacity: 0; transition: opacity 0.2s; }
.game-card:hover .gc-overlay-text { opacity: 1; }

.game-card .gc-body { padding: 7px 9px 9px; }
.game-card .gc-title { color: #1a6496; font-size: 11px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.game-card .gc-title a { color: #1a6496; }
.game-card .gc-title a:hover { color: #e53e3e; }
.game-card .gc-meta { display: flex; justify-content: space-between; }
.game-card .gc-cat { color: var(--accent, #4a9edd); font-size: 10px; font-weight: 600; }
.game-card .gc-date { color: #aaa; font-size: 10px; }

/* ===========================
   SINGLE POST
=========================== */
.single-wrap { background: #fff; border: 1px solid #ddd; border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.single-wrap .sw-featured { width: 100%; max-height: 420px; object-fit: cover; }
.single-wrap .sw-body { padding: 18px 20px; }
.single-wrap h1.entry-title { color: #222; font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.single-wrap .entry-meta {
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  color: #777;
  font-size: 11px;
  margin-bottom: 14px;
  padding: 7px 12px;
}
.single-wrap .entry-meta a { color: var(--accent, #4a9edd); }
.single-wrap .entry-content { color: #444; font-size: 13px; line-height: 1.8; }
.single-wrap .entry-content h2,
.single-wrap .entry-content h3 { color: #222; font-size: 15px; margin: 16px 0 8px; }
.single-wrap .entry-content p { margin-bottom: 12px; }
.single-wrap .entry-content ul,
.single-wrap .entry-content ol { list-style: disc; margin: 10px 0 10px 22px; }
.single-wrap .entry-content img { border-radius: 3px; margin: 10px 0; }
.single-wrap .entry-content strong { color: #222; }

/* Game Info Table */
.game-info-table {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  margin: 14px 0;
  overflow: hidden;
  width: 100%;
}
.game-info-table table { width: 100%; border-collapse: collapse; }
.game-info-table td { border-bottom: 1px solid #eee; font-size: 12px; padding: 8px 12px; }
.game-info-table tr:last-child td { border-bottom: none; }
.game-info-table td:first-child { background: #f0f0f0; color: #444; font-weight: 700; width: 140px; }
.game-info-table td:last-child { color: #555; }

/* Download Button */
.btn-download {
  background: var(--accent, #4a9edd);
  border: none;
  border-radius: 4px;
  color: #fff !important;
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 14px 0;
  padding: 13px 32px;
  text-align: center;
  text-transform: uppercase;
  transition: filter 0.2s;
}
.btn-download:hover { filter: brightness(1.1); color: #fff !important; }
.btn-download-wrap { text-align: center; }

/* Tags */
.entry-tags { border-top: 1px solid #eee; margin-top: 14px; padding-top: 10px; }
.entry-tags span { color: #888; font-size: 11px; }
.entry-tags a { background: #eee; border-radius: 2px; color: #555; font-size: 11px; margin: 2px; padding: 2px 8px; display: inline-block; }
.entry-tags a:hover { background: var(--accent, #4a9edd); color: #fff; }

/* ===========================
   PAGINATION
=========================== */
.nav-pagination { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0; }
.nav-pagination a, .nav-pagination span {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  transition: all 0.2s;
}
.nav-pagination a:hover, .nav-pagination .current {
  background: var(--accent, #4a9edd);
  border-color: var(--accent, #4a9edd);
  color: #fff;
}

/* ===========================
   SIDEBAR
=========================== */
.widget-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden;
}
.widget-box-title {
  background: var(--nav-bg, #3a3a3a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}
.widget-box-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--accent, #4a9edd);
  border-radius: 2px;
  flex-shrink: 0;
}
.widget-box-body { padding: 10px 12px; }

/* Search widget */
.sb-search-form { display: flex; }
.sb-search-form input {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 3px 0 0 3px;
  color: #333;
  flex: 1;
  font-size: 12px;
  outline: none;
  padding: 7px 10px;
}
.sb-search-form input:focus { border-color: var(--accent, #4a9edd); background: #fff; }
.sb-search-form button {
  background: var(--accent, #4a9edd);
  border: none;
  border-radius: 0 3px 3px 0;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
}

/* Category list */
.sb-cat-list li {
  border-bottom: 1px solid #f0f0f0;
}
.sb-cat-list li:last-child { border-bottom: none; }
.sb-cat-list li a {
  color: #555;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding: 5px 2px;
  align-items: center;
  transition: color 0.2s;
}
.sb-cat-list li a:hover { color: var(--accent, #4a9edd); }
.sb-cat-list .cat-count {
  background: var(--accent, #4a9edd);
  border-radius: 2px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
}

/* Recent posts sidebar */
.sb-recent-item { display: flex; gap: 8px; margin-bottom: 9px; align-items: flex-start; }
.sb-recent-item:last-child { margin-bottom: 0; }
.sb-recent-item img { border-radius: 2px; flex-shrink: 0; height: 46px; object-fit: cover; width: 62px; }
.sb-recent-ph { background: #eee; border-radius: 2px; flex-shrink: 0; height: 46px; width: 62px; }
.sb-recent-item .sr-title { color: #444; font-size: 11px; line-height: 1.4; }
.sb-recent-item .sr-title a { color: #1a6496; }
.sb-recent-item .sr-title a:hover { color: #e53e3e; }
.sb-recent-item .sr-date { color: #aaa; font-size: 10px; margin-top: 2px; }

/* Tags cloud widget */
.sb-tags a {
  background: #f0f0f0;
  border-radius: 2px;
  color: #555;
  display: inline-block;
  font-size: 11px;
  margin: 2px;
  padding: 3px 8px;
}
.sb-tags a:hover { background: var(--accent, #4a9edd); color: #fff; }

/* ===========================
   COMMENTS
=========================== */
#comments-section { background: #fff; border: 1px solid #ddd; border-radius: 3px; margin-top: 12px; padding: 16px 18px; }
#comments-section h2 { color: #333; font-size: 14px; font-weight: 700; margin-bottom: 14px; border-bottom: 2px solid var(--accent, #4a9edd); padding-bottom: 8px; }
.comment-list-wrap .comment { border-bottom: 1px solid #f0f0f0; margin-bottom: 12px; padding-bottom: 12px; }
.comment-author-name { color: var(--accent, #4a9edd); font-size: 12px; font-weight: 700; }
.comment-date { color: #aaa; font-size: 10px; margin-bottom: 6px; }
.comment-text p { color: #555; font-size: 12px; line-height: 1.7; }
#respond { margin-top: 16px; }
#respond h3 { color: #333; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
#respond .comment-form input,
#respond .comment-form textarea {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #333;
  font-size: 12px;
  margin-bottom: 8px;
  outline: none;
  padding: 8px 11px;
  width: 100%;
  transition: border-color 0.2s;
}
#respond .comment-form input:focus,
#respond .comment-form textarea:focus { border-color: var(--accent, #4a9edd); background: #fff; }
#respond .comment-form textarea { height: 90px; resize: vertical; }
#respond .comment-form input[type="submit"] {
  background: var(--accent, #4a9edd);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  width: auto;
}
#respond .comment-form input[type="submit"]:hover { filter: brightness(1.1); }

/* ===========================
   FOOTER
=========================== */
#site-footer { background: #2c2c2c; border-top: 3px solid var(--accent, #4a9edd); margin-top: 20px; }
.footer-widgets-area { border-bottom: 1px solid #3a3a3a; padding: 22px 0 16px; }
.footer-widgets-area .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.footer-widgets-area h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #3a3a3a; text-transform: uppercase; }
.footer-widgets-area p, .footer-widgets-area li a { color: #888; font-size: 12px; line-height: 1.8; }
.footer-widgets-area li { border-bottom: 1px solid #333; }
.footer-widgets-area li a { display: block; padding: 3px 0; }
.footer-widgets-area li a:hover { color: var(--accent, #4a9edd); }
.footer-bottom { padding: 12px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-nav-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-nav-links a { color: #666; font-size: 11px; }
.footer-nav-links a:hover { color: var(--accent, #4a9edd); }
.footer-copy { color: #555; font-size: 11px; }

/* ===========================
   SCROLL TO TOP
=========================== */
#scroll-top-btn {
  background: var(--accent, #4a9edd);
  border: none;
  border-radius: 4px;
  bottom: 22px;
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 16px;
  height: 38px;
  line-height: 38px;
  position: fixed;
  right: 18px;
  text-align: center;
  width: 38px;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#scroll-top-btn:hover { filter: brightness(1.1); }

/* ===========================
   404 & PAGE
=========================== */
.page-content-box { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 22px; }
.page-content-box h1 { color: #222; font-size: 18px; margin-bottom: 12px; }
.page-content-box .page-body { color: #555; font-size: 13px; line-height: 1.8; }
.page-content-box .page-body p { margin-bottom: 12px; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  #page-wrapper .inner { flex-direction: column; }
  #sidebar-area { width: 100%; }
  .game-cards-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 650px) {
  #nav-toggle { display: block; }
  #primary-menu { display: none; flex-direction: column; width: 100%; }
  #primary-menu.nav-open { display: flex; }
  #primary-menu > li > a { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  #site-header .header-inner { flex-direction: column; text-align: center; }
  #header-search-form { max-width: 100%; }
  .post-item .pi-thumb, .post-item .pi-thumb-ph { width: 90px; height: 70px; }
}
@media (max-width: 420px) {
  .game-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .text-logo { font-size: 26px; }
}

/* ===========================
   ADMIN BAR FIX
   Only applies when WP admin bar is visible AND nav is sticky
=========================== */
@media screen and (min-width: 783px) {
  .admin-bar #main-nav[style*="sticky"] { top: 32px; }
}
@media screen and (max-width: 782px) {
  .admin-bar #main-nav[style*="sticky"] { top: 46px; }
}
