/* ==================================================================
   TOPRAK'IN MINECRAFT DÜNYASI - Piksel sanat CSS
   ================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --grass-green: #5d8a3a;
  --grass-top:   #7bbb4a;
  --dirt:        #8b5a2b;
  --dirt-dark:   #6e4521;
  --stone:       #7a7a7a;
  --stone-dark:  #555;
  --deep:        #2a2a3a;
  --redstone:    #c62828;
  --diamond:     #4dd0e1;
  --gold:        #ffc107;
  --netherrack:  #5a1111;
  --lava:        #ff6f00;
  --obsidian:    #1a0033;
  --sky-top:     #7ec0ee;
  --sky-bot:     #b0e0f0;
  --bedrock:     #1a1a1a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 20px;
  color: #fff;
  overflow-x: hidden;
  background: var(--obsidian);
  line-height: 1.4;
  image-rendering: pixelated;
}

h1, h2, h3 {
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 rgba(0,0,0,.6);
}

a { color: inherit; text-decoration: none; }

/* ========== Piksel blok süslemeleri ========== */
.pixel-block {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2px solid #000;
  vertical-align: middle;
  margin-right: 8px;
  image-rendering: pixelated;
}
.pixel-block.grass {
  background:
    linear-gradient(var(--grass-top) 30%, var(--dirt) 30%);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.15);
}
.pixel-block.stone {
  background: var(--stone);
  box-shadow: inset -3px -3px 0 var(--stone-dark), inset 3px 3px 0 #a0a0a0;
}
.pixel-block.redstone {
  background: var(--redstone);
  box-shadow: inset -3px -3px 0 #7a0000, inset 3px 3px 0 #ff5757;
}
.pixel-block.netherrack {
  background: var(--netherrack);
  box-shadow: inset -3px -3px 0 #2a0000, inset 3px 3px 0 #8a2525;
}
.pixel-block.diamond {
  background: var(--diamond);
  box-shadow: inset -3px -3px 0 #00838f, inset 3px 3px 0 #b2ebf2;
}

/* ========== Navigasyon ========== */
.mc-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0,0,0,.75);
  border-bottom: 4px solid #000;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(4px);
}
.mc-nav .logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #fff;
  display: flex; align-items: center;
  gap: 10px;
}
.nav-avatar {
  width: 40px; height: 40px;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.3), 2px 2px 0 #000;
  image-rendering: pixelated;
  background: #fff;
  object-fit: cover;
}
.mc-nav ul { list-style: none; display: flex; gap: 12px; flex-wrap: wrap; }
.mc-nav ul a {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 10px 14px;
  background: linear-gradient(var(--grass-top), var(--grass-green));
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.35), inset 2px 2px 0 rgba(255,255,255,.2), 3px 3px 0 #000;
  color: #fff;
  transition: transform .1s ease;
}
.mc-nav ul a:hover { transform: translate(-1px,-1px); }
.mc-nav ul a:active { transform: translate(2px,2px); box-shadow: none; }
.mc-nav ul a.admin-btn {
  background: linear-gradient(#ffd54f, var(--gold));
  color: #000;
}

/* ========== Gökyüzü katmanı (parallax) ========== */
.sky-bg {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bot));
  z-index: -2;
  transition: opacity .6s;
}
.sun {
  position: absolute;
  top: 60px; right: 10%;
  width: 80px; height: 80px;
  background: #ffeb3b;
  border: 4px solid #000;
  box-shadow: inset -6px -6px 0 #fbc02d, inset 6px 6px 0 #fff59d, 0 0 50px #ffeb3b;
  animation: sunPulse 4s ease-in-out infinite;
}
@keyframes sunPulse { 50% { box-shadow: inset -6px -6px 0 #fbc02d, inset 6px 6px 0 #fff59d, 0 0 90px #ffeb3b; } }

.cloud {
  position: absolute;
  background: #fff;
  border: 3px solid #000;
  box-shadow: inset -4px -4px 0 #c7dceb;
  animation: drift 40s linear infinite;
}
.cloud.c1 { width: 120px; height: 32px; top: 120px; left: -120px; animation-duration: 60s; }
.cloud.c2 { width: 180px; height: 40px; top: 220px; left: -180px; animation-duration: 80s; animation-delay: -20s; }
.cloud.c3 { width: 140px; height: 36px; top: 340px; left: -140px; animation-duration: 70s; animation-delay: -40s; }
@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 200px)); }
}

/* ========== Biyom bölümleri ========== */
.biome {
  position: relative;
  min-height: 100vh;
  padding: 120px 20px 80px;
  overflow: hidden;
}

/* HERO (Gökyüzü) */
.biome-sky {
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  text-align: center;
}
.hero-content { z-index: 2; max-width: 900px; padding: 0 20px; }
.title-main {
  font-size: clamp(28px, 5vw, 52px);
  color: #fff;
  text-shadow:
    4px 4px 0 #000,
    8px 8px 0 rgba(0,0,0,.3);
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }

.subtitle {
  font-size: 28px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 40px;
}
.scroll-hint {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  animation: bounce 1.5s ease-in-out infinite;
}
@keyframes bounce { 50% { transform: translateY(12px); } }

.ground-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
}
.grass-top {
  background:
    linear-gradient(var(--grass-top) 12px, var(--grass-green) 12px, var(--grass-green) 24px, var(--dirt) 24px);
  border-top: 4px solid #000;
  image-rendering: pixelated;
}

/* ========== BEN KİMİM? BİYOMU (Elmas Mağarası) ========== */
.biome-about {
  background:
    repeating-linear-gradient(0deg,
      #1a3a4a 0, #1a3a4a 40px,
      #143040 40px, #143040 80px);
  border-top: 4px solid #000;
  position: relative;
}
.biome-about::before {
  /* tavandan sarkan elmas blokları efekti */
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 24px;
  background:
    repeating-linear-gradient(90deg,
      #4dd0e1 0, #4dd0e1 24px,
      #00838f 24px, #00838f 28px,
      #4dd0e1 28px, #4dd0e1 52px,
      #006064 52px, #006064 56px);
  border-bottom: 3px solid #000;
  box-shadow: 0 0 20px rgba(77, 208, 225, .4);
}

.about-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 30px 0;
}
.about-avatar-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.avatar-pixel-border {
  width: 220px; height: 220px;
  padding: 6px;
  background:
    linear-gradient(135deg, #ffeb3b 25%, transparent 25%) 0 0,
    linear-gradient(225deg, #ffeb3b 25%, transparent 25%) 0 0,
    #4dd0e1;
  background-size: 12px 12px;
  border: 4px solid #000;
  box-shadow:
    inset -4px -4px 0 rgba(0,0,0,.3),
    inset 4px 4px 0 rgba(255,255,255,.2),
    6px 6px 0 #000,
    0 0 40px rgba(77, 208, 225, .5);
  animation: diamondGlow 3s ease-in-out infinite;
}
@keyframes diamondGlow {
  50% { box-shadow:
    inset -4px -4px 0 rgba(0,0,0,.3),
    inset 4px 4px 0 rgba(255,255,255,.2),
    6px 6px 0 #000,
    0 0 70px rgba(77, 208, 225, .9); }
}
.avatar-pixel-border img {
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
  border: 2px solid #000;
  background: #fff;
}

/* İsim plakası – Minecraft name tag gibi */
.name-plate {
  position: relative;
  background: rgba(0,0,0,.75);
  border: 3px solid #000;
  padding: 12px 20px 10px;
  min-width: 220px;
  text-align: center;
  box-shadow: 4px 4px 0 #000;
}
.name-plate strong {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #ffeb3b;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 4px;
}
.name-plate small {
  display: block;
  font-size: 18px;
  color: #b2ebf2;
}
.name-plate .lvl {
  position: absolute;
  top: -12px; right: -12px;
  background: linear-gradient(#ffeb3b, #f9a825);
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 6px 8px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  transform: rotate(6deg);
}
.xp-bar {
  display: block;
  height: 6px;
  background:
    linear-gradient(to right, #7bbb4a 0%, #7bbb4a 80%, #444 80%, #444 100%);
  border: 2px solid #000;
  margin: -12px -20px 10px;
}

.about-text h2 {
  font-size: clamp(16px, 2.4vw, 24px);
  display: inline-flex; align-items: center;
  padding: 12px 22px;
  background: rgba(0,0,0,.7);
  border: 3px solid #000;
  margin-bottom: 20px;
  box-shadow: 4px 4px 0 #000;
}
.about-text p {
  font-size: 22px;
  color: #e0f7fa;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 18px;
}
.favorites-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.favorites-list li {
  background: rgba(0,0,0,.55);
  border: 2px solid #000;
  padding: 10px 14px;
  font-size: 18px;
  color: #fff;
  box-shadow: 3px 3px 0 #000;
  position: relative;
  padding-left: 36px;
}
.favorites-list li::before {
  content: '⛏';
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #ffeb3b;
}

.about-to-grass {
  background: linear-gradient(#143040, var(--dirt));
}

@media (max-width: 720px) {
  .about-wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-text h2 { font-size: 14px; padding: 10px 14px; }
}

/* ========== ÇİMEN BİYOMU (Haritalar) ========== */
.biome-grass {
  background:
    repeating-linear-gradient(0deg,
      var(--dirt) 0, var(--dirt) 40px,
      var(--dirt-dark) 40px, var(--dirt-dark) 80px);
  border-top: 4px solid #000;
}
.biome-grass::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 30px;
  background: linear-gradient(var(--grass-top) 10px, var(--grass-green) 10px);
  border-bottom: 3px solid #000;
}

/* ========== MAĞARA (Hileler) ========== */
.biome-cave {
  background:
    repeating-linear-gradient(0deg,
      var(--stone) 0, var(--stone) 50px,
      var(--stone-dark) 50px, var(--stone-dark) 100px),
    radial-gradient(ellipse at center, rgba(0,0,0,.5), rgba(0,0,0,.85));
  background-blend-mode: multiply;
  color: #eee;
}
.torch-left, .torch-right {
  position: absolute;
  top: 140px;
  width: 20px; height: 50px;
  background: linear-gradient(#5d4037 60%, var(--lava) 60%);
  border: 2px solid #000;
  box-shadow: 0 0 40px var(--lava), 0 0 80px #ff9800;
}
.torch-left { left: 30px; }
.torch-right { right: 30px; }

/* ========== DERİNLER (Kodlama) ========== */
.biome-deep {
  background:
    repeating-linear-gradient(0deg,
      var(--deep) 0, var(--deep) 40px,
      #1e1e2e 40px, #1e1e2e 80px);
  position: relative;
}
.redstone-wire {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 6px; height: 100%;
  background: linear-gradient(to bottom, var(--redstone), #ff5757, var(--redstone));
  box-shadow: 0 0 12px var(--redstone), 0 0 24px #ff0033;
  animation: pulseWire 1.5s ease-in-out infinite;
  z-index: 0;
  opacity: .6;
}
@keyframes pulseWire { 50% { opacity: 1; } }

/* ========== NETHER (Videolar) ========== */
.biome-nether {
  background:
    repeating-linear-gradient(0deg,
      var(--netherrack) 0, var(--netherrack) 40px,
      #3d0808 40px, #3d0808 80px);
  color: #fff;
}
.lava-bubble {
  position: absolute;
  background: radial-gradient(circle, #ffc107, var(--lava));
  border-radius: 50%;
  filter: blur(2px);
  animation: rise 6s ease-in infinite;
}
.lava-bubble.b1 { left: 10%; bottom: 0; width: 30px; height: 30px; animation-delay: 0s; }
.lava-bubble.b2 { left: 60%; bottom: 0; width: 20px; height: 20px; animation-delay: 2s; }
.lava-bubble.b3 { left: 85%; bottom: 0; width: 40px; height: 40px; animation-delay: 4s; }
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100vh) scale(.3); opacity: 0; }
}

/* ========== Geçiş bölgeleri ========== */
.transition-zone {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  border-top: 4px solid #000;
}
.dirt-to-stone { background: linear-gradient(var(--dirt-dark), var(--stone-dark)); }
.stone-to-deep { background: linear-gradient(var(--stone-dark), var(--deep)); }
.deep-to-nether { background: linear-gradient(var(--deep), var(--netherrack)); }

/* ========== Biyom başlıkları ========== */
.biome-header {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 900px;
  position: relative; z-index: 2;
}
.biome-header h2 {
  font-size: clamp(18px, 2.5vw, 28px);
  margin-bottom: 12px;
  display: inline-flex; align-items: center;
  padding: 12px 24px;
  background: rgba(0,0,0,.65);
  border: 3px solid #000;
  box-shadow: inset -3px -3px 0 rgba(255,255,255,.1), 4px 4px 0 #000;
}
.biome-header p {
  font-size: 22px;
  text-shadow: 2px 2px 0 #000;
}

/* ========== Kartlar ========== */
.cards {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 2;
}
.card {
  background: rgba(0,0,0,.55);
  border: 3px solid #000;
  padding: 16px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow:
    inset -3px -3px 0 rgba(255,255,255,.08),
    inset 3px 3px 0 rgba(255,255,255,.05),
    5px 5px 0 #000;
  position: relative;
}
.card:hover {
  transform: translate(-3px,-3px);
  box-shadow:
    inset -3px -3px 0 rgba(255,255,255,.12),
    inset 3px 3px 0 rgba(255,255,255,.08),
    8px 8px 0 #000;
}
.card h3 {
  font-size: 12px;
  margin-bottom: 12px;
  color: #ffeb3b;
  line-height: 1.5;
}
.card .thumb {
  width: 100%; height: 160px;
  background: #000 center/cover;
  border: 2px solid #000;
  margin-bottom: 12px;
  image-rendering: pixelated;
}
.card p { font-size: 18px; color: #ddd; }
.card .meta {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  background: var(--grass-green);
  border: 2px solid #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
}
.card .code-snippet {
  background: #000;
  color: #4dd0e1;
  padding: 8px;
  border: 2px solid #4dd0e1;
  margin-top: 10px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  word-break: break-all;
}
.card.video-card .thumb {
  position: relative;
}
.card.video-card .play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 60px;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
}

/* ========== Bedrock footer ========== */
.bedrock {
  background:
    repeating-linear-gradient(45deg,
      var(--bedrock) 0, var(--bedrock) 20px,
      #2a2a2a 20px, #2a2a2a 40px);
  color: #aaa;
  padding: 40px 20px;
  text-align: center;
  border-top: 4px solid #000;
}
.bedrock p { font-size: 18px; margin-bottom: 12px; }
.bedrock .back-top {
  display: inline-block;
  padding: 10px 20px;
  background: var(--grass-green);
  color: #fff;
  border: 2px solid #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  box-shadow: 3px 3px 0 #000;
}

/* ========== Modal ========== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #2a2a3a;
  border: 4px solid #000;
  padding: 30px;
  max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 8px 8px 0 #000;
  position: relative;
}
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: var(--redstone);
  color: #fff;
  border: 2px solid #000;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  box-shadow: 3px 3px 0 #000;
}
.modal-box h3 { color: #ffeb3b; font-size: 16px; margin-bottom: 16px; line-height: 1.6; }
.modal-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 3px solid #000;
  margin-top: 12px;
}

/* ========== Mobil ========== */
@media (max-width: 640px) {
  body { font-size: 18px; }
  .mc-nav { flex-direction: column; gap: 10px; padding: 10px; }
  .mc-nav ul { justify-content: center; }
  .mc-nav ul a { font-size: 8px; padding: 8px 10px; }
  .mc-nav .logo { font-size: 10px; }
  .biome { padding: 180px 14px 60px; }
  .subtitle { font-size: 22px; }
  .card h3 { font-size: 10px; }
}

/* ========== Fade-in animasyonu ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
