* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #090014;
  color: white;
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, #ff2fd6, transparent 30%),
    radial-gradient(circle at 80% 20%, #7b3cff, transparent 35%),
    radial-gradient(circle at 50% 100%, #31105f, transparent 45%);
  filter: blur(50px);
  opacity: .8;
  z-index: -1;
}

#loader {
  position: fixed;
  inset: 0;
  background: #090014;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.loader-content {
  text-align: center;
}

.crown {
  font-size: 55px;
  color: #ff4fe3;
  text-shadow: 0 0 25px #ff4fe3;
}

.loader-content h1 {
  font-size: 62px;
  letter-spacing: 12px;
  background: linear-gradient(90deg, #ff4fe3, #875cff);
  -webkit-background-clip: text;
  color: transparent;
}

.loader-content p {
  letter-spacing: 8px;
  color: #c9b8ff;
}

.loader-content span {
  display: block;
  margin: 35px 0 15px;
  color: #ddd;
}

.load-bar {
  width: 500px;
  height: 20px;
  border: 2px solid #7b5cff;
  border-radius: 50px;
  padding: 3px;
}

.load-bar div {
  height: 100%;
  width: 0%;
  border-radius: 50px;
  background: linear-gradient(90deg, #ff3edb, #8f65ff);
  animation: load 2s forwards;
}

@keyframes load {
  to {
    width: 100%;
  }
}

.app {
  height: 100vh;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.top-header {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
}

.logo {
  text-align: center;
  margin-bottom: 20px;
}

.logo div {
  font-size: 34px;
  color: #ff4fe3;
}

.logo h2 {
  margin: 5px 0 0;
  letter-spacing: 4px;
  font-size: 30px;
  background: linear-gradient(90deg, #ff4fe3, #8a5cff);
  -webkit-background-clip: text;
  color: transparent;
}

.logo p {
  font-size: 12px;
  letter-spacing: 4px;
  color: #aaa;
}

.top-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  overflow-x: auto;
}

.tab-btn {
  position: relative;
  border: none;
  background: transparent;
  color: #d8caff;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
  transition: .25s;
}

.tab-btn:hover,
.tab-btn.active {
  background: rgba(255,255,255,.08);
  color: white;
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, #ff9d00, #ff3edb);
  border-radius: 10px;
}

.hidden {
  display: none !important;
}

.login-inline {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-inline input {
  width: 260px;
  padding: 13px;
  border-radius: 12px;
  border: none;
  outline: none;
}

.login-inline button {
  padding: 13px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #d93cff, #7b35db);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#error {
  color: #ff6b9d;
  font-size: 12px;
}

.main {
  flex: 1;
  padding: 35px;
  border-radius: 24px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(15px);
  overflow-y: auto;
}

.search {
  display: flex;
  justify-content: flex-end;
}

.search input {
  width: 300px;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  outline: none;
  background: rgba(255,255,255,.08);
  color: white;
}

.search input::placeholder {
  color: #cfc2ff;
}

.page {
  display: none;
  animation: fade .35s ease;
}

.page.active {
  display: block;
}

.page h1 {
  font-size: 38px;
}

.subtitle {
  color: #b8addd;
  font-size: 17px;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
  margin-top: 32px;
}

.card {
  min-height: 360px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(221,72,255,.35);
  text-align: center;
  transition: .25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 30px rgba(255,60,220,.38);
}

.card img {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 22px;
}

.fallback-icon {
  font-size: 110px;
  margin-bottom: 22px;
}

.card h2 {
  margin: 10px 0;
  font-size: 30px;
}

.card p {
  color: #ff68e8;
  font-size: 27px;
  font-weight: bold;
}

.contact-box {
  max-width: 700px;
  padding: 35px;
  border-radius: 24px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(221,72,255,.35);
  margin-top: 30px;
}

.contact-box h2 {
  font-size: 32px;
}

.contact-box p {
  font-size: 20px;
  color: #ff8eed;
}

.owner-panel {
  position: fixed;
  right: 18px;
  top: 18px;
  width: 360px;
  height: calc(100vh - 36px);
  padding: 26px;
  border-radius: 24px;
  background: rgba(73,10,72,.94);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  z-index: 999;
}

.owner-panel input,
.owner-panel select,
.owner-panel textarea {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  outline: none;
  margin-bottom: 12px;
}

.owner-panel textarea {
  min-height: 90px;
  resize: vertical;
}

.owner-panel button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 12px;
  color: white;
  cursor: pointer;
  background: linear-gradient(90deg, #d93cff, #7b35db);
  font-weight: bold;
}

.close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px !important;
  height: 38px;
  padding: 0 !important;
  border-radius: 12px !important;
}

.line {
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 22px 0;
}

.manage-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.1);
}

.manage-card small {
  color: #cfc2ff;
}

.danger {
  background: linear-gradient(90deg, #b73065, #c23882) !important;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-card {
  width: 740px;
  max-width: 92%;
  min-height: 560px;
  padding: 55px;
  border-radius: 34px;
  background: rgba(25,10,45,.97);
  border: 1px solid rgba(255,255,255,.16);
  text-align: center;
  position: relative;
  animation: modalOpen .25s ease;
  box-shadow: 0 0 50px rgba(180,60,255,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes modalOpen {
  from {
    transform: scale(.9);
    opacity: 0;
  }

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

.modal-card img {
  display: block;
  width: 360px;
  height: 360px;
  object-fit: contain;
  margin-bottom: 28px;
  border-radius: 16px;
}

.modal-card h2 {
  margin: 12px 0;
  font-size: 40px;
}

.modal-card p {
  color: #ff67e4;
  font-size: 25px;
}

.modal-info {
  margin-top: 25px;
  color: #ccc;
  font-size: 20px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  right: 22px;
  top: 22px;
  border: none;
  background: rgba(255,255,255,.08);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 24px;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app {
    height: auto;
  }

  .top-tabs {
    flex-wrap: wrap;
  }

  .main {
    padding: 22px;
  }

  .owner-panel {
    width: calc(100% - 36px);
    left: 18px;
  }

  .loader-content h1 {
    font-size: 36px;
  }

  .load-bar {
    width: 280px;
  }

  .modal-card {
    width: 92%;
    min-height: auto;
    padding: 35px;
  }

  .modal-card img {
    width: 230px;
    height: 230px;
  }
}
