
:root {
  /* --- TEMEL DEĞİŞKENLER VE GEÇİŞLER --- */
  --accent-color: linear-gradient(90deg, #4f9cf9, #3b82f6);
  --blue: #4f9cf9; 
  --card-radius: 14px;
  --maxw: 1240px;
  
  --bg-color: #11151c;
  --panel-color: #1b212c;
  --muted-color: #a3bffa;
  --card-bg: linear-gradient(180deg, rgba(79, 156, 249, 0.03), rgba(79, 156, 249, 0.02));
  --card-border: 1px solid rgba(79, 156, 249, 0.1);
  --blur-filter: none;
  --hero-meta-bg: linear-gradient(180deg, rgba(79, 156, 249, 0.03), rgba(79, 156, 249, 0.02));
  --hero-meta-border: 1px solid rgba(79, 156, 249, 0.1);

  transition: all 1.5s ease-in-out;
}

body.cinematic-mode {
    transition: background-color 1.5s ease-in-out;
}
body {
  margin: 0 !important;        /* tarayıcı default margin sıfır */
  padding: 50px 0 0 0  !important;       /* iç boşluk sıfır */
  display: flex;
  flex-direction: column;
  align-items: stretch !important;  /* 🔹 içerikler tam genişlikte */
}

body.cinematic-mode:root {
    --bg-color: #000;
    --panel-color: rgba(20, 37, 61, 0.7);
    --muted-color: #e0f2fe;
    --card-bg: rgba(255, 255, 255, 0.04); 
    --card-border: 1px solid rgba(255, 255, 255, 0.08);
    --blur-filter: blur(16px);
    --hero-meta-bg: rgba(255, 255, 255, 0.08);
    --hero-meta-border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- HAREKETLİ ARKA PLAN --- */
@keyframes moveParticles {
    0% { transform: translate(0, 0); opacity: 0.5; } 
    50% { transform: translate(100px, -50px); opacity: 0.8; } 
    100% { transform: translate(200px, 100px); opacity: 0.3; } 
}
.particle {
    position: fixed;
    width: 10px; 
    height: 10px; 
    background-color: var(--blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    filter: blur(4px); 
    animation: moveParticles 15s infinite ease-in-out alternate; 
}
.p1 { top: 10%; left: 10%; animation-duration: 15s; animation-delay: 0s;}
.p2 { top: 50%; left: 90%; animation-duration: 12s; animation-delay: 5s; }
.p3 { top: 80%; left: 30%; animation-duration: 18s; animation-delay: 10s; }
.p4 { top: 30%; left: 60%; animation-duration: 10s; animation-delay: 1s; }
.p5 { top: 65%; left: 5%; animation-duration: 13s; animation-delay: 8s; }

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { 
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  
  background: radial-gradient(1200px 600px at 30% 35%, rgba(79, 156, 249, 0.05), transparent),
              radial-gradient(1000px 500px at 75% 65%, rgba(59, 130, 246, 0.04), transparent),
              var(--bg-color);
  color: #e6eef3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  padding: 12px 0 0 0;
  display: flex;
  justify-content: center;
  position: relative;
}

body.cinematic-mode {
  background-image: url('img/bg.jpg');
  background-size: cover;
  background-position: center 30%; 
  background-attachment: fixed;
}
body.cinematic-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
    pointer-events: none;
}
body.cinematic-mode .particle { display: none; }

/* --- YÜKLEME VE ANİMASYONLAR --- */
body.loading { overflow: hidden; }
body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color); 
    z-index: 9999;
    animation: fadeOut 0.3s ease-out 0.6s forwards;
}
@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

.hero-card, .section-head, .game-card, .wish-card, .side-card { 
    opacity: 0; 
}
.hero-card.animate, .section-head.animate, .game-card.animate, .wish-card.animate, .side-card.animate { 
    opacity: 1; 
}

.fade-in-up {
  opacity: 0;
  transform: translateY(15px); 
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in-up.animate {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-up.delay-1 { transition-delay: calc(0.1s + var(--fade-delay, 0s)); } 
.fade-in-up.delay-2 { transition-delay: calc(0.15s + var(--fade-delay, 0s)); }
.fade-in-up.delay-3 { transition-delay: calc(0.2s + var(--fade-delay, 0s)); }
.fade-in-up.delay-4 { transition-delay: calc(0.25s + var(--fade-delay, 0s)); }
.fade-in-up.delay-5 { transition-delay: calc(0.3s + var(--fade-delay, 0s)); }
.fade-in-up.delay-6 { transition-delay: calc(0.35s + var(--fade-delay, 0s)); }
.fade-in-up.delay-7 { transition-delay: calc(0.4s + var(--fade-delay, 0s)); }
.fade-in-up.delay-8 { transition-delay: calc(0.45s + var(--fade-delay, 0s)); }
.fade-in-up.delay-9 { transition-delay: calc(0.5s + var(--fade-delay, 0s)); }
.fade-in-up.delay-10 { transition-delay: calc(0.55s + var(--fade-delay, 0s)); }
.fade-in-up.delay-11 { transition-delay: calc(0.6s + var(--fade-delay, 0s)); }

/* --- ANA DÜZEN --- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 20px;   /* 🔹 üstten daha fazla boşluk */
  margin: 0 auto;   
  margin-top: 40px;   /* 🔹 hero section için boşluk */
  margin-bottom: 40px;/* 🔹 footer’dan ayırma */
}

.main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  order: 1;
  width: 100%;
  max-width: 100%;
}

.side { 
  display: flex; 
  flex-direction: column; 
  gap: 14px; 
  position: relative;
  order: 2;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  padding-bottom: 12px;
}

.featured {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

/* --- HERO CARD --- */
.hero-card {
  position: relative;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  backdrop-filter: var(--blur-filter); 

  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px;
  width: 100%;
  
  transform: translateY(20px) scale(0.99); 
  transition: opacity 0.5s ease-out, 
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-card.animate {
  transform: translateY(0) scale(1);
}

.hero-media {
  width: 100%; 
  height: 150px; 
  min-height: 130px;
  flex: none; 
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-media:hover img { transform: scale(1.06); }

.hero-meta {
  width: 100%; 
  min-width: auto;
  position: relative;
  padding: 8px;
  border-radius: 10px;
  background: var(--hero-meta-bg);
  border: var(--hero-meta-border);
  backdrop-filter: var(--blur-filter);
  transition: all 1.5s ease-in-out;
}

.badge-row { 
  display: flex; 
  gap: 5px; 
  margin-bottom: 6px; 
  flex-wrap: wrap; 
}

.platform-badge {
  background: rgba(79, 156, 249, 0.1); 
  padding: 3px 7px; 
  border-radius: 5px; 
  font-size: 10px; 
  color: var(--muted-color);
}

.hero-meta h2 {
  margin: 3px 0 5px; 
  font-size: 15px; 
  line-height: 1.2; 
  font-weight: 700;
  background: var(--accent-color);
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
}

.hero-meta p { 
  margin: 0 0 7px; 
  color: var(--muted-color); 
  font-size: 11px; 
  line-height: 1.4; 
}

.price-row { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  margin-top: 6px; 
}

.price { display: none; }

@keyframes bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.btn-buy {
  margin-left: 0; 
  width: 34px; 
  height: 34px; 
  padding: 0; 
  display: flex; 
  align-items: center;
  justify-content: center; 
  border-radius: 50%; 
  background: var(--accent-color);
  color: #fff; 
  font-weight: 700; 
  box-shadow: 0 4px 20px rgba(79, 156, 249, 0.3);
  border: none; 
  cursor: pointer; 
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  font-size: 17px;
}
.btn-buy:hover { 
  transform: translateY(-2px) scale(1.05); 
  box-shadow: 0 8px 30px rgba(79, 156, 249, 0.4); 
}
.btn-buy:active { animation: bounce 0.15s ease-in-out; }

@keyframes subtleGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(79, 156, 249, 0.4); }
    50% { box-shadow: 0 0 10px rgba(79, 156, 249, 0.7); }
}

.hero-friends {
  position: absolute; 
  left: 8px; 
  bottom: 8px; 
  display: flex; 
  align-items: center; 
  gap: 4px; 
  z-index: 6;
}

.avatar {
  width: 26px; 
  height: 26px; 
  border-radius: 50%; 
  overflow: hidden; 
  border: 2px solid var(--hero-meta-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}
.avatar:nth-child(1), .avatar:nth-child(2) {
  animation: subtleGlow 4s infinite ease-in-out alternate;
}

.avatar img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

.friend-pill {
  background: rgba(0, 0, 0, 0.4); 
  padding: 4px 7px; 
  border-radius: 999px; 
  font-size: 9px; 
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--blur-filter);
  transition: all 1.5s ease-in-out;
}

/* --- SECTIONS --- */
.section { 
  margin-top: 0; 
  width: 100%;
}

.section-head { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: 8px; 
}

.section-head h3 { 
  margin: 0; 
  font-size: 14px; 
  font-weight: 600; 
}

.section-head a { 
  color: var(--muted-color); 
  font-size: 11px; 
  text-decoration: none; 
}

/* --- YATAY KAYDIRMA YOKK SADECE DIKEY --- */
.row-scroll { 
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  overflow: visible;
}

.game-card {
  width: 100%;
  height: 90px; 
  border-radius: 8px; 
  overflow: hidden; 
  position: relative;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--blur-filter);
  cursor: pointer;

  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.game-card.animate {
  opacity: 1;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.game-card img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
  transform: scale(1); 
  transition: transform 0.3s ease; 
} 

.game-card:hover img { 
  transition: transform 0.1s ease; 
  transform: scale(1.06); 
}

.game-card .tag {
  position: absolute; 
  left: 6px; 
  bottom: 6px; 
  background: rgba(0, 0, 0, 0.75);
  padding: 3px 5px; 
  border-radius: 5px; 
  font-size: 9px; 
  color: var(--muted-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- WISH GRID --- */
.grid { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 10px; 
  width: 100%;
}

.wish-card {
  height: 110px; 
  width: 100%;
  border-radius: 8px; 
  overflow: hidden; 
  position: relative;
  background: var(--card-bg);
  border: var(--card-border);
  backdrop-filter: var(--blur-filter);

  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.wish-card.animate {
  opacity: 1;
}

.wish-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.wish-card img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

.wish-overlay { 
  position: absolute; 
  inset: 0; 
  display: flex; 
  flex-direction: column; 
  justify-content: flex-end;
  padding: 8px; 
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85));
}

.wish-title { 
  font-weight: 700; 
  font-size: 11px; 
  margin-bottom: 3px; 
}

.wish-meta { 
  font-size: 10px; 
  color: var(--muted-color); 
  display: flex; 
  gap: 5px; 
  align-items: center; 
  justify-content: space-between; 
}

.wish-download-btn {
  width: 24px; 
  height: 24px; 
  background: rgba(255, 255, 255, 0.1); 
  border-radius: 50%; 
  display: flex;
  align-items: center; 
  justify-content: center; 
  color: var(--blue); 
  font-size: 13px;
  transition: background 0.1s ease; 
  cursor: pointer; 
  flex-shrink: 0;
}

.wish-download-btn:hover { 
  background: var(--blue); 
  color: #fff; 
}

.wish-download-btn:active { 
  animation: bounce 0.15s ease-in-out; 
}

/* --- SIDE CARDS --- */
.side-card {
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--blur-filter);
  transition: opacity 0.4s ease-out, background 1.5s, border 1.5s, backdrop-filter 1.5s;
  border-radius: 8px; 
  padding: 10px;
  width: 100%;
}

.side-card h4 { 
  font-size: 13px; 
  margin: 0 0 8px;
}

.friends-list { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
}

.friend-row { 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  cursor: pointer;
  transition: transform 0.1s ease-out;
}

.friend-row:hover {
  transform: translateX(3px);
}

.friend-row .meta { 
  font-size: 11px; 
  color: var(--muted-color); 
}

.friend-row .avatar {
  width: 38px;
  height: 38px;
}

.status-dot { 
  width: 8px; 
  height: 8px; 
  border-radius: 50%; 
  background: #3ad65f; 
  box-shadow: 0 4px 14px rgba(58, 214, 95, 0.12); 
}

.mini-feature { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

.mini-feature img { 
  width: 56px; 
  height: 44px; 
  object-fit: cover; 
  border-radius: 6px; 
  flex-shrink: 0; 
}

.mini-feature h4 { 
  margin: 0 0 4px; 
  font-size: 13px; 
}

.mini-feature p { 
  margin: 0; 
  color: var(--muted-color); 
  font-size: 11px; 
}

/* --- TABLET --- */
@media (min-width: 600px) {
  body { padding: 20px 0; }
  
  .wrap {
    padding: 0 16px;
    gap: 16px;
  }
  
  .main { gap: 16px; }
  .side { gap: 16px; }
  
  .hero-card {
    padding: 12px;
    gap: 12px;
  }
  
  .hero-media {
    height: 180px;
  }
  
  .hero-meta h2 { font-size: 17px; }
  .hero-meta p { font-size: 12px; }
  .btn-buy { width: 38px; height: 38px; font-size: 19px; }
  
  .row-scroll {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .game-card { height: 100px; }
  .game-card .tag { font-size: 10px; }
  
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .wish-card { height: 120px; }
  .wish-title { font-size: 12px; }
  .wish-meta { font-size: 11px; }
  
  .section-head h3 { font-size: 15px; }
}

/* --- DESKTOP --- */
@media (min-width: 1240px) {
  body {
    padding: 48px 20px;
  }
  
  .wrap {
    max-width: var(--maxw);
    grid-template-columns: 1fr 340px;
    gap: 28px;
    padding: 0;
  }
  
  .main {
    gap: 28px;
    order: 0;
  }
  
  .side { 
    gap: 22px; 
    order: 0;
  }
  
  .hero-card {
    flex-direction: row;
    gap: 24px;
    padding: 28px;
    width: auto;
  }
  
  .hero-media {
    flex: 1.4;
    height: 320px;
    min-height: 220px;
  }
  
  .hero-meta {
    flex: 0.9;
    min-width: 240px;
    padding: 12px 18px;
  }
  
  .hero-meta h2 {
    font-size: 20px;
    margin: 6px 0 10px;
  }
  
  .hero-meta p { 
    font-size: 14px; 
    margin: 0 0 14px;
  }
  
  .btn-buy {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .hero-friends {
    left: 28px; 
    bottom: 18px; 
    gap: 10px;
  }
  
  .avatar {
    width: 36px; 
    height: 36px;
  }
  
  .friend-pill { 
    font-size: 13px; 
    padding: 8px 10px;
  }

  .section-head h3 { font-size: 18px; }
  
  .row-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    grid-template-columns: none;
  }
  
  .game-card { 
    min-width: 260px; 
    height: 140px;
    width: auto;
  } 
  
  .game-card .tag { font-size: 12px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  
  .wish-card { 
    height: 160px;
    width: auto;
  }
  
  .wish-title { font-size: 14px; }
  .wish-meta { font-size: 13px; }
  .wish-download-btn { width: 32px; height: 32px; font-size: 18px; }

  .side-card { padding: 14px; }
  .mini-feature img { width: 84px; height: 64px; }
  
  .row-scroll::-webkit-scrollbar { height: 6px; }
  .row-scroll::-webkit-scrollbar-thumb { 
    background: var(--accent-color); 
    border-radius: 8px;
  }
}

/* --- DESKTOP 1240px+ OPTIMIZE --- */
@media (min-width: 1240px) {
  /* wrap zaten grid 1fr 340px, side kart sabit */
  .hero-card {
    width: calc(100% - 10px); /* çok az daraltma */
    padding: 24px;            /* biraz daha sıkı padding */
  }

  .row-scroll .game-card,
  .grid .wish-card {
    min-width: 240px;         /* alt kartlarda hafif daraltma */
  }
}
