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

:root {
  --bg: #080812;
  --bg-soft: #10101d;
  --card: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f5f7ff;
  --muted: #b9c0dc;
  --accent: #7c5cff;
  --accent-2: #ff4fd8;
  --accent-3: #49c6ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --header-h: 76px;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 79, 216, 0.14), transparent 26%),
    radial-gradient(circle at bottom center, rgba(73, 198, 255, 0.10), transparent 30%),
    var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* BACKGROUND */
.app-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.6;
  animation: floatOrb 14s ease-in-out infinite;
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.45), transparent 70%);
  top: 5%;
  left: -6%;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 79, 216, 0.30), transparent 70%);
  top: 8%;
  right: -10%;
  animation-delay: 2s;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(73, 198, 255, 0.24), transparent 70%);
  bottom: -2%;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 4s;
}

.grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
  opacity: 0.32;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

/* LAYOUT */
.app-layout {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  flex: 0 0 var(--header-h);
  height: var(--header-h);
  backdrop-filter: blur(18px);
  background: rgba(8, 8, 18, 0.60);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.app-header-inner {
  width: min(100%, 1400px);
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(255,79,216,0.18));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.back-home:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
}

/* MAIN */
.app-main {
  flex: 1;
  min-height: 0;
  padding: 12px;
}

.iframe-wrap {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
}

.iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

/* MOBILE */
@media (max-width: 768px) {
  :root {
    --header-h: 68px;
  }

  .app-header-inner {
    padding: 0 12px;
  }

  .logo {
    font-size: 1.45rem;
  }

  .back-home {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.92rem;
    border-radius: 12px;
  }

  .app-main {
    padding: 8px;
  }

  .iframe-wrap {
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .back-home {
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .logo {
    font-size: 1.28rem;
  }
}