/* CSS Variables - Dark Blue Theme */
:root {
  --bg: #00102b;
  --bg2: #001a3d;
  --bg3: #002654;
  --text-primary: #FFFFFF;
  --text-secondary: #a0aec0;
  --text2: #718096;
  --accent: #1E90FF;
  --accent-hover: #1C86EE;
  --accent-rgb: 30, 144, 255;
  --error: #FF3232;
  --card-gradient: linear-gradient(180deg, #182253 0%, #0A0F2C 100%);
  --border-radius: 6px;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #FFFFFF;
}

a, button, .btn, input, select, textarea {
  transition: all 0.2s ease;
}

button, .btn {
  background: linear-gradient(135deg, #1E90FF 0%, #1C86EE 100%);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 16px;
}

button:hover, .btn:hover {
  background: linear-gradient(135deg, #4FA3FF 0%, #3D95FF 100%);
  transform: translateY(-1px);
}

button:active, .btn:active {
  transform: translateY(0);
}

button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

input, textarea, select {
  border-radius: var(--border-radius) !important;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #050618;
  color: #FFFFFF;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  pointer-events: auto;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(24, 34, 83, 0.8) 0%, transparent 50%),
    radial-gradient(ellipse 600px 500px at 80% 70%, rgba(13, 29, 81, 0.7) 0%, transparent 50%),
    radial-gradient(ellipse 900px 700px at 50% 50%, rgba(10, 15, 44, 0.6) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: breathingBackground 20s ease-in-out infinite;
}

@keyframes breathingBackground {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    filter: brightness(1);
  }
  25% {
    transform: translate(-3%, -3%) scale(1.03);
    filter: brightness(0.85);
  }
  50% {
    transform: translate(-6%, 3%) scale(1);
    filter: brightness(0.7);
  }
  75% {
    transform: translate(3%, 6%) scale(1.03);
    filter: brightness(0.85);
  }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0, 112, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 112, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(0, 112, 255, 0.02) 0%, transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 112, 255, 0.03) 2px,
      rgba(0, 112, 255, 0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 112, 255, 0.03) 2px,
      rgba(0, 112, 255, 0.03) 4px
    );
  background-size:
    800px 800px,
    600px 600px,
    400px 400px,
    100px 100px,
    100px 100px;
  background-position:
    0% 0%,
    100% 100%,
    50% 0%,
    0 0,
    0 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: textureMove 60s ease-in-out infinite;
}

@keyframes textureMove {
  0%, 100% {
    background-position:
      0% 0%,
      100% 100%,
      50% 0%,
      0 0,
      0 0;
  }
  50% {
    background-position:
      100% 100%,
      0% 0%,
      50% 100%,
      -50px -50px,
      50px 50px;
  }
}

main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 600px) {
  main {
    padding: 80px 16px 100px 16px;
  }
}

/* Landing page specific styles */
body[data-page="landing"] main,
main.landing-page {
  padding-top: 0;
  margin-top: 0;
}

@media screen and (max-width: 600px) {
  body[data-page="landing"] main,
  main.landing-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

#root {
  width: 100%;
  min-height: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

input {
  padding: 12px 0;
  background: var(--bg2);
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  width: 100%;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* PlayStation Header */
.ps-header {
  width: 100%;
  background: #020818;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: none;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ps-header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.ps-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}

.ps-logo svg {
  color: #1E90FF;
}

.ps-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.ps-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.ps-nav a:hover {
  color: #fff;
}

.ps-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ps-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, #1E90FF 0%, #1C86EE 100%);
  border-radius: var(--border-radius);
  color: #fff;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.ps-cart:hover {
  background: linear-gradient(135deg, #4FA3FF 0%, #3D95FF 100%);
  transform: translateY(-1px);
}

.ps-cart svg {
  margin-right: 8px;
}

.ps-cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #FF3232;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

.ps-login-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, #1E90FF 0%, #1C86EE 100%);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.ps-login-btn:hover {
  background: linear-gradient(135deg, #4FA3FF 0%, #3D95FF 100%);
  transform: translateY(-1px);
}

.ps-avatar {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  cursor: pointer;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}

.ps-avatar.profile-image-icon {
  padding: 4px;
}

header {
  width: 100%;
  background: var(--bg2);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--bg3);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.logo svg {
  color: #0ea5e9;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-decoration: none;
}

.cart-icon:hover {
  background: var(--bg3);
  color: var(--text-primary);
}

.btn-login {
  padding: 8px 20px;
  background: #0ea5e9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-login:hover {
  background: #0284c7;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  cursor: pointer;
  object-fit: cover;
}

.profile-avatar.profile-image-icon {
  padding: 4px;
}

.left-container a {
  text-decoration: none;
  color: inherit;
}

.left-container h2 {
  cursor: pointer;
  font-size: 24px;
  transition: opacity 0.2s;
}

.left-container h2:hover {
  opacity: 0.8;
}

.search {
  width: 700px;
  border: 2px solid var(--bg3);
  border-radius: 24px;
  padding: 12px 24px;
  color: var(--text-primary);
}

.search::placeholder {
  color: var(--text-secondary);
}

.popup {
  position: fixed;
  top: 64px;
  right: 32px;
  width: 320px;
  background: rgba(8, 16, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 9998;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

#telegram-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 4px 0 12px 0;
  min-height: 40px;
}

#telegram-login-container iframe {
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.popup-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 6px;
  margin-top: 2px;
}

.popup-item {
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.popup-item img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.5;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.popup-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.popup-item:hover svg {
  opacity: 1;
}

.popup-item h1 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  transition: color 0.15s;
}

.popup-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.popup-item:hover img {
  opacity: 0.9;
}

.popup-profile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: default;
}

.popup-profile .text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.popup-profile .text h1 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-profile .text h2 {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.popup-profile-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
  padding: 0 !important;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-primary);
}

.action img,
.action svg {
  width: 48px;
  height: 40px;
  object-fit: contain;
  opacity: 0.9;
  cursor: pointer;
  transition: opacity 0.2s;
}

.action svg {
  padding: 8px;
}

.action:hover img,
.action:hover svg {
  opacity: 1;
}

.action-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.action:hover .action-label {
  color: var(--text-primary);
}

.profile-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-login-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.header-login-btn:hover {
  background: var(--accent-hover);
}

#profile-image {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  cursor: pointer;
  object-fit: cover;
}

#profile-image.profile-image-icon {
  padding: 4px;
}


.filters {
  width: 100%;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(24px);
  padding: 12px 12px 24px 12px;
  z-index: 1000;
}

@media screen and (max-width: 600px) {
  .mobile-dock {
    display: none !important;
  }
}

@media screen and (min-width: 601px) {
  .mobile-dock {
    display: none !important;
  }
}

.mobile-profile {
  display: none;
  background: var(--bg2);
  border-radius: 20px;
  padding: 12px;
  margin-bottom: 6px;
}

.mobile-profile-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-profile-login {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
}

.mobile-profile-user {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-profile-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bg3);
}

.mobile-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  object-fit: cover;
}

.mobile-profile-info {
  flex: 1;
}

.mobile-profile-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: var(--text-primary);
}

.mobile-profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 2px 0;
}

.mobile-profile-orders {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.mobile-profile-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
}

.mobile-profile-btn-danger {
  background: var(--error);
}

.mobile-profile-btn-admin {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Слот на главной: только кнопка входа из попапа (экран <600px) */
.mobile-login-slot {
  display: none;
  background: var(--bg2);
  border-radius: 20px;
  padding: 12px;
  margin-bottom: 6px;
}

.mobile-login-slot-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
}

.mobile-about-btn {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--bg2);
  border: none;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  margin: 0;
}

.mobile-about-btn:hover {
  background: var(--bg3);
}

@media screen and (max-width: 600px) {
  .mobile-about-btn {
    display: block;
  }
}

/* Кнопка «Админ-панель» — в точности как «О компании», скрыта на больших экранах */
.mobile-account-admin-btn {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--bg2);
  border: none;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  margin: 0;
  box-sizing: border-box;
}

.mobile-account-admin-btn:hover {
  background: var(--bg3);
}

@media screen and (max-width: 600px) {
  .mobile-account-admin-btn {
    display: block;
  }
}

@media screen and (min-width: 601px) {
  .mobile-account-admin-btn {
    display: none !important;
  }
}

.dock-item {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dock-item img,
.dock-item svg {
  height: 100%;
  border-radius: 8px;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.dock-item.active img,
.dock-item.active svg {
  opacity: 1;
  transform: scale(1.1);
}

.dock-item:active img,
.dock-item:active svg {
  opacity: 1;
  transform: scale(0.95);
}


.sections {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sections::-webkit-scrollbar {
  display: none;
}

.section {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 20px;
  color: var(--text-primary);
  background: var(--bg2);
  cursor: pointer;
  flex-shrink: 0;
}

.section:hover {
  background: var(--bg3);
}

.section.active {
  background: var(--accent);
}

.filter {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 20px;
  color: var(--text-primary);
  background: var(--bg2);
  cursor: pointer;
  flex-shrink: 0;
}

.filter:hover {
  background: var(--bg3);
}

.filter.active {
  background: var(--accent);
}

button {
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  padding: 12px 24px;
  border-radius: 8px;
  color: var(--text-primary);
  background: linear-gradient(135deg, #1E90FF 0%, #1C86EE 100%);
  cursor: pointer;
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  transition: all 0.3s ease;
}

button:hover {
  background: linear-gradient(135deg, #4FA3FF 0%, #3D95FF 100%);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

button.error {
  background: var(--error);
}

button.standart {
  background: var(--bg2);
}

button.inactive {
  cursor: default;
  background: var(--bg3);
}

@media screen and (max-width: 1300px) {
  .ps-header-container {
    padding: 14px 24px;
  }
  
  .header-container {
    padding: 12px 24px;
  }
  
  main {
    padding: 80px 24px 32px 24px;
  }

  .popup {
    right: 24px;
  }
}

@media screen and (max-width: 1000px) {
  .ps-nav,
  .nav {
    display: none;
  }

  .ps-header-container,
  .header-container {
    padding: 14px 16px;
  }
  
  main {
    padding: 80px 16px 32px 16px;
  }

  .popup {
    right: 16px;
  }
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
  transition: all 0.3s ease;
  display: block;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media screen and (max-width: 1000px) {
  .mobile-menu-btn {
    display: flex;
  }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(10, 15, 44, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 999;
  flex-direction: column;
  gap: 0;
  animation: slideDown 0.3s ease;
}

.mobile-menu.active {
  display: flex;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-menu a {
  padding: 16px 24px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s;
}

.mobile-menu a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.mobile-menu-auth {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu-login-btn {
  width: 100%;
  padding: 16px 24px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s, color 0.2s;
  transform: none;
}

.mobile-menu-login-btn:hover {
  background: rgba(255,255,255,0.05);
  transform: none;
}

.mobile-menu-logout {
  color: rgba(255, 82, 82, 0.8) !important;
}

.mobile-menu-logout:hover {
  color: #ff5252 !important;
}

@media screen and (max-width: 600px) {
  header {
    display: block;
  }

  /* Блок mobile-profile убран с главной; на его месте только слот с кнопкой входа из попапа */
  .mobile-login-slot {
    display: block;
  }

  .popup {
    display: none !important;
  }

  #profile-image, .ps-avatar {
    display: none !important;
  }

  #ps-cart {
    display: none !important;
  }

  .filters {
    gap: 6px;
  }

  main {
    gap: 6px;
    padding: 80px 12px 32px 12px;
  }

  #site-footer {
    display: none;
  }
}

/* Блок инфо об аккаунте на странице заказов — только на малых экранах, скрыт на больших. Отступы через gap контейнера. */
.mobile-account-card {
  display: none;
  flex-direction: column;
  gap: 12px;
  background: var(--bg2);
  border-radius: 20px;
  padding: 12px;
  margin: 0;
  border: 1px solid var(--bg3);
}

@media screen and (max-width: 600px) {
  .mobile-account-card {
    display: flex;
  }
}

@media screen and (min-width: 601px) {
  .mobile-account-card {
    display: none !important;
  }
}

.mobile-account-card-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.mobile-account-card .mobile-account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  object-fit: cover;
  background: var(--accent);
}

.mobile-account-card .mobile-account-info {
  flex: 1;
  min-width: 0;
}

.mobile-account-card .mobile-account-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: var(--text-primary);
}

.mobile-account-card .mobile-account-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.mobile-account-card .mobile-account-psn-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 0;
  background: var(--accent);
  color: var(--text-primary);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}

.mobile-account-card .mobile-account-psn-btn:hover {
  opacity: 0.9;
}

.mobile-account-card .mobile-account-logout-btn {
  width: 100%;
  padding: 12px;
  background: var(--error);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.mobile-account-card .mobile-account-logout-btn:hover {
  opacity: 0.9;
}


/* Notifications System */
.notifications-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px 12px 24px;
  background: #0d1526;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  opacity: 0;
  transform: translateX(40px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.notification.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.notification.hiding {
  opacity: 0;
  transform: translateX(40px) scale(0.9);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  opacity: 0.8;
}

@keyframes notification-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

.notification-success {
  border-color: #00c853;
}

.notification-success .notification-progress {
  background: #00c853;
}

.notification-error {
  border-color: #ff5252;
}

.notification-error .notification-progress {
  background: #ff5252;
}

.notification-warning {
  border-color: #ffab00;
}

.notification-warning .notification-progress {
  background: #ffab00;
}

.notification-info {
  border-color: var(--accent);
}

.notification-info .notification-progress {
  background: var(--accent);
}

.notification-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.notification-success .notification-icon {
  background: rgba(0, 200, 83, 0.15);
  color: #00c853;
}

.notification-error .notification-icon {
  background: rgba(255, 82, 82, 0.15);
  color: #ff5252;
}

.notification-warning .notification-icon {
  background: rgba(255, 171, 0, 0.15);
  color: #ffab00;
}

.notification-info .notification-icon {
  background: rgba(0, 149, 255, 0.15);
  color: #0095ff;
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-message {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.notification-details {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 4px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  border: 1px solid rgba(255,255,255,0.08);
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.notification-btn {
  padding: 6px 14px;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-btn:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}

.notification-action {
  background: var(--accent);
}

.notification-action:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.notification-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.notification-close:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-primary);
  transform: scale(1.1);
}

@media screen and (max-width: 600px) {
  .notifications-container {
    top: auto;
    bottom: 24px;
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

/* PSN Account Modal */
.psn-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.psn-modal.active {
  display: flex;
}

.psn-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.psn-modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: rgba(8, 16, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 32px;
  animation: psn-modal-appear 0.3s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

@keyframes psn-modal-appear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.psn-modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.psn-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.psn-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.psn-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.2s;
}

.psn-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 129, 217, 0.1);
}

.psn-input::placeholder {
  color: var(--text-secondary);
}

.psn-input[type="password"] {
  padding-right: 50px;
}

.psn-toggle-password {
  position: absolute;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.psn-toggle-password:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.psn-toggle-password.active {
  color: var(--accent);
}

.psn-toggle-password svg {
  width: 20px;
  height: 20px;
}

.psn-region-selector {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px;
  transition: all 0.2s;
}

.psn-region-selector.open {
  border-color: var(--accent);
}

.psn-region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.psn-region-header-content {
  flex: 1;
}

.psn-region-label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
  text-transform: lowercase;
}

.psn-region-current {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.psn-region-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  transition: transform 0.3s ease;
  line-height: 1;
  margin-left: 12px;
  transform: rotate(-45deg);
}

.psn-region-selector.open .psn-region-arrow {
  transform: rotate(45deg);
}

.psn-region-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.psn-region-selector.open .psn-region-options {
  max-height: 200px;
  opacity: 1;
  margin-top: 12px;
}

.psn-region-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
  font-size: 16px;
  font-weight: 600;
}

.psn-region-option:hover {
  border-color: var(--text2);
}

.psn-region-option.active {
  border-color: var(--accent);
}

.psn-region-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.psn-region-selector.open .psn-region-options {
  max-height: 200px;
  opacity: 1;
  margin-top: 16px;
}

.psn-region-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.psn-region-option:hover {
  border-color: var(--text2);
}

.psn-region-option.active {
  border-color: var(--accent);
}

.psn-save-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.psn-save-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 129, 217, 0.3);
}

.psn-save-btn:active {
  transform: translateY(0);
}

.psn-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.psn-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.psn-modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
}

@media screen and (max-width: 600px) {
  .psn-modal {
    align-items: flex-end;
  }

  .psn-modal-content {
    width: 100%;
    max-width: 100%;
    padding: 24px;
    border-radius: 12px 12px 0 0;
    animation: psn-modal-appear-mobile 0.3s ease;
  }

  @keyframes psn-modal-appear-mobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .psn-modal-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .psn-input {
    padding: 14px 16px;
    font-size: 15px;
  }

  .psn-save-btn {
    padding: 14px;
    font-size: 16px;
  }
}

iframe[src*="telegram.org/embed"] {
  border-radius: 10px !important;
  overflow: hidden !important;
}

#telegram-login-container iframe,
[id^="telegram-login-"] iframe,
#offer-telegram-login iframe,
#purchases-telegram-login iframe,
#orders-telegram-login iframe {
  max-width: 100% !important;
  width: auto !important;
  margin: 0 !important;
  border: none !important;
}

/* Footer Styles */
#site-footer {
  background: transparent;
  padding: 32px 32px 24px 32px;
  margin-top: 24px;
  margin-bottom: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 2;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 32px;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

@media screen and (max-width: 1200px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  #site-footer {
    padding: 32px 16px 100px 16px;
    margin-bottom: 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Game card component — shared between catalog and landing */
.game-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.game-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: transparent;
  overflow: hidden;
  border-radius: 8px;
  flex-shrink: 0;
}

.game-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.game-card:hover .game-card-image img {
  transform: scale(1.05);
}

.game-card-platform {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.7);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.game-card-discount {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: #FF3232;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.game-card-content {
  padding: 8px 12px 12px 12px;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-card-title-wrapper {
  overflow: hidden;
  width: 100%;
  height: 22px;
  position: relative;
}

.game-card-title-scroll {
  display: flex;
  gap: 0;
}

.game-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  line-height: 22px;
  flex-shrink: 0;
  width: 100%;
}

.game-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  order: -1;
}

.game-card-price-current {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.game-card-price-old {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: line-through;
}

.game-card-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #1E90FF 0%, #1873CC 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  pointer-events: none;
  margin-top: auto;
  box-shadow: 0 4px 12px rgba(30,144,255,0.3);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .game-card-price-current {
    font-size: 16px;
  }

  .game-card-title {
    font-size: 13px;
  }

  .game-card-btn {
    font-size: 13px;
    padding: 10px;
  }

  .game-card-platform {
    font-size: 9px;
    padding: 2px 6px;
  }
}

.sort-dropdown {
  position: relative;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.sort-btn:hover {
  background: rgba(255,255,255,0.08);
}

.sort-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(10, 15, 44, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
}

.sort-option {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}

.sort-option:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sort-option.active {
  background: #1E90FF;
  color: #fff;
}

