* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.home-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

body {
  margin: 0;
  background: #0b0b0c;
  display: flex;
  justify-content: center;
  overflow: hidden;
  font-family: Helvetica, Arial, sans-serif;
  color: white;
}

/* КОНТЕЙНЕР */
.app-container {
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: #0b0b0c;
  position: relative;
  overflow: hidden;
}

/* ЭКРАНЫ */
.screen {
  display: none;
  padding: 16px;
  padding-bottom: 100px;
  height: 100%;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: #1c1c1c;
}

.player.me {
  background: #2a1f1f;
  border: 1px solid #ff4d4d;
}

.place {
  width: 30px;
  text-align: center;
  font-weight: bold;
  opacity: 0.8;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name {
  font-weight: 500;
}

.rating {
  font-weight: bold;
  opacity: 0.8;
}

.you {
  font-size: 10px;
  margin-left: 6px;
  color: #ff4d4d;
}

/* АНИМАЦИЯ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ТЕКСТ */
h2 {
  margin: 10px 0 16px;
}

h2, h3 {
  letter-spacing: 0.3px;
}

/* КАРТОЧКИ */
.card {
  background: #1a1a1d;
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ГЛАВНАЯ КАРТОЧКА */
.main-card {
  background: linear-gradient(135deg, #272727, #1a1a1a);
  padding: 20px;
  border-radius: 20px;
  font-size: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ВТОРИЧНАЯ */
.secondary-card {
  background: linear-gradient(135deg, #272727, #1a1a1a);
  height: 250px;
  padding: 18px;
  border-radius: 16px;
}

/* СЕКЦИИ */
.section {
  background: #1a1a1d;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 10px;
}

.section p {
  opacity: 0.85;
}

/* КНОПКИ */
button {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  background: #ffffff;
  color: #000;
}

button:disabled {
  background: #444;
  color: #aaa;
}

/* КНОПКА УЧАСТИЯ */
.join-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  background: #ffffff;
  border-radius: 14px;
}

/* НИЖНИЙ БЛОК */
.bottom-card {
  margin-top: auto;
  background: #ffffff;
  color: #000;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
}

/* HEADER */
.game-header {
  width: 100%;
  height: 180px;
  background: #222;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.game-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* КЛИК ЭФФЕКТ */
.card:active,
.main-card:active,
.section:active,
button:active {
  transform: scale(0.97);
}

/* НАВИГАЦИЯ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #111;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top: 1px solid #222;
}

/* КНОПКИ НАВИГАЦИИ */
.bottom-nav button {
  background: none;
  color: #888;
  font-size: 18px;
  padding: 6px;
  transition: 0.2s;
}

/* АКТИВНЫЙ TAB */
.bottom-nav button.active {
  color: white;
  transform: scale(1.2);
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #1c1c1c;
  padding: 16px;
  border-radius: 12px;
}

.avatar.big {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email {
  font-size: 12px;
  opacity: 0.6;
}

input {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #2a2a2a;
  color: white;
}

button {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #ff4d4d;
  color: white;
  font-weight: bold;
}