* { box-sizing: border-box; }

body {
  margin: 0; padding: 0; width: 100vw; height: 100vh;
  font-family: system-ui, Arial, sans-serif;
  background: #fff; color: #111;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; user-select: none;
  transition: background 0.5s, color 0.5s;
}

/* --- GECE MODU --- */
body.night-mode { background: #0a0e17; color: #f0f0f0; }
body.night-mode #mainBtn { border-color: #fff; color: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.2); }
body.night-mode .ball { background: #fff; border-color: #000; box-shadow: 0 0 10px rgba(255,255,255,0.5); }
body.night-mode .dock-btn { background: #1a1f2e; border-color: #444; color: #fff; }
body.night-mode .sps-box {
  background: #1a1f2e;
  border-color: #2ecc71;
  color: #2ecc71;
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}
body.night-mode .profile-card { background: linear-gradient(135deg, #2c3e50, #000); border-color: #ffd700; color: #fff; }
body.night-mode .stat-box { background: rgba(255,255,255,0.1); border-color: #444; }

/* --- HAVALI PROFİL KARTI --- */
.profile-card {
  width: 320px;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 4px solid #111;
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex; flex-direction: column; gap: 15px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid rgba(0,0,0,0.1); padding-bottom: 10px; }
.card-title { font-weight: 900; font-size: 18px; letter-spacing: 1px; color: #d35400; } /* Turuncu başlık */
.close-card-btn { background: transparent; border: none; font-size: 20px; font-weight: bold; cursor: pointer; color: #888; }
.close-card-btn:hover { color: #e74c3c; }

.card-avatar {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 10px 0; position: relative;
}
.avatar-icon { font-size: 60px; background: #eee; width: 100px; height: 100px; display:flex; align-items:center; justify-content:center; border-radius: 50%; border: 4px solid #111; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.manager-level {
  margin-top: -15px; background: #111; color: #ffd700; /* Altın sarısı */
  padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 900;
  border: 2px solid #fff; z-index: 2;
}

.card-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box {
  background: #fff; border: 1px solid #ddd; border-radius: 10px;
  padding: 10px; text-align: center; display: flex; flex-direction: column;
}
.stat-box.full-width { grid-column: span 2; }
.stat-label { font-size: 10px; color: #777; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.5px; }
.stat-value { font-size: 16px; font-weight: 900; color: #111; }

/* --- PROFİL BUTONU (Sol Üst) --- */
.profile-btn {
  position: fixed; top: 20px; left: 20px;
  width: 50px; height: 50px;
  cursor: pointer; z-index: 50;
  animation: floatBtn 3s ease-in-out infinite;
}
.profile-inner {
  width: 100%; height: 100%;
  background: #111; color: #ffd700;
  border: 3px solid #ffd700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.1s;
}
.profile-btn:active .profile-inner { transform: scale(0.9); }
@keyframes floatBtn { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }

/* --- AKSİYON EKRANI --- */
.action-display {
  position: fixed; 
  top: 220px; /* MUSTAFA: Level barın altına aldık (Eskiden %15 idi) */
  left: 50%; 
  transform: translateX(-50%);
  font-size: 24px; font-weight: 900; text-align: center; z-index: 2000;
  pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.action-display.goal { color: #27ae60; font-size: 48px; animation: goalShake 0.6s ease-in-out; }
.action-display.miss { color: #c0392b; font-size: 36px; opacity: 0.8; animation: fadeOut 1.2s forwards; }
.action-display.timer { color: #f39c12; font-size: 28px; background: rgba(255,255,255,0.95); padding: 8px 24px; border-radius: 20px; border: 3px solid #111; }

@keyframes goalShake { 0%{transform:translateX(-50%) scale(0.5) rotate(-5deg)} 50%{transform:translateX(-50%) scale(1.2) rotate(5deg)} 100%{transform:translateX(-50%) scale(1) rotate(0)} }
@keyframes fadeOut { from{opacity:1; transform:translateX(-50%) translateY(0);} to{opacity:0; transform:translateX(-50%) translateY(-30px);} }

/* --- BUTONLAR --- */
/* --- BUTON POZİSYONU DÜZELTMESİ --- */
/* Sponsor ve Penaltı butonlarını aşağı itiyoruz */
.action-buttons-left { 
  position: fixed; 
  left: 20px; 
  top: 130px; /* Eskiden 90px idi, 130 yaptık */
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  z-index: 40; 
}
.action-btn { width: 70px; height: 60px; border-radius: 10px; border: 2px solid #111; background: #fff; font-weight: bold; font-size: 11px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 4px 0 #111; transition: transform 0.1s; }
.action-btn:active { transform: translateY(4px); box-shadow: 0 0 0 #111; }
body.night-mode .action-btn { background: #222; color: #fff; border-color: #fff; box-shadow: 0 4px 0 #fff; }
body.night-mode .action-btn:active { box-shadow: 0 0 0 #fff; }
.action-btn.sponsor { background: #e0f7fa; color: #006064; }
.action-btn.penalty { background: #ffebee; color: #c62828; }
.action-btn.cooldown { opacity: 0.6; pointer-events: none; filter: grayscale(0.8); }

/* --- DİĞER MODALLAR --- */
.modal-overlay, .ad-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 3000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.ad-content { text-align: center; max-width: 400px; background: #111; color: #fff; border: 1px solid #444; padding: 20px; border-radius: 16px; }
.loader { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.close-ad-btn { margin-top: 20px; padding: 10px 20px; background: #27ae60; color: white; border: none; border-radius: 5px; cursor: pointer; }

/* ANA OYUN */
#mainBtn { font-size: 24px; padding: 16px 40px; border: 2px solid #111; background: transparent; cursor: pointer; border-radius: 12px; transition: transform .05s ease; z-index: 10; position: relative; }
#mainBtn:active { transform: scale(0.94); background: #f4f4f4; }
body.pro #mainBtn { font-size: 30px; padding: 24px 60px; border-radius: 18px; font-weight: 800; }
.sps-box {
  margin-top: 15px;      /* Butondan biraz uzaklaşsın */
  margin-bottom: 15px;   /* Marketten uzaklaşsın */
  font-size: 16px;
  font-weight: 800;
  color: #27ae60;        /* Yeşil renk (Para rengi!) */
  background: #fff;
  border: 3px solid #27ae60;
  padding: 8px 24px;
  border-radius: 50px;   /* Hap şeklinde olsun */
  z-index: 10;
  opacity: 0;            /* Başta görünmez */
  transition: opacity 0.5s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}
.sps-box.show {
  opacity: 1;            /* Görünür ol */
  display: block;
}
.hud { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 700; background: rgba(255,255,255,0.95); border: 1px solid #111; padding: 10px 20px; border-radius: 14px; opacity: 0; z-index: 20; }
.dock { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; z-index: 10; max-width: 90vw; }
.dock-btn { width: 50px; height: 50px; border: 1px solid #111; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; font-size: 24px; order: 1; }
.dock-btn.hiddenItem { display: none; }
.dock-btn.locked { opacity: 0.4; filter: grayscale(1); }
.badge { position: absolute; right: -6px; bottom: -6px; min-width: 20px; height: 20px; background: #111; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; border-radius: 99px; border: 2px solid #fff; }

.popup { position: fixed; left: 50%; transform: translateX(-50%) translateY(10px); width: min(320px, calc(100vw - 30px)); background: #fff; border: 1px solid #111; border-radius: 16px; padding: 16px; opacity: 0; pointer-events: none; transition: opacity 0.1s; z-index: 4000 !important; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.popup.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.popup-title { font-weight: 900; margin-bottom: 4px; }
.popup-desc { font-size: 13px; color: #555; margin-bottom: 12px; }
.popup-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.popup-hint { font-size: 11px; color: #999; text-align: center; margin-top: 8px; }
.hidden { display: none !important; }

/* EFEKTLER */
.marquee { position: fixed; top: 70px; left: 0; right: 0; border-top: 1px solid #111; border-bottom: 1px solid #111; background: #fff; height: 30px; display: flex; align-items: center; z-index: 5; overflow: hidden; }
/* --- KAYAN YAZI DÜZELTMESİ --- */
.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%; /* Yazı ekranın sağından başlasın */
  animation: scrollText 25s linear infinite; /* Sürekli akış */
}
@keyframes scrollText {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.var-box { position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; border-radius: 16px; border: 3px solid #111; background: #fff; cursor: pointer; font-weight: 900; z-index: 50; }
body.shake { animation: shake .3s ease-in-out; }
@keyframes shake { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-3px,3px)} 50%{transform:translate(3px,-3px)} 75%{transform:translate(-3px,-3px)} }
.ball { position: fixed; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #111; background: #fff; z-index: 1; pointer-events: none; will-change: transform; }
.ball::after { content: ""; position: absolute; inset: 2px; border: 1px dashed #aaa; border-radius: 50%; }
.float-text { position: fixed; font-weight: 700; font-size: 18px; color: #333; pointer-events: none; z-index: 1000; animation: floatUp 0.8s ease-out forwards; }
body.night-mode .float-text { color: #fff; }
@keyframes floatUp { to { transform: translateY(-60px) scale(1.2); opacity: 0; } }
.crit-text { position: fixed; font-weight: 900; font-size: 32px; color: #e74c3c; text-shadow: 2px 2px 0 #000; pointer-events: none; z-index: 1001; animation: critPop 0.8s forwards; }
@keyframes critPop { 0% { opacity:0; transform:scale(0.5); } 30% { opacity:1; transform:scale(1.5); } 100% { opacity:0; transform:translateY(-40px); } }
.corner-hit-text { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 40px; font-weight: 900; color: #f1c40f; text-shadow: 3px 3px 0 #000; background: #fff; padding: 10px 20px; border: 3px solid #000; border-radius: 10px; z-index: 2000; animation: cornerBoom 1.5s ease-out forwards; }
@keyframes cornerBoom { 0% { transform: translate(-50%, -50%) scale(0); } 15% { transform: translate(-50%, -50%) scale(1.2); } 100% { transform: translate(-50%, -80%); opacity: 0; } }

/* --- YENİ EKLENENLER --- */
.bonus-timer {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: #e74c3c;
  padding: 5px 15px;
  border-radius: 20px;
  margin-bottom: 10px;
  animation: pulse 1s infinite;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* VAR Butonu Tasarımı */
.var-box {
  background: #fff;
  color: #111;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* VAR'a basınca dönme efekti */
.var-box.checking {
  background: #f1c40f;
  animation: spin 1s linear infinite;
  border-radius: 50%;
  font-size: 10px;
}

/* --- SIFIRLAMA BUTONU --- */
.reset-btn {
  margin-top: 20px;
  background: #c0392b; /* Koyu Kırmızı */
  color: #fff;
  border: 2px solid #e74c3c;
  padding: 10px;
  width: 100%;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
}

.reset-btn:hover {
  background: #e74c3c; /* Açık Kırmızı */
}

.reset-btn:active {
  transform: scale(0.98);
}

/* =========================================
   GECE MODU TAMİR KİTİ (GÜNCEL)
   ========================================= */

/* 1. BİLGİ KUTUCUĞU (POPUP) */
/* Arka planı koyu yapıp, yazıları parlatıyoruz */
body.night-mode .popup {
  background: #1a1f2e;       /* Koyu lacivert */
  border: 1px solid #ffd700; /* Altın sarısı kenarlık */
  color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
body.night-mode .popup-title {
  color: #ffd700;            /* Başlık altın sarısı */
}
body.night-mode .popup-desc {
  color: #ccc;               /* Açıklama açık gri */
}
body.night-mode .popup-meta {
  border-bottom: 1px solid #444;
}

/* 2. SKOR TABLOSU (HUD - Üstteki Şut Sayısı) */
body.night-mode .hud {
  background: rgba(10, 14, 23, 0.95); /* Yarı saydam siyah */
  border-color: #444;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}
/* İçindeki "Şut:" yazısının rengini garantiye alalım */
body.night-mode .hud span {
  color: #5dade2; /* Açık mavi rakamlar */
}

/* 3. SOL BUTONLAR (Sponsor & Penaltı) */
/* Gündüz renklerini tersine çeviriyoruz ki gece parlasınlar */
body.night-mode .action-btn.sponsor {
  background: #006064;  /* Koyu turkuaz */
  color: #e0f7fa;       /* Açık yazı */
  border-color: #4dd0e1;
}
body.night-mode .action-btn.penalty {
  background: #5c0000;  /* Koyu kırmızı */
  color: #ffcdd2;       /* Açık yazı */
  border-color: #ef5350;
}

/* 4. MENAJER PROFİL KARTI */
/* Gece modu için özel lüks tasarım */
body.night-mode .profile-card {
  background: linear-gradient(135deg, #1a1f2e, #000);
  border: 2px solid #ffd700;
  color: #fff;
}
body.night-mode .card-title {
  color: #ffd700; /* Altın başlık */
}
body.night-mode .stat-box {
  background: rgba(255,255,255,0.05); /* Hafif saydam kutular */
  border-color: #444;
}
body.night-mode .stat-label {
  color: #aaa;
}
body.night-mode .stat-value {
  color: #fff;
}
body.night-mode .avatar-icon {
  background: #333;
  border-color: #ffd700;
}

/* 5. VAR KUTUSU */
body.night-mode .var-box {
  background: #2c3e50;
  color: #fff;
  border-color: #fff;
}

/* --- KAYAN YAZI GECE MODU --- */
body.night-mode .marquee {
  background: #0a0e17;  /* Ana arka plan rengiyle aynı olsun */
  color: #ffd700;       /* Yazılar altın sarısı olsun, dikkat çeksin */
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
}

/* Kayan yazının içindeki link/yazı rengi */
body.night-mode .marquee-inner {
  color: #ffd700;
}

/* --- LEVEL PROGRESS BAR --- */
.level-info-container {
  width: 100%;
  text-align: center;
  margin-top: 5px;
}
.level-title {
  font-weight: 900;
  color: #d35400;
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.level-bar-bg {
  width: 100%;
  height: 10px;
  background: #ddd;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #999;
}
.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  width: 0%;
  transition: width 0.3s ease;
}
.level-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: bold;
  margin-top: 2px;
  padding: 0 4px;
}
/* Gece Modu Uyumu */
body.night-mode .level-bar-bg {
  background: #333;
  border-color: #555;
}
body.night-mode .level-title {
  color: #f1c40f;
}

/* ======================
   ANA EKRAN LEVEL BARI
   ====================== */
.main-level-container {
  position: fixed;
  top: 110px; /* Manşetin hemen altı */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px; /* Çok geniş olmasın */
  text-align: center;
  z-index: 4; /* Manşetin (z-index:5) altında kalsın */
  background: rgba(255,255,255,0.9); /* Hafif saydam beyaz */
  padding: 8px 15px;
  border-radius: 15px;
  border: 3px solid #111;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
.main-level-title {
  font-weight: 900;
  color: #d35400;
  font-size: 20px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 1px 1px 0 #fff;
  letter-spacing: 1px;
}
.main-level-bar-bg {
  height: 24px; /* Biraz kalın olsun */
  background: #ddd;
  border-radius: 12px;
  border: 2px solid #111;
  position: relative; /* Topu içinde tutmak için */
  overflow: visible; /* Topun dışarı taşmasına izin ver */
}
.main-level-bar-fill {
  height: 100%;
  /* Altın sarısından turuncuya geçişli renk */
  background: linear-gradient(90deg, #f1c40f, #f39c12);
  width: 0%; /* JS ile değişecek */
  border-radius: 10px;
  transition: width 0.3s ease-out; /* Yumuşak ilerleme */
  position: relative;
}
/* Hareket eden futbol topu */
.main-level-ball {
  position: absolute;
  right: -14px; /* Barın ucunda dursun */
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
  /* Sürekli dönme animasyonu */
  animation: spinBall 2s infinite linear;
}
@keyframes spinBall { 100% { transform: translateY(-50%) rotate(360deg); } }

.main-level-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 800; margin-top: 4px; color: #555;
}

/* Gece Modu Uyumu */
body.night-mode .main-level-container { background: rgba(10, 14, 23, 0.95); border-color: #ffd700; }
body.night-mode .main-level-title { color: #ffd700; text-shadow: none;}
body.night-mode .main-level-bar-bg { background: #333; border-color: #555; }
body.night-mode .main-level-meta { color: #aaa; }

/* ======================
   LEVEL ATLAMA KUTLAMASI
   ====================== */
.level-up-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(5px);
}
.levelup-box {
  background: linear-gradient(135deg, #ffd700, #f39c12);
  padding: 40px; border-radius: 30px; border: 5px solid #fff;
  text-align: center; color: #111;
  box-shadow: 0 0 50px rgba(255,215,0,0.8);
  /* Ekrana "POP" diye fırlama efekti */
  animation: popInBig 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative; z-index: 2;
}
.levelup-text { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.levelup-title {
  font-size: 42px; font-weight: 900; color: #fff;
  text-shadow: 3px 3px 0 #111; margin: 20px 0; text-transform: uppercase;
  animation: pulse 1s infinite;
}
.levelup-reward { font-size: 18px; font-weight: bold; margin-bottom: 20px; }
#closeLevelUpBtn {
  padding: 15px 40px; font-size: 20px; font-weight: 900;
  background: #fff; border: 3px solid #111; border-radius: 50px;
  cursor: pointer; transition: transform 0.1s;
}
#closeLevelUpBtn:active { transform: scale(0.9); }
.confetti-container {
  position: absolute; top:0; left:0; width:100%; height:100%;
  font-size: 50px; text-align: center; padding-top: 100px; z-index: 1;
  animation: rainDown 2s infinite linear; opacity: 0.5;
}
@keyframes popInBig { from {transform: scale(0);} to {transform: scale(1);} }
@keyframes rainDown { from {transform: translateY(-100px); opacity:0;} 50%{opacity:1;} to {transform: translateY(100vh); opacity:0;} }

/* ======================
   KOZMETİK MAĞAZA SİSTEMİ
   ====================== */

/* MAĞAZA BUTONU (Sol Menü) */
.action-btn.store {
  background: #9b59b6; /* Mor renk */
  color: #fff;
  border-color: #8e44ad;
}

/* MAĞAZA MODALI (Kutusu) */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* Esnek kolonlar */
  gap: 12px;
  overflow-y: auto;
  padding: 5px;
  /* Kaydırma çubuğu için alan */
  flex-grow: 1; 
}

/* ======================
   YENİ MAĞAZA TASARIMI
   ====================== */

/* Kategori Başlıkları */

/* Modalı Genişlet */
#storeModal .profile-card {
  width: 600px; /* Daha geniş */
  max-width: 95vw; /* Telefondan taşmasın */
  height: auto;
  max-height: 80vh; /* Çok uzarsa scroll çıksın */
  display: flex;
  flex-direction: column;
}

/* Kategori Sekmeleri (Tabs) */
.store-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  overflow-x: auto; /* Telefosda yan yana kaydırılabilsin */
  padding-bottom: 5px;
  border-bottom: 2px solid #eee;
}
.store-tab {
  padding: 8px 16px;
  border: none;
  background: #f0f0f0;
  color: #555;
  border-radius: 20px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap; /* Yazılar alt satıra inmesin */
  transition: all 0.2s;
}

.store-tab:hover {
  background: #e0e0e0;
}

.store-tab.active {
  background: #9b59b6; /* Mor renk */
  color: #fff;
  box-shadow: 0 4px 10px rgba(155, 89, 182, 0.3);
}
.store-category-header {
  grid-column: 1 / -1; /* Tüm satırı kapla */
  font-size: 14px;
  font-weight: 900;
  color: #555;
  background: #eee;
  padding: 5px 10px;
  border-radius: 5px;
  margin-top: 10px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 5px solid #9b59b6; /* Mor çizgi */
}

/* Mağaza Bakiye Göstergesi (Header içi) */
.store-balance-display {
  font-size: 14px;
  font-weight: bold;
  background: #27ae60;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex; align-items: center; gap: 5px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.store-balance-display.error {
  animation: flashRed 0.5s ease;
  background: #c0392b;
}
@keyframes flashRed { 0%,100%{background:#27ae60} 50%{background:#c0392b} }

/* Ürün Kartı Revizyonu */
.store-item {
  position: relative; /* Etiket için gerekli */
  background: #fff;
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  overflow: hidden;
}
.store-item:hover { transform: translateY(-5px); border-color: #bdc3c7; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Aktif (Seçili) Ürün Tasarımı */
.store-item.active {
  border: 3px solid #27ae60; /* Yeşil kalın çerçeve */
  background: #e9f7ef;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(39, 174, 96, 0.4);
}
/* Seçili Etiketi */
.store-item.active::after {
  content: "SEÇİLİ";
  position: absolute; top: 0; right: 0;
  background: #27ae60; color: #fff;
  font-size: 8px; font-weight: 900;
  padding: 3px 8px;
  border-bottom-left-radius: 8px;
}

/* Satın Alınmış Ama Seçili Değil */
.store-item.owned:not(.active) {
  border-color: #3498db; /* Mavi çerçeve */
  opacity: 0.8;
}

/* Buton Görünümü */
.store-btn-action {
  font-size: 10px; font-weight: bold;
  padding: 5px 10px; border-radius: 5px; width: 100%;
  border: none; cursor: pointer; transition: 0.2s;
}
/* Satın Al Butonu */
.store-btn-buy { background: #f1c40f; color: #111; box-shadow: 0 2px 0 #d4ac0d; }
.store-btn-buy:active { transform: translateY(2px); box-shadow: none; }
/* Kuşan Butonu */
.store-btn-equip { background: #3498db; color: #fff; box-shadow: 0 2px 0 #2980b9; }
/* Seçili Butonu (Pasif) */
.store-btn-active { background: #27ae60; color: #fff; cursor: default; }

/* Hata Animasyonu (Para yetmeyince kart titresin) */
.shake-card { animation: shake 0.4s ease-in-out; border-color: #c0392b !important; }

/* --- 1. TOP KAPLAMALARI (BALL SKINS) --- */
/* Altın Top */
.ball.skin-gold { background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b); border-color: #fff; box-shadow: 0 0 10px #ffd700; }
/* Ateş Topu */
.ball.skin-fire { background: radial-gradient(circle, #ff5e62, #ff9966); border-color: #800000; box-shadow: 0 0 8px #ff4500; }
/* Tenis Topu */
.ball.skin-tennis { background: #c1d72e; border: 2px solid #fff; }
/* Retro Deri */
.ball.skin-retro { background: #8d6e63; border: 2px dashed #3e2723; }

/* --- 2. SAHA ZEMİNLERİ (BACKGROUNDS) --- */
/* Çim Saha (Yeşil Çizgili) */
body.bg-grass {
  background: repeating-linear-gradient(
    0deg,
    #2ecc71,
    #2ecc71 50px,
    #27ae60 50px,
    #27ae60 100px
  );
}
/* Buzlu Saha */
body.bg-ice { background: radial-gradient(circle, #e0f7fa, #b2ebf2); }
/* Toprak Saha */
body.bg-mud { background: #795548; background-image: url('https://www.transparenttextures.com/patterns/dirt.png'); } /* Basit doku */
/* Gece Modu ve Zemin Uyumu */
body.night-mode.bg-grass { background: repeating-linear-gradient(0deg, #145a32, #145a32 50px, #0b5345 50px, #0b5345 100px); }

/* --- 3. TAKIM TEMALARI (UI COLORS) --- */
/* Sarı Lacivert */
body.theme-fb #mainBtn, body.theme-fb .profile-card { border-color: #002d72; color: #002d72; }
body.theme-fb #mainBtn:hover { background: #f1c40f; }
/* Sarı Kırmızı */
body.theme-gs #mainBtn, body.theme-gs .profile-card { border-color: #b31b1b; color: #ffb700; }
body.theme-gs #mainBtn { background: #a90432; color: #fdb913; }
/* Siyah Beyaz */
body.theme-bjk #mainBtn { border-color: #000; background: #fff; color: #000; border-width: 4px; }

/* =========================================
   MAĞAZA VE GECE MODU TAMİR KİTİ (YENİ)
   ========================================= */

/* 1. MAĞAZA KARTLARI (GECE MODU) */
body.night-mode .store-item {
  background: #1a1f2e;       /* Koyu arka plan */
  border-color: #444;        /* Koyu gri çerçeve */
  color: #fff;               /* Beyaz yazı */
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Gece modunda "Seçili" olan ürün */
body.night-mode .store-item.active {
  background: #0b5345;       /* Koyu yeşil */
  border-color: #2ecc71;     /* Parlak yeşil çerçeve */
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
}

/* Gece modunda "Satın Alınmış" ama seçili olmayan */
body.night-mode .store-item.owned:not(.active) {
  border-color: #3498db;
  background: #15202b;
}

/* Kategori Başlıkları (Gece) */
body.night-mode .store-category-header {
  background: #333;
  color: #ffd700;
  border-left-color: #ffd700;
}

/* Sekmeler (Gece) */
body.night-mode .store-tab {
  background: #333;
  color: #ccc;
}
body.night-mode .store-tab.active {
  background: #9b59b6;
  color: #fff;
}

/* 2. TOP KAPLAMALARI (ZORLAŞTIRICI GÜÇ) */
/* !important ekleyerek tarayıcının "hayır değiştirmem" demesini engelliyoruz */

.ball.skin-gold { 
  background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b) !important; 
  border-color: #fff !important; 
  box-shadow: 0 0 10px #ffd700 !important; 
}

.ball.skin-fire { 
  background: radial-gradient(circle, #ff5e62, #ff9966) !important; 
  border-color: #800000 !important; 
  box-shadow: 0 0 8px #ff4500 !important; 
}

.ball.skin-tennis { 
  background: #c1d72e !important; 
  border: 2px solid #fff !important; 
  /* Tenis topundaki dikiş efekti için */
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1) !important;
}

.ball.skin-retro { 
  background: #8d6e63 !important; 
  border: 2px dashed #3e2723 !important; 
}

/* ======================
   MENAJER OFİSİ V2 (CSS)
   ====================== */

/* Kartın Genel Yapısı */
.office-card {
  width: 400px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex; flex-direction: column;
  padding: 0; /* İç dolguyu yönetmek için */
  overflow: hidden; /* Taşanları gizle */
}

.office-header {
  display: flex; align-items: center; gap: 15px;
  padding: 15px; background: #f9f9f9; border-bottom: 1px solid #eee;
}
.office-avatar { font-size: 40px; background: #fff; border: 2px solid #111; border-radius: 50%; width: 60px; height: 60px; display:flex; align-items:center; justify-content:center; }
.office-name { font-weight: 900; font-size: 16px; color: #111; }
.office-badge { background: #111; color: #ffd700; padding: 2px 8px; border-radius: 4px; font-size: 10px; display: inline-block; margin-top: 4px; }
.office-title { font-size: 12px; color: #777; font-weight: bold; }

/* Sekmeler */
.office-tabs { display: flex; background: #eee; }
.office-tab {
  flex: 1; padding: 12px; border: none; background: transparent;
  font-weight: 800; color: #777; cursor: pointer; border-bottom: 3px solid transparent;
}
.office-tab.active { background: #fff; color: #111; border-bottom-color: #d35400; }

/* İçerik Alanı */
.office-content {
  display: none; /* Varsayılan gizli */
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1; /* Kalan boşluğu doldur */
}
.office-content.active { display: block; animation: fadeIn 0.3s; }

/* Kupa Müzesi */
.trophy-case {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  background: rgba(0,0,0,0.03); padding: 10px; border-radius: 10px; border: 1px solid #ddd;
}
.trophy-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  opacity: 0.3; filter: grayscale(1); transition: all 0.3s;
}
.trophy-item.unlocked { opacity: 1; filter: grayscale(0); transform: scale(1.1); }
.trophy-icon { font-size: 24px; margin-bottom: 5px; }
.trophy-name { font-size: 8px; font-weight: bold; color: #555; line-height: 1.1; }

/* İstatistik Tablosu */
.stats-grid-v2 { display: flex; flex-direction: column; gap: 8px; }
.stat-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #eee; padding-bottom: 4px; font-size: 13px; }

/* Taktik Kartları */
.tactic-desc { font-size: 12px; color: #666; margin-bottom: 15px; text-align: center; }
.tactics-container { display: flex; gap: 10px; justify-content: center; }
.tactic-card {
  flex: 1; border: 2px solid #ddd; border-radius: 10px; padding: 10px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.tactic-card:hover { border-color: #999; transform: translateY(-3px); }
.tactic-card.selected { border-color: #27ae60; background: #eafaf1; box-shadow: 0 5px 15px rgba(39, 174, 96, 0.2); }
.tactic-icon { font-size: 24px; margin-bottom: 5px; }
.tactic-name { font-size: 10px; font-weight: 900; margin-bottom: 5px; }
.tactic-bonus { font-size: 9px; color: #27ae60; font-weight: bold; }
.active-tactic-display { margin-top: 20px; text-align: center; font-weight: bold; font-size: 14px; border-top: 1px solid #eee; padding-top: 10px; }

/* Sıfırlama Butonu Küçültme */
.reset-btn-small { margin: 15px; padding: 8px; font-size: 10px; background: #c0392b; color: #fff; border: none; border-radius: 5px; cursor: pointer; }

/* Gece Modu Uyumu */
body.night-mode .office-card { background: #1a1f2e; color: #fff; }
body.night-mode .office-header, body.night-mode .office-tabs { background: #111; border-color: #333; }
body.night-mode .office-tab { color: #888; }
body.night-mode .office-tab.active { background: #1a1f2e; color: #fff; }
body.night-mode .office-name { color: #fff; }
body.night-mode .trophy-case { background: rgba(255,255,255,0.05); border-color: #444; }
body.night-mode .trophy-name { color: #ccc; }
body.night-mode .tactic-card { border-color: #444; }
body.night-mode .tactic-card.selected { background: #0b5345; border-color: #2ecc71; }

/* --- OFİS BAŞLIK DÜZELTMESİ --- */
.office-card .card-header {
  position: relative;
  justify-content: center; /* Ortala */
}
.office-card .card-title {
  margin: 0;
  text-align: center;
  flex-grow: 1; /* Ortayı kapla */
}
.office-card .close-card-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* --- TAKTİK KARTLARI (SATIN ALMA STİLİ) --- */
.tactic-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 140px;
}
.tactic-price {
  background: #f1c40f; color: #111;
  font-size: 10px; font-weight: bold;
  padding: 4px 8px; border-radius: 4px;
  margin-top: 5px; display: inline-block;
}
.tactic-card.locked { opacity: 0.7; filter: grayscale(0.8); }
.tactic-card.locked:hover { opacity: 1; filter: grayscale(0); }
.tactic-status { font-size: 10px; font-weight: 800; margin-top: 5px; text-transform: uppercase; }

/* Kupa İpuçları için daha belirgin imleç */
.trophy-item { cursor: help; }