body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 1rem;
  background-color: #f8f9fa;
  color: #333;
  overflow-x: hidden;
}

/* Sadece kelime avı alanını ortala */
.kelimeavi-wrapper {
  text-align: center;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #007bff;
}

#mesaj {
  margin: 1rem auto;
  padding: 0.75rem 1.5rem;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 5px;
  font-size: 1.1rem;
  display: none;
  max-width: 600px;
}

/* Grid dış kabı scroll ile genişliğe göre ayarlanır */
#grid {
  margin: 1rem auto;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  padding: 0.5rem;
  box-sizing: border-box;
  cursor: grab;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  min-width: calc(40px * 18 + 2px * 17);
}

.cell {
  width: 40px;
  height: 40px;
  min-width: 24px;
  min-height: 24px;
  border: 1px solid #ccc;
  background-color: #ffffff;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cell.filled {
  background-color: #e6f2ff;
}

.cell.selected {
  background-color: #ffeb3b;
  color: #000;
}

.cell.found {
  background-color: #90ee90;
  color: #000;
}

#sorular {
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.soru {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.soru.found-question {
  color: green;
  text-decoration: line-through;
}

/* Responsive ayarlar */
@media (max-width: 768px) {
  h2 {
    font-size: 1.3rem;
  }

  .soru {
    font-size: 0.95rem;
  }

  #mesaj {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }

  #grid {
    min-width: calc(32px * 18 + 2px * 17);
  }

  .cell {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  #yarismasonuclari {
    margin-top: 2rem;
    background-color: #fff3cd;
    padding: 1rem;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  #yarismasonuclari h3 {
    margin-top: 0;
    color: #856404;
  }
}


/* Süre dolunca oyun kilidi */
#grid.kelimeavi-disabled, #grid.kelimeavi-disabled * {
  pointer-events: none !important;
  opacity: 0.75;
}
#kelimeavi-timer{
  margin: 10px 0;
  font-weight: 700;
}

/* === Ödül Çarkı Modal === */
.kelimeavi-wheel-modal{
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  padding: 16px;
}
.kelimeavi-wheel-content{
  background: #fff;
  border-radius: 14px;
  max-width: 460px;
  width: 100%;
  padding: 18px 16px 16px;
  box-shadow: 0 10px 35px rgba(0,0,0,.25);
  position: relative;
  text-align: center;
}
.kelimeavi-wheel-close{
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  background: #f3f3f3;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 34px;
  cursor: pointer;
}
.kelimeavi-wheel-title{
  margin: 6px 0 12px;
}
.kelimeavi-wheel-stage{
  position: relative;
  display: inline-block;
  margin: 0 auto 12px;
}
.kelimeavi-wheel-pointer{
  position: absolute;
  left: 50%;
  top: -6px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 18px solid #d00;
  z-index: 2;
}
#kelimeavi-wheel-canvas{
  border-radius: 50%;
  background: #fff;
}
.kelimeavi-wheel-spin{
  width: 100%;
  max-width: 320px;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}
.kelimeavi-wheel-spin:disabled{
  opacity: .6;
  cursor: not-allowed;
}
.kelimeavi-wheel-result{
  margin-top: 10px;
  padding: 10px 12px;
  background: #f6f6f6;
  border-radius: 10px;
  font-weight: 700;
}


/* Yarışma sonuç tablosu */
.kelimeavi-sonuclar-wrap{overflow:auto;}
.kelimeavi-sonuclar-table{width:100%;border-collapse:collapse;margin-top:10px;}
.kelimeavi-sonuclar-table th,.kelimeavi-sonuclar-table td{border:1px solid #e5e5e5;padding:8px 10px;text-align:left;white-space:nowrap;}
.kelimeavi-sonuclar-table th{background:#fafafa;}
