* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  text-align: center;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  touch-action: manipulation;
}

/* Header layout */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
  padding: 0 20px;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

.logo {
  color: #333;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  min-width: 100px;
  border-radius: 8px;
  height: auto;
}

.game-board {
  --size: 300px;
  --node: 50px;
  --edge: 2.5px;
  --spread: 28%;
  position: relative;
  width: var(--size);
  height: var(--size);
  margin: 0 auto 50px;
  border: var(--edge) solid #333;
  border-radius: 10px;
  background: rgba(254, 207, 239, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.letter-node {
  position: absolute;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: #fff;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  z-index: 1;
}

.letter-node:hover { 
  transform: scale(1.08); 
  box-shadow: 0 6px 16px rgba(0,0,0,.18); 
}

.letter-node.available {
  background: #17a2b8;
  color: white;
  border-color: #117a8b;
}

.letter-node.used {
  background: #28a745;
  color: white;
  border-color: #1e7e34;
}

.letter-node.selected {
  background: #007bff;
  color: white;
  border-color: #0056b3;
}

/* Animasyon için shake efekti */
@keyframes shake {
  0%, 100% { transform: translateX(0) scale(1); }
  10%, 30%, 50%, 70%, 90% { 
    transform: translateX(-3px) scale(1.1); 
    background: #ffc107;
    border-color: #ff9800;
  }
  20%, 40%, 60%, 80% { 
    transform: translateX(3px) scale(1.1); 
    background: #ffc107;
    border-color: #ff9800;
  }
}

.letter-node.shake {
  animation: shake 0.6s ease-in-out;
}

.word-tag.shake {
  animation: shake 0.6s ease-in-out;
}

/* Pulse animasyonu için alternatif */
@keyframes pulse {
  0%, 100% { 
    transform: scale(1); 
    background: #ffc107;
    border-color: #ff9800;
  }
  50% { 
    transform: scale(1.2); 
    background: #ff9800;
    border-color: #ff6f00;
  }
}

.letter-node.pulse {
  animation: pulse 0.8s ease-in-out 2;
}

/* Üst kenar */
.top-left  { top:    calc(var(--node)/-2); left:  calc(50% - var(--spread) - var(--node)/2); }
.top       { top:    calc(var(--node)/-2); left:  calc(50% - var(--node)/2); }
.top-right { top:    calc(var(--node)/-2); left:  calc(50% + var(--spread) - var(--node)/2); }

/* Sağ kenar */
.right-top    { right: calc(var(--node)/-2); top: calc(50% - var(--spread) - var(--node)/2); }
.right        { right: calc(var(--node)/-2); top: calc(50% - var(--node)/2); }
.right-bottom { right: calc(var(--node)/-2); top: calc(50% + var(--spread) - var(--node)/2); }

/* Alt kenar */
.bottom-left  { bottom: calc(var(--node)/-2); left: calc(50% - var(--spread) - var(--node)/2); }
.bottom       { bottom: calc(var(--node)/-2); left: calc(50% - var(--node)/2); }
.bottom-right { bottom: calc(var(--node)/-2); left: calc(50% + var(--spread) - var(--node)/2); }

/* Sol kenar */
.left-top     { left:  calc(var(--node)/-2); top:  calc(50% - var(--spread) - var(--node)/2); }
.left         { left:  calc(var(--node)/-2); top:  calc(50% - var(--node)/2); }
.left-bottom  { left:  calc(var(--node)/-2); top:  calc(50% + var(--spread) - var(--node)/2); }

/* Seçilen harfler arasındaki çizgiler */
.connection-line {
  position: absolute;
  height: 3px;
  border-radius: 2px;
  z-index: 5;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 2px dashed #007bff;
  background: transparent;
}

.game-info {
  margin-bottom: 30px;
}

.current-word {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  min-height: 1.5rem;
}

.words-used {
  margin-bottom: 20px;
}



#words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  min-height: 2rem;
}

.word-tag {
  background: #e9ecef;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  color: #495057;
  border: 1px solid #dee2e6;
}

.stats {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.95rem;
}



.message {
  min-height: 20px;
  margin-bottom: 50px;
  font-weight: bold;
}

.message.error {
  color: #dc3545;
}

.message.success {
  color: #28a745;
}

.message.info {
  color: #17a2b8;
}

.controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.small-btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  min-width: 100px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn.restart {
  background: #ff6b6b;
  color: white;
}

.btn.restart:hover {
  background: #ff5252;
}

.btn.delete {
  background: #ffa726;
  color: white;
}

.btn.delete:hover {
  background: #ff9800;
}

.btn.enter {
  background: #66bb6a;
  color: white;
}

.btn.enter:hover {
  background: #4caf50;
}

.btn.new-game {
  background: #42a5f5;
  color: white;
}

.btn.new-game:hover {
  background: #2196f3;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Alt içerik alanı için stiller */
.content-section {
  max-width: 800px;
  margin: 80px auto 40px auto;
  padding: 0 20px;
}

.content-section h1 {
  color: #333;
  font-size: 2rem;
  margin: 30px 0 20px 0;
  text-align: center;
}

.content-section h2 {
  color: #333;
  font-size: 1.8rem;
  margin: 30px 0 15px 0;
  text-align: center;
}

.content-section h3 {
  color: #333;
  font-size: 1.4rem;
  margin: 25px 0 12px 0;
  text-align: center;
}

.content-section p {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: center;
}

.content-section ul {
  color: #666;
  margin: 15px 0;
  padding-left: 20px;
}

.content-section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Responsive: mobilde tahta ve düğmeler küçülsün, oranlar korunur */
@media (max-width: 768px) {
  .header {
    justify-content: space-between;
    padding: 0 15px;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .header-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 90px;
    border-radius: 6px;
  }
  
  .container {
    margin: 10px auto;
  }
  
  .game-board { 
    --size: 250px; 
    --node: 40px; 
    --edge: 2px; 
  }
  
  .controls {
    gap: 8px;
  }
  
  .small-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    min-width: 90px;
  }
  
  .content-section {
    padding: 0 15px;
  }
  
  .content-section h1 {
    font-size: 1.7rem;
  }
  
  .content-section h2 {
    font-size: 1.5rem;
  }
  
  .content-section h3 {
    font-size: 1.2rem;
  }
}

/* Footer Styles */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  margin-bottom: 15px;
}

.footer-link {
  text-decoration: none;
  color: #555;
  margin: 0 10px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #333;
  text-decoration: underline;
}

.footer-separator {
  color: #999;
  margin: 0 5px;
  font-weight: 300;
}

.footer-copyright {
  color: #777;
  font-size: 14px;
  margin: 0;
  font-weight: 400;
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer {
    padding: 30px 15px;
    margin-top: 40px;
  }
  
  .footer-link {
    margin: 0 8px;
    font-size: 14px;
  }
  
  .footer-copyright {
    font-size: 13px;
  }
}
