@font-face {
  font-family: 'Minecraft';
  src: url('fonts/MinecraftRegular-Bmg3.otf') format('opentype');
}

@font-face {
  font-family: 'Minecraft';
  src: url('fonts/MinecraftBold-nMK1.otf') format('opentype');
  font-weight: bold;
}

@font-face {
  font-family: 'Minecraft';
  src: url('fonts/MinecraftItalic-R8Mo.otf') format('opentype');
  font-style: italic;
}

@font-face {
  font-family: 'Minecraft';
  src: url('fonts/MinecraftBoldItalic-y1le.otf') format('opentype');
  font-weight: bold;
  font-style: italic;
}


body {
  font-family: 'Minecraft', sans-serif;
  background-image: url('img/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  min-height: 100vh;
}



.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: rgba(15, 23, 32, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  position: relative;
}

.menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}


.left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 40px;
}


.players {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
}

.dot {
  width: 8px;
  height: 8px;
  background: lime;
  border-radius: 50%;
  display: inline-block;
}


.menu a {
  margin: 0 15px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.menu a:hover {
  opacity: 0.7;
}


.right {
  display: flex;
  gap: 10px;
}

.icon {
  background: #1a1f2b;
  border: none;
  padding: 10px;
  color: white;
  cursor: pointer;
  border-radius: 6px;
}

.icon.green {
  background: #4caf50;
}


.page-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 20px;
  min-height: calc(100vh - 80px);
  box-sizing: border-box;
}


.rules-container {
  background: rgba(15, 23, 32, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  max-width: 800px;
  width: 100%;
  color: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.rules-container h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 32px;
  color: #4caf50;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.rules-content {
  line-height: 1.8;
  font-size: 16px;
  color: #e0e0e0;
}

.rules-content p {
  margin-bottom: 15px;
}


.social-sidebar {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.social-icon img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: rgba(15, 23, 32, 0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
  box-sizing: border-box;
}

.social-icon img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}


.modes-section {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 80px); 
}

.modes-section .title {
  font-size: 48px;
  color: white;
  text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: 2px;
}

.modes-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
}

.mode-card {
  background: rgba(15, 23, 32, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  max-width: 400px;
  width: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.mode-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.4);
}

.mode-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.mode-info {
  padding: 25px;
  text-align: center;
  color: white;
}

.mode-info h2 {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: #4caf50;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.mode-info p {
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.5;
}

.join-btn {
  background: linear-gradient(to right, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.join-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}


.search-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 20px;
}

.search-box {
  background: rgba(15, 23, 32, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 50px 40px;
  max-width: 650px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.search-box h1 {
  color: #4caf50;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 36px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.search-box p {
  color: #ccc;
  margin-bottom: 30px;
  font-size: 16px;
}

.search-form {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  border-color: #4caf50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.search-input::placeholder {
  color: #888;
}

.search-btn {
  background: linear-gradient(to right, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.search-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}


.social-sidebar {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.social-icon img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: rgba(15, 23, 32, 0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
  box-sizing: border-box;
}

.social-icon img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}


.modes-section {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 80px); 
}

.modes-section .title {
  font-size: 48px;
  color: white;
  text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: 2px;
}

.modes-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
}

.mode-card {
  background: rgba(15, 23, 32, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  max-width: 400px;
  width: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.mode-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.4);
}

.mode-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.mode-info {
  padding: 25px;
  text-align: center;
  color: white;
}

.mode-info h2 {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: #4caf50;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.mode-info p {
  color: #ccc;
  margin-bottom: 20px;
  line-height: 1.5;
}

.join-btn {
  background: linear-gradient(to right, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.join-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn-yellow {
  background: linear-gradient(to right, #fbc02d, #f57f17);
  color: #1a1a1a;
  font-weight: bold;
}

.modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.7); 
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(15, 23, 32, 0.9);
  border: 1px solid rgba(76, 175, 80, 0.4);
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  color: white;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #ccc;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fbc02d;
}

.modal-content h2 {
  color: #4caf50;
  margin-top: 0;
  font-size: 28px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.modal-content p {
  color: #e0e0e0;
  line-height: 1.6;
  font-size: 16px;
}

.api-message {
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: 8px;
  line-height: 1.45;
}

.api-message:empty,
.api-message[hidden] {
  display: none;
}

.api-message.info {
  color: #fff3c4;
  background: rgba(251, 192, 45, 0.14);
  border: 1px solid rgba(251, 192, 45, 0.35);
}

.api-message.success {
  color: #c8f7cb;
  background: rgba(76, 175, 80, 0.16);
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.api-message.error {
  color: #ffc7c7;
  background: rgba(244, 67, 54, 0.16);
  border: 1px solid rgba(244, 67, 54, 0.4);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none !important;
}

.stats-result {
  margin-top: 30px;
  text-align: left;
}

.player-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.player-profile h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 28px;
  text-transform: none;
}

.player-avatar {
  width: 82px;
  height: 82px;
  image-rendering: pixelated;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.player-online,
.player-offline {
  font-size: 13px;
  letter-spacing: 1px;
}

.player-online { color: #69e86e; }
.player-offline { color: #aaa; }

.stats-group {
  margin-top: 25px;
}

.stats-group h3 {
  color: #fbc02d;
  margin: 0 0 13px;
  font-size: 19px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item strong {
  color: #fff;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.stat-item span {
  color: #aaa;
  font-size: 13px;
}

.reward-card {
  width: min(520px, 100%);
  padding: 40px;
  box-sizing: border-box;
  border-radius: 16px;
  color: white;
  background: rgba(15, 23, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.reward-description {
  color: #ccc;
  line-height: 1.5;
  margin: -5px 0 25px;
}

.reward-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.reward-form .key-input {
  box-sizing: border-box;
  max-width: none;
}

.reward-button {
  padding: 15px 60px;
  font-size: 1.3rem;
}

@media (max-width: 760px) {
  .navbar {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .menu {
    position: static;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
  }

  .menu a {
    margin: 0;
    font-size: 11px;
  }

  .search-box,
  .reward-card {
    padding: 28px 20px;
  }
}
