* { box-sizing: border-box; }
body{
  font-family:sans-serif; margin:0; padding:0; text-align:center;
  background-image:
    linear-gradient(rgba(255,255,255,.65), rgba(255,255,255,.65)), /* solukluk */
    url("10.png");
  background-size: 700px auto, 700px auto;
  background-repeat: repeat, repeat;
}
h1 { margin-top: 20px; font-size: 24px; }

#start-area, #scoreboard, #timer, #replay-btn, #home-btn {
  margin: 10px auto;
  max-width: 90%;
}

input, select {
  padding: 10px;
  margin: 5px;
  font-size: 1em;
  width: 80%;
  max-width: 300px;
}

button {
  padding: 10px 20px;
  margin: 10px;
  font-size: 1em;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
}

#game-board {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px;
}

.card {
  width: 22vw;
  height: 15vw;
  max-width: 90px;
  max-height: 70px;
  margin: 5px;
  background: #ffe082;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: transparent;
    border: 2px solid #888;  /* Gri tonlu kenar çizgisi */
  border-radius: 8px;       /* Hafif yuvarlatılmış köşeler */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Hafif gölge ile öne çıkarma */
}

.revealed { background: #4fc3f7; color: white; }
.matched { background: #81c784; color: white; }

@media (min-width: 1024px) {
  .card {
    width: calc(33.333% - 20px);
    height: auto;
    max-width: none;
    max-height: none;
    font-size: 1.2em;
  }
}

@media (min-width: 768px) {
  #game-board {
    display: grid;
    grid-template-columns: repeat(4, 120px);
    justify-content: center;
    gap: 10px;
  }

  .card {
    width: 120px;
    height: 80px;
    font-size: 1rem;
  }
}

#page-footer {
  text-align: center;
  font-size: 0.9em;
  color: #777;
  padding: 20px 0;
  margin-top: 40px;
}
@media (min-width: 768px) {
  #game-board {
    display: grid;
    justify-content: center;
    gap: 16px; /* boşlukları biraz daha artırdık */
    padding: 20px;
  }

  .card {
    width: 120px;
    height: 80px;
    font-size: 0.9rem;
    margin: 0; /* grid kullandığımız için margin kaldırılmalı */
  }

  /* Ek olarak zorluk seviyelerine özel grid yapıları burada yer almalı */
  #game-board.easy-grid {
    grid-template-columns: repeat(4, 120px);
  }

  #game-board.medium-grid {
    grid-template-columns: repeat(6, 120px);
  }

  #game-board.hard-grid {
    grid-template-columns: repeat(6, 120px);
  }
  
}

.top3-box{
  position: sticky; /* footer üstünde hep görünsün */
  bottom: 0;
  background: #ffffffcc;
  backdrop-filter: blur(4px);
  border-top: 1px solid #e6e6e6;
  padding: 12px 16px;
  max-width: 900px;
  margin: 12px auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.top3-box h4{ margin: 0 0 8px; font-weight: 700; }
.top3-box ol{ margin: 0; padding-left: 18px; }
/* 🔒 Metin seçimini engelleme */
html, body, #game-board, .card {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS uzun basma menüsü */
}

/* İsim girişi alanında seçim serbest */
#player-name { 
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Seçim rengi görünmez */
::selection { background: transparent; color: transparent; }
::-moz-selection { background: transparent; color: transparent; }

.unit-selector {
  margin: 20px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  color: #333;
}

.unit-selector label {
  margin-right: 10px;
}

.unit-selector select {
  padding: 10px 15px;
  border: 2px solid #d4c3f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef9ff, #f3ecff);
  font-size: 16px;
  color: #444;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(180, 140, 220, 0.2);
}

.unit-selector select:hover {
  border-color: #b48ec7;
  box-shadow: 0 6px 14px rgba(180, 140, 220, 0.3);
}

.unit-selector select:focus {
  outline: none;
  border-color: #9b6fc7;
  box-shadow: 0 0 0 3px rgba(180, 140, 220, 0.25);
}

/* Satır içi hizalama */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

/* Oyuncu adı inputu */
#player-name {
  width: 150px;   /* daha dar */
  padding: 8px;
  border-radius: 8px;
  border: 2px solid #d4c3f5;
  background: #fef9ff;
  font-size: 14px;
}

/* Zorluk seçimi */
#difficulty {
  width: 120px;   /* daha dar */
  padding: 8px;
  border-radius: 8px;
  border: 2px solid #d4c3f5;
  background: #fef9ff;
  font-size: 14px;
}

/* Oyuna Başla butonu */
button {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #b48ec7, #d9b3e0);
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}
button:hover {
  opacity: 0.9;
}
/* Satır yerleşimi */
.form-row{
  display:flex; gap:12px; align-items:center; justify-content:center; flex-wrap:wrap;
}

/* Etiketi select ile aynı satıra al */
.unit-selector{ display:flex; align-items:center; gap:8px; }
.unit-selector .inline{ display:inline-block; margin:0; }

/* Tüm kontrol elemanları için ortak ölçü */
.control{
  height:44px;               /* aynı yükseklik */
  min-width:180px;           /* aynı en (istersen 160 yap) */
  padding:0 14px;
  font: 500 15px/1.2 'Poppins', system-ui, sans-serif;
  color:#333;
  border:2px solid #d4c3f5;
  border-radius:12px;
  background:linear-gradient(135deg,#fef9ff,#f3ecff);
  box-shadow:0 4px 10px rgba(180,140,220,.2);
  transition:.25s;
  appearance:none;           /* select’te tutarlı görünüm */
}

/* Select’te ok işaretini korumak istiyorsan appearance satırını kaldırabilirsin */

.control:focus{ outline:none; border-color:#9b6fc7; box-shadow:0 0 0 3px rgba(180,140,220,.25); }
.control:hover{ border-color:#b48ec7; box-shadow:0 6px 14px rgba(180,140,220,.3); }

/* Buton rengi */
.start-btn{
  min-width:140px;
  color:#fff; border:none; cursor:pointer;
  background:linear-gradient(135deg,#b48ec7,#d9b3e0);
}

/* Mobilde rahat kayma */
@media (max-width:700px){
  .control{ min-width:140px; }
}
