:root {
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.30);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.magic-bg {
  min-height: 100vh;
  background: #0b1b35 url("../images/main.png") center/cover no-repeat fixed;
  position: relative;
  overflow: hidden;
}

.magic-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,152,0,0.45), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(33,150,243,0.35), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.15), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.05));
  pointer-events: none;
}

.magic-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Shared pill / glass button */
.magic-pill-btn {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.magic-pill-btn:hover {
  background: rgba(255,255,255,0.30);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
}

/* Landing (screenshot-like) */
.landing-topbar {
  padding: 20px 22px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.landing-topbar.split { justify-content: space-between; }

.landing-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* no composes in plain css; duplicate for safety */
.landing-login-btn {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.landing-login-btn:hover {
  background: rgba(255,255,255,0.30);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}

.landing-lang-select {
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  cursor: pointer;
}

.landing-lang-select option {
  color: #111;
}

.landing-topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
}

.landing-topbar-logo .landing-clef { font-size: 1.6rem; }

.landing-topbar-logo .landing-logo-text {
  font-size: 1.35rem;
  text-shadow:
    0 0 12px rgba(255,152,0,0.45),
    0 10px 40px rgba(0,0,0,0.35);
}

.landing-main {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 22px;
  padding: 8px 22px 12px;
}

.landing-hero {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 18px;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}

.landing-clef {
  font-size: 2.2rem;
  color: #fff;
  text-shadow:
    0 0 12px rgba(255,255,255,0.55),
    0 0 22px rgba(255,152,0,0.45),
    0 10px 40px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}

.landing-logo-text {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: #fff;
  letter-spacing: 0.6px;
  text-shadow:
    0 0 12px rgba(255,152,0,0.55),
    0 0 26px rgba(33,150,243,0.35),
    0 12px 45px rgba(0,0,0,0.35);
}

.landing-title {
  font-family: var(--font-heading);
  margin: 16px 0 0;
  color: #fff;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  text-shadow:
    0 0 18px rgba(255,152,0,0.32),
    0 16px 60px rgba(0,0,0,0.38);
}

.landing-character-wrap {
  position: absolute;
  inset: auto 0 0 0;
  height: min(520px, 62vh);
  pointer-events: none;
}

.landing-character {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(460px, 60vw);
  max-height: min(520px, 62vh);
  object-fit: contain;
  filter: drop-shadow(0 30px 55px rgba(0,0,0,0.38));
  animation: floaty 3.6s ease-in-out infinite;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  width: min(1100px, 100%);
  margin: 0 auto;
  transform: scale(0.67);
  transform-origin: bottom center;
}

.landing-card {
  text-decoration: none;
  color: #fff;
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 0;
  outline: none;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 1000;
  letter-spacing: 0.6px;
  font-size: 0.95rem;
  text-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.landing-card-frame {
  width: 100%;
  padding: 6px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255,152,0,0.85), rgba(255,255,255,0.35), rgba(33,150,243,0.70));
  box-shadow:
    0 16px 55px rgba(0,0,0,0.35),
    0 0 30px rgba(255,152,0,0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.landing-card:focus-visible .landing-card-frame,
.landing-card:hover .landing-card-frame {
  transform: translateY(-4px);
  box-shadow:
    0 22px 70px rgba(0,0,0,0.42),
    0 0 40px rgba(255,255,255,0.18);
}

.landing-card-media {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
}

.landing-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.landing-video {
  position: relative;
}

.landing-video-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,152,0,0.25), transparent 40%),
    radial-gradient(circle at 78% 30%, rgba(33,150,243,0.22), transparent 45%),
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(0,0,0,0.18));
}

.landing-video-play {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 42px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.30);
}

.landing-video-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-left: 22px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.28));
}

/* Floating notes */
.magic-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.magic-notes span {
  position: absolute;
  font-size: clamp(18px, 2.2vw, 34px);
  color: rgba(255,255,255,0.55);
  text-shadow: 0 10px 35px rgba(0,0,0,0.35);
  animation: note-float 5.5s ease-in-out infinite;
}

.magic-notes span:nth-child(1) { left: 8%; top: 18%; animation-duration: 6.4s; }
.magic-notes span:nth-child(2) { left: 16%; top: 36%; animation-duration: 5.7s; }
.magic-notes span:nth-child(3) { left: 28%; top: 14%; animation-duration: 7.0s; }
.magic-notes span:nth-child(4) { right: 22%; top: 20%; animation-duration: 6.1s; }
.magic-notes span:nth-child(5) { right: 10%; top: 34%; animation-duration: 5.9s; }
.magic-notes span:nth-child(6) { left: 62%; top: 12%; animation-duration: 6.8s; }
.magic-notes span:nth-child(7) { left: 72%; top: 42%; animation-duration: 5.6s; }
.magic-notes span:nth-child(8) { right: 28%; top: 46%; animation-duration: 6.6s; }

@keyframes note-float {
  0%, 100% { transform: translateY(0) rotate(-6deg); opacity: 0.65; }
  50% { transform: translateY(-14px) rotate(8deg); opacity: 0.95; }
}

.magic-sparkle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.magic-sparkle::before,
.magic-sparkle::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.38), transparent 60%);
  filter: blur(2px);
  animation: floaty 4.6s ease-in-out infinite;
}

.magic-sparkle::before { left: 10%; top: 12%; }
.magic-sparkle::after { right: 8%; bottom: 18%; animation-duration: 5.3s; }

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

/* Login */
.magic-login-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 26px;
}

.magic-login-card {
  width: min(520px, 100%);
  padding: 22px 20px 18px;
  color: #fff;
}

.magic-login-card h1 {
  font-family: var(--font-heading);
  margin: 0 0 8px;
  text-shadow: 0 12px 35px rgba(0,0,0,0.35);
}

.magic-login-card .hint {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
}

.magic-form {
  display: grid;
  gap: 10px;
}

.magic-form .input {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
}

.magic-form .input::placeholder { color: rgba(255,255,255,0.70); }

.magic-form .input:focus {
  box-shadow: 0 0 0 4px rgba(255,152,0,0.18);
  border-color: rgba(255,152,0,0.55);
}

.magic-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.magic-error {
  margin-top: 10px;
  color: rgba(255,255,255,0.92);
  background: rgba(229,57,53,0.20);
  border: 1px solid rgba(229,57,53,0.35);
  padding: 10px 12px;
  border-radius: 14px;
  display: none;
}

@media (max-width: 920px) {
  .landing-main { gap: 16px; }
  .landing-cards { grid-template-columns: 1fr; }
  .landing-cards { transform: none; }
  .landing-character-wrap { height: min(420px, 58vh); }
  .landing-character { width: min(440px, 86vw); }
}
