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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6f8;
  color: #2d3436;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .header__nav {
    max-width: 100%;
    padding: 0 8px;
  }
  .navigation {
    min-height: 56px;
    height: auto;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 6px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .navigation::-webkit-scrollbar {
    display: none;
  }
  .navigation__logo-item {
    margin-right: 8px;
    margin-bottom: 0;
    flex: 0 0 auto;
  }
  .navigation__logo-img {
    max-height: 30px;
  }
  .navigation__item {
    margin: 0;
    width: auto;
    flex: 0 0 auto;
  }
  .navigation__link {
    display: inline-flex !important;
    width: auto !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 0.9rem;
  }
}
.button {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  text-decoration: none;
}
.button:active {
  transform: scale(0.98);
}
.button--primary {
  background-color: #6c5ce7;
  color: #ffffff;
}
.button--primary:hover {
  background-color: #5b4bc4;
}
.button--secondary {
  background-color: #00cec9;
  color: #ffffff;
}
.button--secondary:hover {
  background-color: #00b3a6;
}
.button--outline {
  background-color: transparent;
  color: #6c5ce7;
  border: 2px solid #6c5ce7;
}
.button--outline:hover {
  background-color: rgba(108, 92, 231, 0.1);
}

.dashboard {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.dashboard__welcome {
  text-align: center;
  margin-bottom: 3rem;
}
.dashboard__title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #2d3436;
}
.dashboard__stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.dashboard__stats .stat-badge {
  background-color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  color: #6c5ce7;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #dfe6e9;
}
.dashboard__modes {
  margin-top: 2rem;
}
.dashboard__subtitle {
  font-size: 1.5rem;
  margin-bottom: 0.45rem;
  text-align: center;
}
.dashboard__help-hint {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: #4d5c6d;
}
.dashboard__help-hint kbd {
  display: inline-block;
  min-width: 1.5rem;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid #b8c7dd;
  background: #f4f8ff;
  color: #2a426b;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: inset 0 -1px 0 rgba(41, 69, 109, 0.15);
}
.dashboard__category-note {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #45566d;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "solo random" "friend friend";
    align-items: start;
  }
  .mode-grid .mode-card--solo {
    grid-area: solo;
  }
  .mode-grid #random-match-card {
    grid-area: random;
  }
  .mode-grid #friend-match-card {
    grid-area: friend;
  }
}

.mode-card {
  --mode-accent: #5f7baf;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 16px;
  width: 100%;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 18px rgba(22, 34, 52, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #dce4ee;
  position: relative;
  overflow: hidden;
}
.mode-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--mode-accent), rgba(255, 255, 255, 0));
}
.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(22, 34, 52, 0.13);
}
.mode-card__content {
  margin-bottom: 0.75rem;
}
.mode-card__title {
  font-size: 1.4rem;
  margin-bottom: 0.55rem;
  color: #22324b;
}
.mode-card__desc {
  color: #5b6979;
  font-size: 0.95rem;
  line-height: 1.45;
}
.mode-card > .button {
  width: 100%;
  margin-top: 0.55rem;
}
.mode-card--solo {
  --mode-accent: #12a39a;
  border-color: #caece8;
  min-height: 260px;
}
.mode-card--highlight {
  --mode-accent: #5f52da;
  border-color: #d8d9fb;
  box-shadow: 0 10px 20px rgba(80, 71, 194, 0.16);
}
.mode-card--random {
  --mode-accent: #2d8dd6;
  border-color: #cde2f3;
  min-height: 260px;
}
.mode-card--random .member-search__status {
  margin-top: 0.25rem;
  margin-bottom: 0.4rem;
  min-height: 1.2rem;
}
.mode-card__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.mode-card__actions .button {
  flex: 1;
}

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.help-overlay[hidden] {
  display: none;
}
.help-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 32, 0.5);
  backdrop-filter: blur(2px);
}
.help-overlay__dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(480px, 100%);
  background: #ffffff;
  border: 1px solid #d7e0ec;
  border-radius: 14px;
  padding: 1rem 1rem 0.9rem;
  box-shadow: 0 14px 40px rgba(20, 34, 54, 0.24);
}
@media (max-width: 560px) {
  .help-overlay__dialog__dialog {
    width: min(480px, 100vw - 2rem);
  }
}
.help-overlay__dialog h3 {
  margin: 0 0 0.6rem;
  color: #24354f;
  font-size: 1.1rem;
}
.help-overlay__list {
  margin: 0;
  padding-left: 1rem;
  color: #4d5c6d;
  font-size: 0.92rem;
}
.help-overlay__list li {
  margin: 0.28rem 0;
}
.help-overlay__close {
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #ecf1f8;
  color: #31425b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.help-overlay__close:hover {
  background: #dde8f5;
}

.member-search,
.invite-join {
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  padding: 0.9rem;
  background: #fbfcff;
}

.offline-category {
  margin: 0 0 1.2rem;
  width: 100%;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid #bfc8f7;
  background: linear-gradient(180deg, #f5f6ff 0%, #fbfcff 100%);
  box-shadow: 0 8px 18px rgba(83, 98, 177, 0.12);
}
.offline-category .member-search__label {
  margin-bottom: 0.45rem;
  line-height: 1.35;
}
.offline-category .member-search__controls {
  margin-bottom: 0.1rem;
}
.offline-category .member-search__status {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.35;
}
.offline-category .offline-category__label-suffix {
  margin-left: 0.2rem;
  font-weight: 600;
  font-size: 0.96em;
  color: #4d59b7;
}
.offline-category .offline-category__hint {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #4f5d6b;
}

.online-match-status {
  display: none;
  margin-bottom: 0.8rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.online-match-status--active {
  display: block;
}
.online-match-status--loading {
  position: relative;
  padding-left: 1.9rem;
  color: #304a78;
  border-color: #bfd0f3;
  background: linear-gradient(90deg, #edf3ff 0%, #f8fbff 100%);
  animation: onlineMatchStatusPulse 1.6s ease-in-out infinite;
}
.online-match-status--loading::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #4f6aa8;
  transform: translateY(-50%);
  animation: onlineMatchDotPulse 1.1s ease-in-out infinite;
}
.online-match-status--success {
  color: #1f6a3f;
  border-color: #c7ead5;
  background: linear-gradient(90deg, #edfdf3 0%, #f7fffa 100%);
}
.online-match-status--error {
  color: #9f2d2d;
  border-color: #f0c9c9;
  background: linear-gradient(90deg, #fff2f2 0%, #fff8f8 100%);
}

.member-search {
  margin-bottom: 1rem;
}
.member-search__label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #313b45;
}
.member-search__controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.member-search__input {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0.75rem 0.95rem;
  border: 2px solid #9fb0c6;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #2b3440;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(24, 38, 56, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.member-search__input::-moz-placeholder {
  color: #7b8794;
  font-weight: 500;
}
.member-search__input::placeholder {
  color: #7b8794;
  font-weight: 500;
}
.member-search__input:hover {
  border-color: #8fa2bc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 3px 8px rgba(24, 38, 56, 0.1);
}
.member-search__input:focus {
  outline: none;
  border-color: #6c5ce7;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2), 0 4px 12px rgba(64, 78, 100, 0.14);
}
.member-search__input:disabled {
  background: #f0f3f7;
  color: #556270;
}
.member-search__hint {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: #6c7784;
}
.member-search__status {
  margin-top: 0.6rem;
  min-height: 1.1rem;
  font-size: 0.86rem;
  color: #4f5d6b;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.member-search__status--error {
  color: #c0392b;
}
.member-search__status--success {
  color: #2d7a46;
}
.member-search__status--loading {
  color: #4b4bc6;
}
.member-search__status--loading .member-search__spinner {
  display: inline-block;
}
.member-search__spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d7ddf5;
  border-top-color: #6c5ce7;
  animation: memberSearchSpin 0.75s linear infinite;
  display: none;
}
.member-search__results {
  list-style: none;
  margin-top: 0.6rem;
  display: grid;
  gap: 0.5rem;
}

.invite-inbox {
  margin-top: 1rem;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  padding: 0.9rem;
  background: #ffffff;
}
.invite-inbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}
.invite-inbox__header .button {
  padding: 8px 12px;
  font-size: 0.82rem;
  min-width: 122px;
}
.invite-inbox__title {
  font-size: 1rem;
  font-weight: 700;
  color: #26323d;
}
.invite-inbox__status {
  min-height: 1.1rem;
  font-size: 0.84rem;
  color: #5d6a78;
  margin-bottom: 0.55rem;
}
.invite-inbox__status--error {
  color: #c0392b;
}
.invite-inbox__status--success {
  color: #2d7a46;
}
.invite-inbox__list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.invite-item {
  border: 1px solid #d6e1ec;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.invite-item__meta {
  min-width: 0;
}
.invite-item__title {
  font-weight: 700;
  color: #27313b;
}
.invite-item__subtitle {
  font-size: 0.8rem;
  color: #6d7a88;
}
.invite-item__actions {
  display: flex;
  gap: 0.45rem;
}
.invite-item__actions .button {
  font-size: 0.8rem;
  padding: 7px 11px;
  white-space: nowrap;
}

.invite-join__label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #313b45;
}
.invite-join__controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.invite-join__input {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0.75rem 0.95rem;
  border: 2px solid #9fb0c6;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #2b3440;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(24, 38, 56, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.invite-join__input::-moz-placeholder {
  color: #7b8794;
  font-weight: 500;
}
.invite-join__input::placeholder {
  color: #7b8794;
  font-weight: 500;
}
.invite-join__input:hover {
  border-color: #8fa2bc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 3px 8px rgba(24, 38, 56, 0.1);
}
.invite-join__input:focus {
  outline: none;
  border-color: #6c5ce7;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2), 0 4px 12px rgba(64, 78, 100, 0.14);
}
.invite-join__input:disabled {
  background: #f0f3f7;
  color: #556270;
}

.member-result {
  border: 1px solid #dde4ec;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.member-result__meta {
  min-width: 0;
}
.member-result__name {
  font-weight: 700;
  color: #27313b;
}
.member-result__details {
  font-size: 0.82rem;
  color: #6f7b88;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-result .button {
  padding: 8px 12px;
  font-size: 0.86rem;
  white-space: nowrap;
}
.member-result .button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

@media (max-width: 700px) {
  .offline-category {
    padding: 0.9rem 0.85rem;
  }
  .offline-category .offline-category__label-suffix {
    display: block;
    margin-top: 0.1rem;
    margin-left: 0;
  }
  .member-search__controls,
  .invite-join__controls {
    flex-direction: column;
    align-items: stretch;
  }
  .member-result {
    flex-direction: column;
    align-items: flex-start;
  }
  .member-result .button {
    width: 100%;
  }
  .invite-inbox__header {
    flex-direction: column;
    align-items: stretch;
  }
  .invite-item {
    flex-direction: column;
    align-items: stretch;
  }
  .invite-item__actions .button {
    width: 100%;
  }
}
@keyframes memberSearchSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes onlineMatchStatusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(105, 140, 214, 0.25);
    filter: saturate(100%);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(105, 140, 214, 0.08);
    filter: saturate(110%);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(105, 140, 214, 0.25);
    filter: saturate(100%);
  }
}
@keyframes onlineMatchDotPulse {
  0% {
    transform: translateY(-50%) scale(0.85);
    opacity: 0.65;
  }
  50% {
    transform: translateY(-50%) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) scale(0.85);
    opacity: 0.65;
  }
}
.game-view {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 600px) {
  .game-header {
    flex-direction: row;
    justify-content: space-between;
  }
}

#game-title {
  font-size: 1.8rem;
  color: #6c5ce7;
}

.game-stats {
  display: flex;
  gap: 1.5rem;
  font-weight: 600;
  background-color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #dfe6e9;
  color: #636e72;
}
.game-stats span {
  color: #6c5ce7;
}

.match-result-banner {
  display: none;
  margin: -0.7rem 0 1.35rem;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(34, 44, 58, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.match-result-banner--active {
  display: block;
  animation: matchResultEnter 0.24s ease-out;
}
.match-result-banner--win {
  color: #0f4c2a;
  border-color: #8cd8ad;
  background: linear-gradient(95deg, #e0f9eb 0%, #f2fff7 100%);
  font-size: 1.28rem;
  box-shadow: 0 12px 24px rgba(26, 130, 73, 0.24);
  transform: scale(1.015);
}
.match-result-banner--loss {
  color: #8b1e1e;
  border-color: #efb5b5;
  background: linear-gradient(95deg, #ffe7e7 0%, #fff5f5 100%);
  box-shadow: 0 10px 22px rgba(165, 34, 34, 0.15);
}
.match-result-banner--draw {
  color: #6e4f00;
  border-color: #ead58c;
  background: linear-gradient(95deg, #fff5cf 0%, #fffaf0 100%);
  box-shadow: 0 10px 22px rgba(158, 121, 15, 0.14);
}
@media (max-width: 600px) {
  .match-result-banner {
    font-size: 1rem;
    padding: 1rem 0.95rem;
  }
  .match-result-banner--win {
    font-size: 1.12rem;
  }
}

@keyframes matchResultEnter {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.question-container {
  background-color: #ffffff;
  padding: 3rem 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #dfe6e9;
  text-align: center;
  margin-bottom: 2rem;
}

#question-text {
  font-size: 1.6rem;
  margin-bottom: 2.5rem;
  color: #2d3436;
  line-height: 1.4;
}

@keyframes correctPop {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(46, 204, 113, 0);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
  }
}
@keyframes wrongShake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-10px);
  }
  40%, 80% {
    transform: translateX(10px);
  }
}
.answer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .answer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.answer-grid .answer-btn {
  padding: 1.2rem;
  font-size: 1.1rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.5s ease;
}
.answer-grid .answer-btn:hover:not(:disabled) {
  background-color: #6c5ce7;
  color: #ffffff;
}
.answer-grid .answer-btn.correct {
  background-color: #2ecc71 !important;
  color: #ffffff !important;
  border-color: #2ecc71 !important;
  animation: correctPop 0.5s ease-out forwards;
  z-index: 2;
}
.answer-grid .answer-btn.wrong {
  background-color: #e74c3c !important;
  color: #ffffff !important;
  border-color: #e74c3c !important;
  animation: wrongShake 0.5s ease-in-out forwards;
}
.answer-grid .answer-btn.fade-out {
  opacity: 0.3;
  box-shadow: none;
}/*# sourceMappingURL=index.css.map */