/* ==========================================================================
   1. GENEL AYARLAR (GLOBAL VARIABLES & RESET)
   ========================================================================== */
:root {
  --primary: #4ade80;      /* Canlı Yeşil */
  --primary-dark: #15803d; /* Koyu Yeşil */
  --hydro-blue: #38bdf8;   /* Hidrojel Mavisi */
  --bg-color: #f0fdf4;     /* Açık Nane Arka Plan */
  --text-dark: #1e293b;    /* Koyu Gri Yazı */
  --text-light: #64748b;   /* Açık Gri Yazı */
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.85);
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* Arka Plan Animasyonu (Molekül Efekti - Tüm Sayfalar İçin) */
.background-animation {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background: 
    radial-gradient(circle at 10% 20%, rgba(74, 222, 128, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.1) 0%, transparent 40%);
  animation: bgPulse 10s infinite alternate;
  pointer-events: none;
}

@keyframes bgPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* ==========================================================================
   2. HEADER & NAVİGASYON
   ========================================================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(255, 0, 0, 0.03);
  border-bottom: 1px solid rgba(255,255,255,0.5);
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0px;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 800;
  
  /* Yazı Rengi*/
  color: var(--primary-dark); 
  
  line-height: 1;
}

header .logo img {
  max-height: 60px; 
  width: auto; 
  object-fit: contain;
  flex-shrink: 0;

  /* Logoyu arka plandan ayıran gölge */
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  margin-right: 12px; 
  
  /* OPSİYONEL: Eğer logo çok koyuysa ve hiç görünmüyorsa aşağıdaki 3 satırın başındaki // işaretlerini kaldır */
   background: rgba(6, 66, 0, 0.8);
   padding: 5px;
  border-radius: 7px;
  }

header .logo span {
  color: var(--primary); /* "tech" kısmının rengi */
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo span { color: var(--primary); }

nav ul {
  display: flex;
  gap: 30px;
}

nav a {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 15px;
  transition: 0.3s;
  padding: 5px 0;
}

nav a:hover, nav a.active {
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary);
}

/* Mobil Menü Uyumu */
@media (max-width: 768px) {
  header { flex-direction: column; gap: 15px; padding: 15px; }
  nav ul { gap: 15px; font-size: 14px; flex-wrap: wrap; justify-content: center; }
}

/* ==========================================================================
   3. BUTONLAR & KARTLAR (GENEL)
   ========================================================================== */
.btn {
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: inline-block;
  font-size: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(74, 222, 128, 0.6);
}

.card {
  background: rgba(0, 0, 0, 0.6); /* %60 Siyah Arka Plan */
  backdrop-filter: blur(8px); /* Arkadaki DNA'yı buzla */
  padding: 50px;
  border-radius: 25px;
  border: 1px solid rgba(74, 222, 128, 0.3); /* İnce yeşil çerçeve */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* Derinlik gölgesi */
  max-width: 800px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(74, 222, 128, 0.6);
}

.icon { font-size: 40px; margin-bottom: 20px; display: block; }

/* ==========================================================================
   4. ANA SAYFA (INDEX.HTML)
   ========================================================================== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem); /* Mobilde küçülür, PC'de büyür */
  color: #00ff37 ;
  margin-bottom: 25px;
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.6); /* Yeşil Neon Parlama */
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.2rem;
  color: #e2e8f0 ; /* Kırık Beyaz (Gözü yormaz) */
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.8;
  font-weight: 500;
}

.hero .content {
  background: rgba(0, 0, 0, 0.6); /* %60 Siyah Arka Plan */
  backdrop-filter: blur(8px); /* Arkadaki DNA'yı buzla */
  padding: 50px;
  border-radius: 25px;
  border: 1px solid rgba(74, 222, 128, 0.3); /* İnce yeşil çerçeve */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* Derinlik gölgesi */
  max-width: 800px;
  transition: transform 0.3s ease;
}

.hero .content:hover {
  transform: translateY(-5px); /* Üzerine gelince hafif yükselsin */
  border-color: rgba(74, 222, 128, 0.6);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 80px 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.card h3 { color: #00ff37; margin-bottom: 15px; font-weight: 700; }
.card p { color: #ffffff; margin-bottom: 15px; font-weight: 700; }

@media (max-width: 768px) {
  .hero .content { padding: 30px 20px; width: 90%; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
}

/* ==========================================================================
   5. EKİP SAYFASI (EKIP.HTML)
   ========================================================================== */
.team-hero { text-align: center; padding: 60px 20px 20px; }
.team-hero h1 { color: var(--primary-dark); font-size: 3rem; margin-bottom: 15px; }
.team-hero p { color: var(--text-light); font-size: 1.1rem; max-width: 700px; margin: 0 auto; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.member-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.4s ease;
  text-align: center;
  border-top: 5px solid var(--primary);
  position: relative;
}

.member-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(74, 222, 128, 0.2);
}

.img-wrapper {
  width: 100%; height: 280px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.member-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* YENİ SATIR: Varsayılan olarak yukarı odaklan  */
  transition: transform 0.5s ease;
}
.member-card:hover img { transform: scale(1.05); }

.info { padding: 25px; }
.info h3 { color: var(--text-dark); font-size: 1.5rem; margin-bottom: 5px; font-weight: 700; }
.info .role { color: var(--primary); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; display: block; }
.info p { color: var(--text-light); font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; }

.social-links { display: flex; justify-content: center; gap: 15px; }
.social-links a {
  width: 35px; height: 35px; border-radius: 50%;
  background: #f1f5f9; color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  transition: 0.3s;
}
.social-links a:hover { background: var(--primary); color: var(--white); }

/* ==========================================================================
   6. TEKNOLOJİ SAYFASI (TEKNOLOJI.HTML)
   ========================================================================== */
.tech-section {
  padding: 80px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.tech-section:nth-child(even) {
  flex-direction: row-reverse;
  background-color: var(--white);
  border-radius: 30px;
  margin: 40px auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  padding: 60px;
}

.tech-text { flex: 1; }
.tech-text h2 { color: var(--primary-dark); font-size: 2.2rem; margin-bottom: 20px; }
.tech-text p { color: var(--text-light); font-size: 1.1rem; line-height: 1.7; margin-bottom: 20px; }

.tech-img { flex: 1; text-align: center; }
.tech-img img {
  width: 100%; max-width: 450px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(74, 222, 128, 0.2);
  transition: transform 0.4s ease;
}
.tech-img img:hover { transform: scale(1.03); }

.tech-list { list-style: none; padding: 0; }
.tech-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: var(--text-dark); font-weight: 500; }
.tech-list i { color: var(--primary); }

@media (max-width: 900px) {
  .tech-section { flex-direction: column; text-align: center; padding: 40px 20px; }
  .tech-section:nth-child(even) { flex-direction: column; padding: 40px 20px; }
  .tech-list { text-align: left; display: inline-block; }
}

/* ==========================================================================
   7. İLETİŞİM SAYFASI (ILETISIM.HTML)
   ========================================================================== */
.contact-wrapper {
  max-width: 1100px; margin: 60px auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px;
  align-items: center;
}

.contact-info {
  background: linear-gradient(145deg, #166534, #14532d);
  color: var(--white); padding: 40px; border-radius: 20px;
  box-shadow: 0 20px 40px rgba(22, 101, 52, 0.3);
  position: relative; overflow: hidden;
}

.contact-info::before, .contact-info::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1);
}
.contact-info::before { top: -50px; right: -50px; width: 150px; height: 150px; }
.contact-info::after { bottom: -30px; left: -30px; width: 100px; height: 100px; }

.contact-info h2 { font-size: 2rem; margin-bottom: 20px; color: var(--primary); }
.contact-info p { margin-bottom: 30px; opacity: 0.9; }

.info-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; font-size: 1.1rem; }
.info-item i { font-size: 1.2rem; color: var(--primary); }

.contact-form-container {
  background: var(--white); padding: 40px; border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border-top: 5px solid var(--primary);
}

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 15px; border: 1px solid #e2e8f0;
  border-radius: 10px; font-family: 'Poppins', sans-serif; font-size: 1rem;
  background: #f8fafc; transition: 0.3s; outline: none; box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary); background: var(--white);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

button[type="submit"] {
  width: 100%; padding: 15px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: var(--white); border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.3s;
  box-shadow: 0 5px 15px rgba(22, 101, 52, 0.2);
}
button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(22, 101, 52, 0.3); }

.social-media {
  margin-top: 40px;
  display: flex;
  gap: 15px;
}

.social-media a {
  width: 40px; 
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff; /* İkon rengini beyaz yap */
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.3s;
  font-size: 18px; /* İkon boyutunu sabitle */
}

.social-media a:hover {
  background: var(--primary); /* Üzerine gelince yeşil olsun */
  color: var(--text-dark);    /* İkon rengi koyu olsun */
  transform: translateY(-3px);
}

@media (max-width: 900px) {
  .contact-wrapper { grid-template-columns: 1fr; gap: 30px; }
  .contact-info { text-align: center; }
  .info-item { justify-content: center; }
  .social-media { justify-content: center; }
}

/* ==========================================================================
   8. 404 SAYFASI (404.HTML)
   ========================================================================== */
body.page-404 {
  background: radial-gradient(circle at center, #f0fdf4, #dcfce7 90%);
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center; height: 100vh;
}

.page-404 h1 {
  font-size: 3rem; margin-bottom: 10px; color: var(--primary-dark);
  font-weight: 800; letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
}

.page-404 p {
  font-size: 1.2rem; max-width: 500px; color: var(--text-light); font-weight: 500;
}

.highlight { color: #0ea5e9; font-weight: 700; }

.icon-container {
  font-size: 4rem; margin-bottom: 20px; display: flex; gap: 15px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

.bg-molecule {
  position: absolute; width: 600px; height: 600px;
  border: 2px dashed rgba(74, 222, 128, 0.2);
  border-radius: 50%; z-index: -1;
  animation: spin 60s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   9. BAKIM SAYFASI (BAKIM.HTML)
   ========================================================================== */
body.page-maintenance {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7, #bbf7d0);
  background-size: 200% 200%;
  animation: bgFlow 10s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center; height: 100vh;
}

@keyframes bgFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bubbles::before, .bubbles::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: 
    radial-gradient(circle at 10% 20%, rgba(74, 222, 128, 0.15) 0, transparent 50px) 0 0/100px 100px,
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.1) 0, transparent 40px) 0 0/120px 120px;
  animation: floatBubbles 20s linear infinite;
}
.bubbles::after { transform: scale(1.5); opacity: 0.5; animation-duration: 30s; }

@keyframes floatBubbles {
  from { transform: translateY(0); }
  to { transform: translateY(-50px); }
}

.maintenance-card {
  width: min(90vw, 600px); background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px; padding: 40px 30px; text-align: center; z-index: 10;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 50px; font-size: 13px; font-weight: 700;
  background: rgba(74, 222, 128, 0.15); color: var(--primary-dark);
  border: 1px solid rgba(74, 222, 128, 0.3); margin-bottom: 20px;
}

.status-bar {
  height: 8px; background: #e2e8f0; border-radius: 10px; overflow: hidden;
  width: 100%; margin: 20px auto 10px; position: relative;
}

.status-bar i {
  position: absolute; top: 0; left: 0; bottom: 0; width: 70%;
  background: linear-gradient(90deg, #4ade80, #0ea5e9);
  border-radius: 10px; animation: loadAnim 2s ease-in-out infinite alternate;
}

@keyframes loadAnim { 0% { width: 65%; } 100% { width: 75%; } }

.mini-text { font-size: 13px; color: #94a3b8; font-weight: 500; }

.actions { display: flex; gap: 15px; justify-content: center; margin-top: 30px; }
.btn-ghost { background: transparent; color: var(--primary-dark); border: 1px solid rgba(22, 101, 52, 0.2); }
.btn-ghost:hover { background: rgba(74, 222, 128, 0.1); }

.contact-note { margin-top: 20px; font-size: 13px; color: #94a3b8; }
.contact-note a { color: #0ea5e9; font-weight: 600; }

/* Arka planı temizleyip tek renk yapıyoruz, emojiler üstüne gelecek */
body.page-maintenance {
  background: #f0fdf4; /* Temiz açık yeşil */
  overflow: hidden; /* Emojiler taşmasın */
  position: relative;
}

/* Uçuşan Emojiler Katmanı */
.emoji-layer {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0; /* İçeriğin arkasında kalsın */
}

.floating-emoji {
  position: absolute;
  bottom: -50px;
  font-size: 24px;
  opacity: 0.6;
  animation: floatUp linear infinite;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Geri Sayım Sayacı Tasarımı */
#countdown-wrapper {
  margin: 25px 0;
  display: none; /* JS ile tarih girilince açılacak */
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.time-box {
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 10px;
  border-radius: 12px;
  min-width: 65px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #15803d; /* Koyu Yeşil */
  line-height: 1;
}

.time-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 600;
}

/* Bakım kartının z-index'ini artırıyoruz ki emojilerin üstünde dursun */
.maintenance-card {
  z-index: 10;
  position: relative;
  background: rgba(255, 255, 255, 0.9); /* Biraz daha opak */
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  color: var(--text-light);
  font-size: 0.9rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* ==========================================================================
   11. OYUN SAYFASI (PRO - FIXED & NO CONFLICT)
   ========================================================================== */
.game-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 40px 20px;
  flex-wrap: wrap;
}

/* OYUN ALANI - KAPSAYICI */
.game-board-container {
  background: #bbada0;
  border-radius: 12px;
  /* HESAPLAMA:
     4 Kare (4 * 70px) = 280px
     5 Boşluk (5 * 15px) = 75px
     TOPLAM = 355px
  */
  width: 355px; 
  height: 355px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  touch-action: none;
  box-sizing: border-box;
}

/* Grid Arka Planı (Sabit Yuvalar) */
.grid-bg {
  position: absolute;
  top: 15px; left: 15px; right: 15px; bottom: 15px;
  display: grid;
  grid-template-columns: repeat(4, 70px);
  grid-template-rows: repeat(4, 70px);
  gap: 15px;
  z-index: 1;
}

.grid-cell {
  background: rgba(238, 228, 218, 0.35);
  border-radius: 8px;
  width: 100%;
  height: 100%;
}

/* Hareketli Kareler Katmanı */
.tile-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
  pointer-events: none;
}

/* KARE STİLİ - DEĞİŞİKLİK BURADA */
.tile {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: #eee4da;
  color: #776e65;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  
  /* ARTIK TRANSFORM DEĞİL, TOP VE LEFT İLE HAREKET EDİYOR */
  transition: top 150ms ease-in-out, left 150ms ease-in-out, transform 150ms ease; 
  will-change: top, left, transform;
  z-index: 10;
}

/* Yeni Kare Doğuş Efekti (Sadece Scale Kullanır) */
.tile-new {
  animation: appear 200ms ease-out backwards;
}
@keyframes appear {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}

/* Birleşme (Pop) Efekti */
.tile-merged {
  animation: pop 200ms ease-in-out;
  z-index: 20;
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Skor & Butonlar */
.score-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  background: #bbada0;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  width: 355px;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.game-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  width: 355px;
}

.game-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  transition: all 0.2s ease;
  font-size: 14px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}
.game-btn:active { transform: translateY(4px); box-shadow: none; }
.btn-undo { background: #f59e0b; }
.btn-undo:disabled { background: #d1d5db; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-reset { background: #ef4444; }
.btn-rank { background: #3b82f6; }

/* Oyun Sonu Mesajı */
.game-message {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s ease; border-radius: 10px;
}
.game-message.show { opacity: 1; pointer-events: auto; }
.game-message h2 { font-size: 2.5rem; margin-bottom: 10px; color: var(--primary-dark); }
.game-message p { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 20px; font-weight: 600; }

/* Leaderboard & Legend */
.game-legend { background: var(--white); padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); max-width: 300px; border-top: 5px solid var(--primary); height: fit-content; }
.legend-list { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; padding: 8px; border-radius: 8px; background: #f8fafc; border: 1px solid #eee; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.open { display: flex; opacity: 1; }
.leaderboard-card { background: var(--white); width: 90%; max-width: 450px; border-radius: 20px; padding: 30px; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,0.4); transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.open .leaderboard-card { transform: scale(1); }
.lb-table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 14px; }
.lb-table th { color: var(--primary-dark); padding: 10px; border-bottom: 2px solid #eee; }
.lb-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; color: #555; }
.lb-input-group { margin-bottom: 20px; text-align: left; }
.lb-input-group input { width: 100%; padding: 14px; border: 2px solid #eee; border-radius: 10px; font-size: 16px; outline: none; transition: 0.3s; }
.lb-input-group input:focus { border-color: var(--primary); }

@media (max-width: 768px) {
  .game-wrapper { flex-direction: column; align-items: center; gap: 30px; }
  .game-legend { width: 355px; max-width: none; }
}

/* Renkler */
.tile-2 { background: #e0f2f1; border: 2px solid #80cbc4; font-size: 40px; } 
.tile-4 { background: #b2dfdb; border: 2px solid #4db6ac; font-size: 40px; }
.tile-8 { background: #80cbc4; border: 2px solid #26a69a; font-size: 40px; } 
.tile-16 { background: #4db6ac; border: 2px solid #009688; font-size: 36px; color: white;} 
.tile-32 { background: #26a69a; border: 2px solid #00897b; color: #fff; font-size: 36px; } 
.tile-64 { background: #009688; border: 2px solid #00796b; color: #fff; font-size: 36px; }
.tile-128 { background: #00897b; border: 2px solid #00695c; color: #fff; font-size: 32px; }
.tile-256 { background: #00796b; box-shadow: 0 0 15px #4ade80; color: #fff; font-size: 32px; }
.tile-512 { background: #00695c; box-shadow: 0 0 20px #facc15; color: #fff; font-size: 32px; }
.tile-1024 { background: #004d40; box-shadow: 0 0 25px #f43f5e; color: #fff; font-size: 28px; }
.tile-2048 { background: #000; box-shadow: 0 0 30px #a855f7; color: #fff; font-size: 28px; }

/* ==========================================================================
   MOBİL İÇİN KÜÇÜLTME BÜYÜSÜ (Ekrana Sığdırma)
   ========================================================================== */
@media (max-width: 380px) {
  .game-board-container {
    transform: scale(0.85); /* Tahtayı %85 boyutuna indir */
    transform-origin: top center; /* Yukarıdan hizala */
    margin-bottom: -50px; /* Alt boşluğu dengele */
  }
  
  .score-container, .game-controls {
    width: 300px !important; /* Genişliği sabitle */
  }
}

/* =========================================
   DNA ANIMASYONU ENTEGRASYONU (GÜNCELLENDİ)
   ========================================= */
canvas#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  /* GÜNCELLEME BURADA: 0.6 yerine 0.25 yaptık. */
  /* Bu sayede animasyon çok hafif bir hologram gibi duracak. */
  opacity: 1; 
}

.background-animation {
  display: none !important;
}
