/* main.css - Game Portal Anasayfa Stilleri */
:root {
  /* Category Dark tema ana değişkenleri */
  --acc: #1a1f35;
  --acc-2: #242940;
  --bg: #0f1220;
  --layer: #151a35;
  --card: #171b2e;
  --txt: #e8ecff;
  --muted: #9ea7bd;
  --ring: rgba(91,140,255,.35);
  --border: #222847;
  --border-2: #2b3154;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(0,0,0,.25);
  --gap: 12px;
  --green: #28a745;
  --orange: #fd7e14;
  --red: #dc3545;
  --gray: #6c757d;

  /* Sidebar Styles */
  --sidebar-card-bg: #0f1220;
  --sidebar-border: #2a2f45;
  --sidebar-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --sidebar-radius: 8px;
  --sidebar-primary: #6c5ce7;
  --sidebar-primary-hover: #8175ea;
  --sidebar-accent: #ffcc00;
  --sidebar-text-light: #e4e6eb;
  --sidebar-text-muted: #a0a4b2;
  --sidebar-bg-dark: #1a1f35;
  --sidebar-bg-dark-hover: #242940;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--txt);
  background: radial-gradient(1200px 800px at 20% -10%, var(--layer) 0%, var(--bg) 45%) fixed;
  font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  overflow-x: hidden;
}

a {
  color: var(--acc);
  text-decoration: none;
}

a:hover {
  color: #7aa1ff;
}

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

hr {
  border: 0;
  border-top: 1px solid #2a3050;
  margin: 12px 0;
}

/* =========================
   Layout
   ========================= */
.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--gap);
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.page-layout-sidebar {
  background: linear-gradient(180deg, #161b33 0%, #12172e 100%);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--sidebar-radius);
  box-shadow: var(--sidebar-shadow);
  padding: 12px;
  color: var(--sidebar-text-light);
}

.page-layout-content {
  min-width: 0;
  background: linear-gradient(180deg, #161b33 0%, #12172e 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}

.page-layout-sidebar {
  background: linear-gradient(180deg, #161b33 0%, #12172e 100%);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--sidebar-radius);
  box-shadow: var(--sidebar-shadow);
  padding: 12px;
  color: var(--sidebar-text-light);
}

.sidebar-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-header i {
  font-size: 24px;
  margin-right: 10px;
  color: var(--sidebar-accent);
}

.sidebar-header h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--sidebar-text-light);
}

.sidebar-toggle {
  width: 100%;
  padding: 12px;
  background: var(--sidebar-bg-dark);
  color: var(--sidebar-text-light);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--sidebar-radius);
  cursor: pointer;
  margin-bottom: 15px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--sidebar-bg-dark-hover);
  border-color: var(--sidebar-primary);
}

.category-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.category-list.expanded {
  max-height: 500px;
}

.category-list-item {
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
}

.category-list.expanded .category-list-item {
  opacity: 1;
  transform: translateY(0);
}

.button-full-width {
  display: block;
  width: 100%;
  text-align: center;
}

.button-secondary {
  padding: 12px 15px;
  background: var(--sidebar-bg-dark);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--sidebar-radius);
  text-decoration: none;
  color: var(--sidebar-text-light);
  transition: all 0.3s ease;
  font-weight: 500;
}

.button-secondary:hover {
  background: var(--sidebar-bg-dark-hover);
  border-color: var(--sidebar-primary);
  transform: translateY(-1px);
}

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.search-form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--sidebar-radius);
  font-size: 14px;
  background: var(--sidebar-bg-dark);
  color: var(--sidebar-text-light);
  transition: border-color 0.3s ease;
}

.search-form-input:focus {
  outline: none;
  border-color: var(--sidebar-primary);
}

.search-form-input::placeholder {
  color: var(--sidebar-text-muted);
}

.search-form-button {
  padding: 10px;
  background: var(--sidebar-primary);
  color: white;
  border: none;
  border-radius: var(--sidebar-radius);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
  width: 100%;
}

.search-form-button:hover {
  background: var(--sidebar-primary-hover);
}

/* =========================================
   Responsive Düzen
   ========================================= */

/* Masaüstü düzeni */
@media (min-width: 992px) {
  .page-layout-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
  }
}

/* Tablet düzeni */
@media (min-width: 768px) and (max-width: 991px) {
  .page-layout-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

/* Mobil düzeni */
@media (max-width: 767px) {
  .page-layout-sidebar {
    width: 100%;
    position: relative;
    margin-bottom: 20px;
  }
}

/* =========================
   Search / Forms
   ========================= */
.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.search-form-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: #0e1220;
  color: var(--txt);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-form-input::placeholder {
  color: #7f87a6;
}

.search-form-input:focus {
  outline: 0;
  border-color: #3a58a6;
  box-shadow: 0 0 0 3px var(--ring);
}

.search-form-button {
  display: inline-block;
  background: linear-gradient(180deg, var(--acc), var(--acc-2));
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(91,140,255,.25);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}

.search-form-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(91,140,255,.33);
}

.search-form-compact .search-form-input {
  padding: 8px 10px;
  border-radius: 8px;
}

/* =========================
   Buttons
   ========================= */
.button {
  background: linear-gradient(180deg, var(--acc), var(--acc-2));
  border: 1px solid transparent;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(91,140,255,.25);
  color: #fff;
  cursor: pointer;
  display: inline-block;
  padding: 8px 12px;
  text-decoration: none;
  transition:
    transform .12s ease,
    box-shadow .2s ease,
    background .2s ease,
    border-color .2s ease,
    opacity .2s ease;
}

.button-full-width {
  display: block;
  width: 100%;
  text-align: center;
}

.button-secondary {
  padding: 12px 15px;
  background: var(--sidebar-bg-dark);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--sidebar-radius);
  text-decoration: none;
  color: var(--sidebar-text-light);
  transition: all 0.3s ease;
  font-weight: 500;
}

.button-secondary:hover {
  background: var(--sidebar-bg-dark-hover);
  border-color: var(--sidebar-primary);
  transform: translateY(-1px);
}

.button:hover {
  box-shadow: 0 10px 20px rgba(91,140,255,.33);
  transform: translateY(-1px);
}


/* =========================
   Alerts
   ========================= */
.alert {
  background: #262b45;
  border: 1px solid #384078;
  padding: 10px;
  border-radius: 10px;
  margin: 8px 0;
  box-shadow: 0 8px 16px rgba(0,0,0,.24) inset;
  color: var(--txt);
}

.alert-info {
  background: #1b2040;
  border-color: #2f3764;
  color: #cbd5ff;
}

/* =========================
   Grids
   ========================= */
.category-grid,
.game-grid {
  display: grid;
  gap: var(--gap);
}

.category-grid-4-col,
.game-grid-4-col {
  grid-template-columns: repeat(4, minmax(0,1fr));
}

@media (max-width: 1024px) {
  .category-grid-4-col,
  .game-grid-4-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .category-grid-4-col,
  .game-grid-4-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   Cards – Game
   ========================= */
.game-card {
  display: block;
  background: linear-gradient(180deg, #191d33 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
  border-color: #2f3764;
}

.game-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #0c1020;
}

.game-card-image-blur {
  filter: blur(6px);
  transform: scale(1.05);
}

.game-card-content {
  padding: 8px;
}

.game-card-title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #cbd5ff;
}

.game-card-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.game-card-price {
  font-weight: 700;
  color: #cbd5ff;
}

.game-card-category {
  background: #293055;
  border: 1px solid #334071;
  color: #cbd5ff;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

/* =========================
   Sections
   ========================= */
.game-section,
.category-section {
  margin: 6px 0 10px;
}

.game-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #121732;
  border: 1px solid #273056;
  border-radius: 12px;
  margin-bottom: 10px;
}

.category-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #121732;
  border: 1px solid #273056;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* =========================
   Lists
   ========================= */
.category-list {
  display: grid;
  gap: 8px;
}

.category-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #191d33;
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* =========================
   Pagination
   ========================= */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}

.pagination-item { }

.pagination-link {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #121732;
  color: var(--txt);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}

.pagination-link:hover {
  transform: translateY(-1px);
  border-color: #2f3764;
  background: #1a2042;
}

.pagination-item-active .pagination-link {
  background: linear-gradient(180deg, var(--acc), var(--acc-2));
  color: #fff;
  border-color: transparent;
}

.pagination-item-disabled .pagination-link {
  opacity: .5;
  pointer-events: none;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
}
