/* ───────── Genel Ayarlar ───────── */
* { box-sizing: border-box; }
body {
  font-family: sans-serif;
  margin: 0;
  background: linear-gradient(to bottom right, #e0c3fc, #8ec5fc);
/*background: #f4f4f4;*/
  color: #333;
  line-height: 1.6;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ───────── Header ───────── */
header, footer {
  background: linear-gradient(to right, #4e54c8, #8f94fb);
  color: #fff;
  text-align: center;
  padding: 30px 20px;
}
nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.nav-button {
  padding: 10px 16px;
  background: #fff;
  color: #4e54c8;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.nav-button:hover {
  background: #ff9800;
  color: #fff;
}

/* ───────── Arama Kutusu ───────── */
header form#search-form {
  width: 100%;
  max-width: 300px;
  margin: 20px auto;
}
#search-input {
  width: 100%;
  padding: 15px 25px;
  font-size: 1.25rem;
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: box-shadow .2s;
}
#search-input:focus {
  outline: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ───────── Reklam Alanı ───────── */
.ad-section {
  max-width: 970px;
  margin: 30px auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
  padding: 10px;
  text-align: center;
  min-height: 250px;
}

/* ───────── Oyun Grid ───────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1600px;
  margin: auto;
}
.game-card {
  background: #fad0c4;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 10px 15px;
  text-decoration: none;
  color: inherit;
}
.game-card:hover {
  background: #f0f3ff;
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.game-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 10px;
  border: 3 px;
  display: block;
  transition: transform .3s ease;
}
.game-card:hover img {
  transform: scale(1.05);
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ffc107;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 13px;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1;
}
.game-card h3 {
  margin: 10px 0 5px;
  font-size: 14px;
  text-align: center;
}

/* ───────── Parlayan Buton ───────── */
.play-button {
  margin: 8px auto 0;
  padding: 6px 14px;
  background: #4e54c8;
  color: #fff;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  transition: background .3s ease;
  position: relative;
  overflow: hidden;
}
.play-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  transform: skewX(-25deg);
  transition: left 0.6s;
}
.play-button:hover::before {
  left: 130%;
}
.play-button:hover {
  background: #3f42a8;
}

/* ───────── Detay Sayfası ───────── */
.game-detail-grid {
  display: grid;
  grid-template-columns: 160px 800px 160px;
  gap: 20px;
  max-width: 1140px;
  margin: 40px auto;
}
.left-panel, .right-panel {
  width: 160px;
  height: 600px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-frame {
  position: relative;
  width: 800px;
  height: 600px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
#game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}
.game-placeholder {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(8px);
}
.play-btn {
  position: relative;
  z-index: 2;
  font-size: 48px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  cursor: pointer;
  transition: background .2s;
}
.play-btn:hover {
  background: rgba(0,0,0,0.8);
}
.fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 20px;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
  z-index: 10;
}
.fullscreen-btn:hover {
  background: #e68900;
}

/* ───────── Benzer Oyunlar ───────── */
.similar-games {
  max-width: 800px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.similar-item {
  border: 2px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  height: 150px;
}
.similar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.similar-item:hover img {
  transform: scale(1.1);
}

/* ───────── Açıklama ───────── */
.game-info {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
  text-align: left;
  font-size: 16px;
}

/* ───────── Responsive ───────── */
@media (max-width: 1024px) {
  .game-detail-grid {
    grid-template-columns: 1fr;
  }
  .left-panel, .right-panel {
    display: none;
  }
  .game-frame {
    width: 100%;
    height: auto;
    padding-bottom: 56.25%;
  }
  #game-iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: block;
  }
}
@media (max-width: 768px) {
  nav { flex-direction: column; }
}

/* ───────── Footer ───────── */
footer {
  background: linear-gradient(to right, #4e54c8, #8f94fb);
  color: white;
  padding: 30px 20px;
  text-align: center;
  margin-top: 40px;
}
.footer-content {
  max-width: 960px;
  margin: 0 auto;
}
.footer-content p {
  margin-bottom: 15px;
  font-size: 15px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s ease;
}
.footer-links li a:hover {
  color: #ffcc00;
}

/* --- Fix for Similar Games section --- */
.similar-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

.similar-item {
  flex: 0 1 140px;        /* her kart 140px genişlik */
  aspect-ratio: 1 / 1;    /* kare */
  border-radius: 12px;
  overflow: hidden;
  background: #101721;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.similar-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}