@keyframes slideIn {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Genel görünüm */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom right, #0c1f0c, #1e3c1e);
  color: #f1f1f1;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Halı saha çizgi efekti */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
}

.main-content {
  text-align: center;
  max-width: 900px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

h1 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #f9f9f9;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Kullanıcı kartları */
#players-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.player-card {
  background-color: #ffffff10;
  border: 1px solid #ffffff22;
  border-radius: 10px;
  width: 160px;
  height: 160px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

/* Futbol topu simgesi */
.player-card::before {
  content: "⚽";
  font-size: 24px;
  margin-bottom: 6px;
}

/* Username etiketi */
.username-label {
  font-size: 18px;
  font-weight: bold;
  color: #e0ffcc;
  font-family: 'Courier New', Courier, monospace;
}

/* Butonlar */
.add-button, #start-game {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 14px;
  transition: background-color 0.2s ease-in-out, box-shadow 0.3s ease;
}

.add-button:hover {
  background-color: #218838;
}

input[type="text"] {
  padding: 8px;
  border-radius: 6px;
  border: none;
  outline: none;
  font-size: 14px;
  margin-bottom: 8px;
  width: 100%;
}

/* Başlat butonu özel stili */
#start-game {
  margin-top: 20px;
  font-size: 16px;
  background-color: #007bff;
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.6);
}
#start-game:hover {
  background-color: #0056b3;
  box-shadow: 0 0 20px rgba(0, 123, 255, 1);
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

#edit-teams {
  margin-top: 20px;
  font-size: 16px;
  background-color: #ffc107;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
  transition: background-color 0.2s ease-in-out, box-shadow 0.3s ease;
}

#edit-teams:hover {
  background-color: #e0a800;
  box-shadow: 0 0 20px rgba(255, 193, 7, 1);
}


/* Renk seçici özel stil */
.color-picker-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
  gap: 8px;
}

.color-label {
  font-size: 13px;
  color: #dfffd0;
  font-weight: 500;
  text-shadow: 0 0 2px #000;
}

.color-input {
  -webkit-appearance: none;
  border: 2px solid #fff;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  width: 60px;
  height: 40px;
  background: none;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.color-input:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Chrome ve Edge için renk giriş kutusunun stilini temizle */
.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-input::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

/* Modal (tam ekran) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;              /* JS ile aç-kapa */
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
}

/* Açıkken görünür */
.modal.show { display: flex; }

/* Modal içerik kutusu */
.modal-content {
  width: min(920px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  border: 1px solid #ffffff22;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  padding: 28px 22px 22px;
  animation: modalIn .18s ease-out;
  color: #f1f1f1;
}

/* Başlık ve gövde */
.modal-content h2 {
  margin: 0 0 10px 0;
  font-size: 1.6rem;
  letter-spacing: 0.3px;
  color: #eafecc;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.modal-body {
  line-height: 1.6;
  font-size: 0.98rem;
}
.modal-body p {
  margin: 10px 0;
}

/* Kapat butonu */
.modal-close {
  position: sticky; /* başta sabit dursun */
  top: 0;
  float: right;
  margin-left: auto;
  border: none;
  background: #ffffff12;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .1s ease;
}
.modal-close:hover { background: #ffffff22; }
.modal-close:active { transform: scale(0.98); }

@keyframes modalIn {
  from { transform: translateY(8px) scale(0.99); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Küçük ekran uyarlamaları */
@media (max-width: 520px) {
  .modal-content { padding: 22px 16px 16px; }
  .modal-content h2 { font-size: 1.3rem; }
}

.main-content {
  position: relative;
}

/* Butonun içinde "Nasıl Oynanır?" yazacak */
.help-button {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ffffff33;
  background: linear-gradient(145deg, #2e6b2e, #1f4b1f);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap; /* Yazı tek satır kalsın */
  box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 0 6px rgba(255,255,255,0.15);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  z-index: 2;
}

.help-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}

.help-button:active {
  transform: scale(0.95);
}

/* ===== Footer ===== */
.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: linear-gradient(145deg, rgba(30, 60, 30, 0.95), rgba(20, 40, 20, 0.95));
  border-top: 1px solid #ffffff22;
  backdrop-filter: blur(6px);
  color: #e9ffe2;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.footer-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.logo-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #2e6b2e;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.15);
}
.brand-text strong {
  display: block; font-size: 14px; line-height: 1.1;
}
.brand-text span {
  font-size: 12px; opacity: 0.85;
}

.footer-nav {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}
.footer-link {
  color: #dfffd0; text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 6px 10px; border-radius: 8px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.footer-link:hover {
  background: #ffffff12; border-color: #ffffff2a; transform: translateY(-1px);
}

.footer-meta {
  text-align: right; font-size: 12px; opacity: 0.9;
}

/* Footer mobil uyum */
@media (max-width: 780px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-meta { text-align: center; }
}

/* Footer, ana içeriğin üstüne binmesin diye altta boşluk bırak */
body { padding-bottom: 72px; }
@media (max-width: 520px) { body { padding-bottom: 90px; } }
