html {
  min-height: 100%;
  background: linear-gradient(
    135deg,
    #69C9D0 0%,
    #1a1a2e 50%,
    #EE1D52 100%
  );
}

body { 
  font-family: Arial, sans-serif; 
  margin: 0; 
  min-height: 100vh; 
  background: linear-gradient(
    135deg,
    #69C9D0 0%,
    #1a1a2e 50%,
    #EE1D52 100%
  );
  background-attachment: fixed; 
  color: #eafaff; 
  position: relative; 
  overflow-x: hidden; 
}

body::before { 
  content: ""; 
  position: fixed; 
  inset: 0; 
  pointer-events: none; 
  background:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,0.10), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255,255,255,0.06), transparent 45%);
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 980px; 
  margin: 0 auto; 
  padding: 24px; 
}

.hero { 
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 28px;
  padding: 28px 24px 22px;
  text-align: center;
  margin-bottom: 22px;
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.08);
  color: #eafaff;
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.06em;
}

.hero p {
  margin: 0;
  color: rgba(234, 250, 255, 0.75);
  font-size: 1rem;
}

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #69C9D0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: bold;
}

.shop-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 20px; 
}

.shop-header-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 8, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  position: relative;
  width: min(480px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 24px;
  padding: 24px 20px 18px;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.owner-actions,
.request-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.secondary-btn,
.reject-button {
  background: linear-gradient(90deg, #69C9D0, #a0e8ed);
}

.market-list,
.request-list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}

.market-item,
.request-list li { 
  display: grid; 
  grid-template-columns: 120px 1fr auto; 
  gap: 16px; 
  align-items: center; 
  border-bottom: 1px solid rgba(255,255,255,.12); 
  padding: 14px 0; 
  color: #ebfbff;
}

.market-item strong,
.request-list li strong {
  color: #ffffff;
}

.market-item img { 
  width: 110px; 
  height: 110px; 
  object-fit: cover; 
  border-radius: 18px; 
  box-shadow: 0 0 15px rgba(238,29,82,.3), inset 0 0 0 1px rgba(255,255,255,0.2); 
}

.market-item form,
.inline-form { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
}

.market-item p { 
  margin: 2px 0; 
}

.item-type-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.item-type-badge.product {
  background: rgba(88, 199, 255, 0.18);
  color: #7fd8ff;
  box-shadow: inset 0 0 0 1px rgba(127, 216, 255, 0.4);
}

.item-type-badge.subscription {
  background: rgba(238, 29, 82, 0.18);
  color: #ff8fa8;
  box-shadow: inset 0 0 0 1px rgba(255, 143, 168, 0.4);
}

.rating-line {
  color: rgba(234, 250, 255, 0.85);
  font-size: 0.95em;
}

.stars {
  color: #ffd166;
  letter-spacing: 1px;
}

.stars.muted {
  color: rgba(255, 255, 255, 0.35);
}

.stars.small {
  font-size: 0.85em;
}

.reviews-block {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 10px;
  color: #ebfbff;
}

.reviews-block summary {
  cursor: pointer;
  font-weight: 600;
  color: #f4fdff;
}

.review-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-list li {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 8px 12px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.review-comment {
  margin: 4px 0 0;
  color: rgba(234, 250, 255, 0.85);
}

.review-form {
  margin-top: 10px;
  max-width: 320px;
}

.card { 
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 24px;
  padding: 22px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.06);
  color: #ebfbff;
}

.card h2, .card h3, .card h4 {
  color: #f4fdff;
  margin-top: 0;
}

form { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
}

label {
  color: rgba(234, 250, 255, 0.85);
  font-weight: 600;
}

input,
select { 
  padding: 12px 14px; 
  border-radius: 14px; 
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  color: #f4fdff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus {
  border-color: rgba(105, 201, 208, 0.9);
  box-shadow: 0 0 0 4px rgba(105, 201, 208, 0.14);
}

input::placeholder { 
  color: rgba(234, 250, 255, 0.45); 
}

button { 
  padding: 12px 14px; 
  border-radius: 14px; 
  border: none;
  cursor: pointer; 
  color: #ffffff; 
  font-weight: 700; 
  background-image: linear-gradient(
    90deg,
    #69C9D0,
    #EE1D52
  );
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 12px 26px rgba(238, 29, 82, 0.28),
    inset 0 0 0 1px rgba(255,255,255,0.3),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover { 
  transform: translateY(-2px); 
  filter: brightness(1.08);
  box-shadow:
    0 16px 28px rgba(238, 29, 82, 0.4),
    inset 0 0 0 1px rgba(255,255,255,0.4),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.nav { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  justify-content: center; 
  margin-bottom: 24px; 
}

.nav-link { 
  display: inline-block; 
  padding: 10px 16px; 
  border-radius: 14px; 
  text-decoration: none; 
  font-weight: 700; 
  color: #ecfbff; 
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-link:hover { 
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.profile-list { 
  list-style: none; 
  padding: 0; 
}

.profile-list li { 
  border-bottom: 1px solid rgba(255,255,255,.12); 
  padding: 12px 0; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 12px; 
  color: #ebfbff;
}

.profile-list li strong {
  color: #ffffff;
}

.profile-meta { 
  display: flex; 
  flex-direction: column; 
  align-items: flex-end; 
  gap: 4px; 
}

.settings-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  gap: 16px; 
}

.card-actions { 
  margin-top: 12px; 
}

.admin-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.10));
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.admin-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(238, 29, 82, 0.10);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #EE1D52;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.stat-label {
  color: rgba(234, 250, 255, 0.65);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  font-size: 1.4rem;
  color: #ffffff;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-card-mini {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.admin-card-mini h4 {
  margin: 0 0 12px;
  color: #f0faff;
}

.admin-table-wrap {
  margin-top: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #ebfbff;
}

.admin-table th {
  background: rgba(255,255,255,0.04);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.06);
}

.secondary-link { 
  color: #69C9D0; 
  text-decoration: none; 
  font-weight: bold; 
}

.secondary-link:hover {
  text-decoration: underline;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
}

.status-badge.success {
  background: rgba(105,201,208,0.14);
  color: #69C9D0;
  border: 1px solid rgba(105,201,208,0.3);
}

.status-badge.error {
  background: rgba(238,29,82,0.14);
  color: #EE1D52;
  border: 1px solid rgba(238,29,82,0.3);
}

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

.history-list li {
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 12px 0;
  color: #ebfbff;
}

.history-list li p {
  margin: 4px 0;
}

.success { 
  color: #69C9D0; 
}

.error { 
  color: #EE1D52; 
}

@media (max-width: 700px) {
  .container { padding: 16px; }
  .nav { gap: 10px; }
  .nav-link { flex: 1 1 calc(50% - 12px); text-align: center; }
  .shop-grid { grid-template-columns: 1fr; }
  .market-item, .request-list li { grid-template-columns: 1fr; }
  .market-item img { width: 100%; height: 180px; }
}

.footer { 
  text-align: center; 
  color: rgba(234, 250, 255, 0.6); 
  font-size: 12px; 
  margin-top: 30px; 
  padding: 15px 0; 
}

.white-background {
  background: white !important;
  color: #111 !important;
}

.white-background::before { display: none; }

.white-background .card,
.white-background .hero,
.white-background .nav-link {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(24px) saturate(180%);
  color: #13212d;
  border-color: rgba(19, 33, 45, 0.1);
}

.white-background .nav-link,
.white-background .card h2,
.white-background .card h3,
.white-background .card h4,
.white-background label,
.white-background .footer { color: #13212d; }

.white-background input,
.white-background select {
  background: rgba(245,249,255,0.6);
  backdrop-filter: blur(12px);
  color: #13212d;
  border-color: rgba(19, 33, 45, 0.15);
}

body.theme-old {
  background: linear-gradient(
    135deg,
    #69C9D0 0%,
    #1a1a2e 50%,
    #EE1D52 100%
  );
  color: #ffffff;
}

body.theme-old::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(105,201,208,.38), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(238,29,82,.32), transparent 35%),
    radial-gradient(circle at 50% 80%, rgba(238,29,82,.28), transparent 40%);
}

body.theme-old .hero,
body.theme-old .card,
body.theme-old .nav-link,
body.theme-old .profile-list li,
body.theme-old .market-item,
body.theme-old .request-list li,
body.theme-old .history-list li {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(26px) saturate(180%);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 0 20px rgba(238,29,82,.15), 0 0 40px rgba(105,201,208,.1), inset 0 1px 0 rgba(255,255,255,0.25);
}

body.theme-old button {
  background: linear-gradient(90deg, #69C9D0, #EE1D52);
  color: white;
}

body.theme-old input,
body.theme-old select {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border-color: rgba(255,255,255,.3);
}

body.theme-old input::placeholder { color: rgba(255,255,255,.5); }
body.theme-old .secondary-link { color: #69C9D0; }
body.theme-old .footer { color: rgba(255,255,255,.6); }
body.theme-old .white-background { background: white !important; }

/* Liquid Glass: прозрачные поверхности поверх исходного градиента */
body:not(.white-background) .hero,
body:not(.white-background) .card,
body:not(.white-background) .modal-content {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.11),
    rgba(255, 255, 255, 0.025) 52%,
    rgba(255, 255, 255, 0.07)
  );
  backdrop-filter: blur(32px) saturate(155%);
  -webkit-backdrop-filter: blur(32px) saturate(155%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

body:not(.white-background) .nav-link,
body:not(.white-background) .hero-badge,
body:not(.white-background) .modal-close,
body:not(.white-background) input,
body:not(.white-background) select,
body:not(.white-background) .stat-card,
body:not(.white-background) .admin-card-mini {
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body:not(.white-background) .nav-link:hover,
body:not(.white-background) .modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

body:not(.white-background) .admin-panel {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(0, 0, 0, 0.07)
  );
}

@supports not (backdrop-filter: blur(1px)) {
  body:not(.white-background) .hero,
  body:not(.white-background) .card,
  body:not(.white-background) .modal-content,
  body:not(.white-background) .nav-link,
  body:not(.white-background) input,
  body:not(.white-background) select {
    background: rgba(26, 26, 46, 0.58);
  }
}
