@font-face {
  font-family: game_font;
  src: url(game_font.ttf);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "game_font", sans-serif;
}

body {
  background: #f4f6fa;
  color: #1e1e2a;
  padding: 0 0 20px 0;
}

.header {
  background: #0b0d17;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 3px solid #2979ff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f0e8d0;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

/* навигация по категориям */
.category-nav {
  background: #1a1d2b;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  border-bottom: 1px solid #2e3347;
  position: sticky;
  top: 74px;
  z-index: 9;
  backdrop-filter: blur(2px);
}

.category-btn {
  background: transparent;
  border: 1px solid #3d435b;
  color: #d0d4e6;
  padding: 6px 18px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-btn i {
  font-size: 0.9rem;
  color: #b8b0d0;
}

.category-btn:hover {
  background: #2979ff;
  border-color: #2979ff;
  color: #0b0d17;
  transform: scale(1.02);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.category-btn.active {
  background: #2979ff;
  border-color: #2979ff;
  color: #0b0d17;
  font-weight: 700;
}

/* Основная сетка товаров */
.container {
  max-width: 1440px;
  margin: 20px auto 0;
  padding: 0 16px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

/* карточка товара */
.product-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid #edeff5;
  backdrop-filter: blur(2px);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
  border-color: #2979ff;
}

.card-img {
  background: #f0f2f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 10px 8px;
  min-height: 130px;
}

.card-img img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.card-content {
  padding: 12px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #7a7f9c;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-title {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 6px;
  color: #0e1120;
}

.card-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2979ff;
  margin-top: auto; 
  margin-bottom: 12px;
  text-shadow: 
    0 0 10px rgba(41, 121, 255, 0.5),
    0 0 20px rgba(41, 121, 255, 0.3),
    0 0 40px rgba(41, 121, 255, 0.1);
  letter-spacing: 1px;
}

.card-price small {
  font-weight: 400;
  font-size: 0.7rem;
  color: #6b708b;
  margin-left: 4px;
}

.card-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-buy {
  background: #0b0d17;
  border: none;
  color: #f0e8d0;
  padding: 10px 0;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid #2f344a;
  margin-top: auto;
}

.btn-buy i {
  font-size: 0.9rem;
}

.btn-buy:hover {
  background: #2979ff;
  color: #0b0d17;
  border-color: #2979ff;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.footer {
  background: #0b0d17;
  color: #c8c2d6;
  padding: 40px 20px 20px;
  margin-top: 40px;
  border-top: 3px solid #2979ff;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
}

.footer-title {
  color: #2979ff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.footer-title i {
  font-size: 1.1rem;
}

.footer-contact-list,
.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li,
.footer-links-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer-contact-list li:last-child,
.footer-links-list li:last-child {
  border-bottom: none;
}

.footer-contact-list li i,
.footer-links-list li i {
  width: 20px;
  color: #2979ff;
  font-size: 1rem;
  flex-shrink: 0;
  text-align: center;
}

.footer-links-list a,
.footer-contact-list a {
  color: #c8c2d6;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links-list a:hover,
.footer-contact-list a:hover {
  color: #2979ff;
  transform: translateX(4px);
}

.footer-contact-list li span {
  color: #c8c2d6;
  word-break: break-word;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b708b;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 640px) {
  .header {
    padding: 12px 14px;
  }
  .logo {
    font-size: 1.3rem;
    gap: 8px;
  }
  .logo-img {
  	height: 35px;
  }

  .category-nav {
    top: 66px;
    padding: 8px 8px;
    gap: 8px 10px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .category-nav::-webkit-scrollbar {
    display: none;
  }

  .category-btn {
    padding: 5px 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
    border-radius: 40px;
    background: #1f2336;
    border-color: #3a405b;
    color: #c9cee6;
  }
  .category-btn i {
    font-size: 0.7rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  
  .product-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  }

  .card-img {
    min-height: 100px;
    padding: 12px 8px 4px;
  }
  .card-img img {
    max-height: 70px;
  }
  .card-content {
    padding: 8px 10px 12px;
  }
  .card-title {
    font-size: 0.95rem;
  }
  .card-price {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  .btn-buy {
    padding: 8px 0;
    font-size: 0.8rem;
  }
  .footer {
	padding: 24px 14px 14px;
	margin-top: 30px;
  }

  .footer-container {
	grid-template-columns: 1fr;
	gap: 30px;
	padding-bottom: 20px;
  }

  .footer-title {
	font-size: 1rem;
	margin-bottom: 12px;
	justify-content: center;
  }

  .footer-title i {
	font-size: 1rem;
  }

  .footer-contact-list li,
  .footer-links-list li {
	font-size: 0.85rem;
	padding: 6px 0;
	gap: 10px;
	justify-content: flex-start;
	flex-wrap: wrap;
  }

  .footer-contact-list li i,
  .footer-links-list li i {
	width: 18px;
	font-size: 0.9rem;
  }

  .footer-links-list a,
  .footer-contact-list a {
	padding: 4px 0;
	flex: 1;
	min-width: 120px;
  }

  .footer-bottom {
	font-size: 0.75rem;
	padding-top: 16px;
  }

  .footer-bottom p {
	padding: 0 10px;
  }

  .modal-content {
	margin: 20% auto;
	width: 95%;
  }
  
  .modal-header h2 {
	font-size: 1.1rem;
  }
  
  .modal-body {
	padding: 18px;
  }
  
  .input-group input {
	padding: 12px 0;
	font-size: 0.95rem;
  }
}

@media (max-width: 420px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .category-btn {
    font-size: 0.7rem;
    padding: 4px 10px;
  }
  .logo {
    font-size: 1.1rem;
  }
  .footer {
	padding: 20px 10px 12px;
  }

  .footer-container {
	gap: 20px;
	padding-bottom: 16px;
  }

  .footer-title {
	font-size: 0.9rem;
  }

  .footer-contact-list li,
  .footer-links-list li {
	font-size: 0.8rem;
	padding: 5px 0;
	gap: 8px;
	flex-wrap: wrap;
  }

  .footer-contact-list li i,
  .footer-links-list li i {
	width: 16px;
	font-size: 0.8rem;
  }

  .footer-contact-list li span {
	font-size: 0.8rem;
  }

  .footer-links-list a {
	font-size: 0.8rem;
	word-break: break-word;
  }

  .footer-bottom {
	font-size: 0.7rem;
	padding-top: 12px;
  }
}

@media (hover: none) {
  .footer-links-list a:hover,
  .footer-contact-list a:hover {
	transform: none;
  }
}

/* Стили для модального окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-content {
  background: #ffffff;
  margin: 10% auto;
  max-width: 440px;
  width: 90%;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 2px solid #f0f2f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.3rem;
  color: #1a1a2e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 i {
  color: #2979ff;
}

.modal-close {
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  transition: 0.2s;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  color: #555;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.input-group {
  display: flex;
  align-items: center;
  background: #f5f6fa;
  border-radius: 12px;
  padding: 0 16px;
  border: 2px solid #e8ecf5;
  transition: 0.3s;
  margin-bottom: 8px;
}

.input-group:focus-within {
  border-color: #2979ff;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.input-group i {
  color: #999;
  font-size: 1.1rem;
  margin-right: 12px;
}

.input-group input {
  border: none;
  background: transparent;
  padding: 14px 0;
  font-size: 1rem;
  width: 100%;
  outline: none;
  color: #1a1a2e;
}

.input-group input::placeholder {
  color: #bbb;
}

.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  min-height: 24px;
  margin: 4px 0 12px;
  padding-left: 4px;
}

.error-message.success {
  color: #27ae60;
}

.error-message.warning {
  color: #F8A81B;
}

.modal-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.check-btn {
  background: #1a1a2e;
  color: #fff;
}

.check-btn:hover {
  background: #2d2d44;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 26, 46, 0.3);
}

.check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.continue-btn {
  background: #27ae60;
  color: #fff;
}

.continue-btn:hover {
  background: #2ecc71;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}