/* СБРОС */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #121218;
  color: #f0f0f0;
  height: 100vh;
  overflow: hidden;
}

/* ШАПКА */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #1a1a2a;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.logo {
  font-weight: bold;
  font-size: 20px;
}

.lang-switch a {
  color: #bbb;
  text-decoration: none;
  margin: 0 5px;
}
.lang-switch a:hover {
  color: #fff;
}

/* ОБОЛОЧКА */
.container {
  display: flex;
  height: 100%;
  min-height: 100vh;
  padding-top: 60px; /* отступ под шапкой */
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  background-color: #1c1c2c;
}

/* МЕНЮ */
.menu {
  width: 320px;
  background-color: #1b1b2f;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100vh;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
}

.menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 0;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
  text-decoration: none;
  font-weight: 500;
}

.menu a:hover,
.menu a.active {
  background-color: #2d2d4a;
  color: #fff;
}
.menu .lang-switch {
  margin-top: 20px;
  font-size: 13px;
  text-align: left;
}


/* ПРАВАЯ ЧАСТЬ */
.content {
  flex: 1;
  display: flex;
  padding: 0;
  height: calc(100vh - 60px); /* минус шапка */
}

/* ИГРА + ОПИСАНИЕ */
.game-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background-color: #1c1c2c;
  border-radius: 0;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4);
  width: 100%;
  height: 100%;
}

/* ИГРА */
.game {
  text-align: center;
  margin-bottom: 30px;
}
.game h2 {
  font-size: 26px;
  margin-bottom: 20px;
}
.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}
.stats div {
  background-color: #28283a;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 16px;
}

/* КНОПКИ */
button {
  background-color: #4b8cff;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s;
}
button:hover {
  background-color: #367de5;
}
button:disabled {
  background-color: #555;
  cursor: not-allowed;
}

/* ОПИСАНИЕ */
.description {
  background-color: #202030;
  padding: 20px;
  border-radius: 12px;
  color: #ccc;
  font-size: 15px;
  line-height: 1.5;
}
.description h3 {
  margin-bottom: 10px;
  color: #fff;
}

/* FOLLOW GRID */
#follow-grid {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 10px;
  justify-content: center;
  margin: 20px auto;
}
.follow-btn {
  background-color: #2d2d4d;
  color: #fff;
  font-size: 1.2rem;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  align: center;
}

.follow-btn-start {
  background-color: #2d2d4d;
  color: #fff;
  font-size: 1.2rem;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  width: 300px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.follow-btn.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.7); }
}

.follow-start, .follow-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  padding: 12px 24px;
  font-size: 1.2rem;
  border-radius: 8px;
  background-color: #4a90e2;
  color: white;
  cursor: pointer;
  z-index: 2;
}

.follow-btn:hover {
  transform: scale(1.05);
}
.fade-out {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease-out;
}
.follow-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  justify-content: center;
  padding: 20px;
}

.click-area {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 300px;
  margin: 20px auto;
  background-color: #2b2b3d;
  border: 2px dashed #4b8cff;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none; /* ❗️ запрет на выделение текста */
}

.click-message {
  color: #888;
  font-size: 18px;
  font-weight: 500;
  animation: pulseText 1.5s infinite;
  pointer-events: none;
}

/* Всплеск */
.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #4b8cff 30%, transparent 70%);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-burst 0.5s ease-out;
  pointer-events: none;
}
@keyframes ripple-burst {
  to {
    transform: scale(8);
    opacity: 0;
  }
}

@keyframes ripple {
  to {
    transform: scale(5);
    opacity: 0;
  }
}
@keyframes pulseText {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.1); }
}
.controls {
  margin-bottom: 15px;
  text-align: center;
  font-size: 15px;
  color: #aaa;
}
.controls select {
  margin-left: 8px;
  padding: 6px 10px;
  background-color: #2b2b3d;
  border: 1px solid #444;
  border-radius: 6px;
  color: #fff;
}	

.duration-buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.duration-buttons button {
  background-color: #2b2b3d;
  border: 1px solid #4b8cff;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.duration-buttons button:hover {
  background-color: #365cbf;
}

.duration-buttons button.active {
  background-color: #4b8cff;
  color: #fff;
}
.menu-counter {
  font-size: 13px;
  color: #888;
  border-top: 1px solid #333;
  padding-top: 12px;
  padding-bottom: 10px;
  line-height: 1.6;
}
.click-area.pressed {
  background-color: #365cbf;
  box-shadow: 0 0 15px #4b8cff inset;
}

.click-area.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.counter-link {
  color: #aaa;
  text-decoration: underline;
  font-size: 13px;
}
.counter-link:hover {
  color: #fff;
}

form input[type="password"] {
  padding: 10px;
  margin-right: 10px;
  background: #1f1f2e;
  border: 1px solid #444;
  color: #fff;
  border-radius: 6px;
}

form button {
  padding: 10px 16px;
  background: #4b8cff;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}
form button:hover {
  background: #365cbf;
}

#follow-area {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* по умолчанию */
  gap: 10px;
  padding: 20px;
  min-height: 240px;
  justify-items: center;
  align-items: center;
}

.follow-number {
  background: #2b2b3d;
  color: white;
  font-size: 20px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.follow-number:hover {
  background-color: #4b8cff;
}
.follow-number.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.follow-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

.follow-centered-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 1rem;
  text-align: center;
}

.follow-message {
  text-align: center;
  font-weight: bold;
  font-size: 22px;
  padding: 20px;
}


.start-btn {
  background: #4b8cff;
  color: white;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.start-btn:hover {
  background: #357be3;
}
.follow-center-btn {
  margin: 20px auto 0;
  display: block;
}
.follow-area {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* фиксированное количество колонок */
  gap: 15px;
  padding: 20px;
  border: 2px dashed #4a90e2;
  border-radius: 10px;
  min-height: 250px;
  position: relative;
  justify-items: center;
  align-items: center;
}

.follow-start {
  background-color: #4a90e2;
  color: white;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.follow-start:hover {
  background-color: #357ab8;
}

/* Aim target circle */
.target {
  position: absolute;
  width: 50px;
  height: 50px;
  background: #ef4444;
  border-radius: 50%;
  cursor: pointer;
  animation: aim-pop 0.2s ease-out;
}

@keyframes aim-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.site-footer {
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2a;
  color: #ccc;
  font-size: 13px;
  padding: 12px 20px;
  border-top: 1px solid #333;
  border-radius: 12px 0 0 0;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 1000;
  margin-top: auto;
  box-shadow: -4px -4px 12px rgba(0, 0, 0, 0.3) inset;
}

.footer-content {
  max-width: 1400px;
  width: 100%;
  text-align: right;
}

.site-footer a {
  color: #4b8cff;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer .footer-content > div {
  margin-bottom: 4px;
}

.click-area {
  width: 100%;
  height: 400px;
  position: relative;
  background: #f4f4f4;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: inset 0 0 8px #ccc;
}

.target:active {
  transform: scale(0.9);
}

#game-area.miss {
  animation: flash 0.15s ease-in;
}
@keyframes flash {
  0% { background-color: #3b1f1f; }
  100% { background-color: #2b2b3d; }
}

#difficulty {
  margin-left: 10px;
  padding: 6px 10px;
  background-color: #2b2b3d;
  border: 1px solid #444;
  border-radius: 6px;
  color: #fff;
}