@import url("https://fonts.googleapis.com/css?family=Dancing+Script|Roboto");



*,
*:after,
*:before {
    box-sizing: border-box;
}

:root {
    --primary: #ff4081;
}

body {
    background: rgba(255, 64, 129, 0.8);
    text-align: center;
    font-family: "Roboto", sans-serif;
    overflow-x: hidden;
}

/* ===== Panda ===== */
.panda {
    position: relative;
    width: 200px;
    margin: 50px auto;
}

.face {
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: 100%;
    margin: 50px auto;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    z-index: 50;
    position: relative;
}

.ear {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #000;
    z-index: 5;
    border: 10px solid #fff;
    left: -15px;
    top: -15px;
    border-radius: 100%;
}
.hello{
    margin-bottom: 20px;
}
.ear::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    background: #000;
    z-index: 5;
    border: 10px solid #fff;
    border-radius: 100%;
    left: 125px;
    top: 0;
}

.eye-shade {
    background: #000;
    width: 50px;
    height: 80px;
    margin: 10px;
    position: absolute;
    top: 35px;
    left: 25px;
    transform: rotate(220deg);
    border-radius: 25px / 20px 30px 35px 40px;
}

.eye-shade.rgt {
    transform: rotate(140deg);
    left: 105px;
}

.eye-white {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 100%;
    background: #fff;
    z-index: 500;
    left: 40px;
    top: 80px;
    overflow: hidden;
}

.eye-white.rgt {
    right: 40px;
    left: auto;
}

.eye-ball {
    position: absolute;
    width: 8px;
    height: 8px;
    left: 14px;
    top: 14px;
    max-width: 10px;
    max-height: 10px;
    transition: 0.1s;
}

.eye-ball::after {
    content: "";
    background: #000;
    position: absolute;
    border-radius: 100%;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
}

.nose {
    position: absolute;
    height: 20px;
    width: 35px;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: auto;
    border-radius: 50px 20px / 30px 15px;
    transform: rotate(15deg);
    background: #000;
}

.mouth {
    position: absolute;
    width: 60px;
    height: 30px;
    left: 0;
    right: 0;
    margin: auto;
    bottom: 10px;
    border-radius: 50%;
    border-bottom: 5px solid #000;
    background: transparent;
}

.body {
    background: #fff;
    position: absolute;
    top: 200px;
    left: -20px;
    border-radius: 100px 100px 100px 100px / 126px 126px 96px 96px;
    width: 250px;
    height: 282px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.hand {
    width: 40px;
    height: 30px;
    border-radius: 50px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
    background: #000;
    margin: 5px;
    position: absolute;
    top: 70px;
    left: -25px;
}

.hand::after,
.hand::before {
    content: "";
    position: absolute;
    width: 40px;
    height: 30px;
    border-radius: 50px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
    background: #000;
    left: -5px;
    top: 11px;
}

.hand::before {
    top: 26px;
}

.hand.rgt {
    left: auto;
    right: -25px;
}

.hand.rgt::after,
.hand.rgt::before {
    left: auto;
    right: -5px;
}

.foot {
    margin-top: 35px;
    top: 360px;
    left: -80px;
    position: absolute;
    background: #000;
    z-index: 1400;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
    border-radius: 40px 40px 39px 40px / 26px 26px 63px 63px;
    width: 82px;
    height: 120px;
}

.foot::after {
    content: "";
    width: 55px;
    height: 65px;
    background: #222;
    border-radius: 100%;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    margin: auto;
}

.foot .finger {
    position: absolute;
    width: 25px;
    height: 35px;
    background: #222;
    border-radius: 100%;
    top: 10px;
    right: 5px;
}

.foot .finger::after,
.foot .finger::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 35px;
    background: #222;
    border-radius: 100%;
    top: 0;
    right: 30px;
}

.foot .finger::before {
    right: 55px;
    top: 5px;
}

.foot.rgt {
    left: auto;
    right: -80px;
}

.foot.rgt .finger {
    left: 5px;
    right: auto;
}

.foot.rgt .finger::after {
    left: 30px;
    right: auto;
}

.foot.rgt .finger::before {
    left: 55px;
    right: auto;
}

/* ===== Form ===== */
form {
    max-width: 400px;
    padding: 20px 40px;
    background: #fff;
    height: 300px;
    margin: auto;
    display: block;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
    position: relative;
    transform: translateY(-100px);
    z-index: 500;
    border: 1px solid #eee;
}

form.up {
    transform: translateY(-180px);
}

h1 {
    color: var(--primary);
    font-family: "Dancing Script", cursive;
    margin-bottom: 10px;
}

.btn {
    background: #fff;
    padding: 5px;
    width: 150px;
    height: 35px;
    border: 1px solid var(--primary);
    margin-top: 25px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 50px var(--primary) inset;
    color: #fff;
}

.btn:hover {
    box-shadow: 0 0 var(--primary) inset;
    color: var(--primary);
}

.btn:focus {
    outline: none;
}

.form-group {
    position: relative;
    font-size: 15px;
    color: #666;
}

.form-group+.form-group {
    margin-top: 30px;
}

.form-label {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 5px;
    transition: 0.3s;
}

.form-control {
    width: 100%;
    position: relative;
    z-index: 3;
    height: 35px;
    background: none;
    border: none;
    padding: 5px 0;
    transition: 0.3s;
    border-bottom: 1px solid #777;
    color: #555;
}

.form-control:focus,
.form-control:valid {
    outline: none;
    box-shadow: 0 1px var(--primary);
    border-color: var(--primary);
}

.form-control:focus+.form-label,
.form-control:valid+.form-label {
    font-size: 12px;
    color: var(--primary);
    transform: translateY(-15px);
}

/* alert bubble */
.alert {
    position: absolute;
    color: #f00;
    font-size: 16px;
    right: -180px;
    top: -300px;
    z-index: 200;
    padding: 30px 25px;
    background: #fff;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: 0.4s 0.6s linear;
}

.alert::after,
.alert::before {
    content: "";
    position: absolute;
    width: 25px;
    height: 25px;
    background: #fff;
    left: -19px;
    bottom: -8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

.alert::before {
    width: 15px;
    height: 15px;
    left: -35px;
    bottom: -25px;
}

/* wrong entry animation */
.wrong-entry {
    animation: wrong-log 0.3s;
}

.wrong-entry .alert {
    opacity: 1;
    transform: scale(1);
}

@keyframes wrong-log {

    0%,
    100% {
        left: 50px;
    }

    20%,
    60% {
        left: 20px;
    }

    40%,
    80% {
        left: -20px;
    }
}

.role-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 520px;        /* optional safety cap, still responsive */
  margin: 0 auto;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(135deg, #e0f2fe, #fce7f3);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}

/* Hide radios */
.role-toggle input[type="radio"] {
  display: none;
}

/* Cards */
.role-card {
  position: relative;
  z-index: 2;
  cursor: pointer;
  border-radius: 18px;
  padding: clamp(12px, 2.5vw, 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, filter 0.25s ease;
  user-select: none;
}

.role-card:active {
  transform: scale(0.97);
}

/* Inner content */
.role-content {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.role-card .icon {
  font-size: clamp(22px, 4vw, 5px);
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.role-card .text {
  font-size: clamp(14px, 2.8vw, 18px);
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #1f2937;
}

.role-card .sub {
  font-size: clamp(11px, 2.4vw, 13px);
  font-weight: 700;
  color: rgba(31, 41, 55, 0.65);
}

/* Cute hover animation */
.role-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

/* Slider base */
.role-slider {
  position: absolute;
  inset: 10px;
  width: calc(50% - 10px);
  border-radius: 18px;
  z-index: 1;
  transition: transform 0.45s cubic-bezier(.2, 1.2, .2, 1);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.16);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  overflow: hidden;
}

/* Gradient theme per selection (kid vibe) */
#roleStudent:checked ~ .role-slider {
  background: linear-gradient(135deg, #a5f3fc, #60a5fa);
}

#roleTeacher:checked ~ .role-slider {
  background: linear-gradient(135deg, #fbcfe8, #fb7185);
  transform: translateX(100%);
}

/* Sparkle shine animation inside slider */
.role-slider::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 60%;
  height: 180%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.65) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(20deg);
  animation: shine 2.2s ease-in-out infinite;
  opacity: 0.75;
}

@keyframes shine {
  0% { left: -80%; }
  55% { left: 120%; }
  100% { left: 120%; }
}

/* Active label text becomes bright + bouncy */
#roleStudent:checked + .student .icon,
#roleTeacher:checked + .teacher .icon {
  animation: pop 0.55s cubic-bezier(.2, 1.6, .2, 1);
}

@keyframes pop {
  0% { transform: scale(0.85) rotate(-6deg); }
  60% { transform: scale(1.18) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

#roleStudent:checked + .student .text,
#roleTeacher:checked + .teacher .text {
  color: #0f172a;
  text-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Subtle “wiggle” on inactive side to invite clicks */
#roleStudent:checked ~ label.teacher .icon,
#roleTeacher:checked ~ label.student .icon {
  animation: wiggle 2.6s ease-in-out infinite;
  opacity: 0.9;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}

/* Better spacing on very small screens */
@media (max-width: 360px) {
  .role-toggle { padding: 8px; border-radius: 18px; }
  .role-slider { inset: 8px; border-radius: 14px; }
  .role-card { border-radius: 14px; }
}



.hello{
    margin-top: 0px;
}
.hi{
    margin-top: -10px;
}
.button{
   border-radius: 20px;
}

/* Heading: "School Login Portal" */
.head {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-align: center;
  margin: 0px 0 7px;
  position: relative;
  display: inline-block;

  /* Gradient text */
  background: linear-gradient(90deg, #00c6ff, #7f00ff, #00ffcc, #00c6ff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* Glow */
  text-shadow:
    0 0 10px rgba(0, 198, 255, 0.35),
    0 0 22px rgba(127, 0, 255, 0.25),
    0 0 40px rgba(0, 255, 204, 0.18);

  /* Animations */
  animation:
    gradientMove 3.8s linear infinite,
    floatUpDown 2.6s ease-in-out infinite;
}

/* Shine sweep overlay */
.head::after {
  content: "";
  position: absolute;
  top: -10%;
  left: -120%;
  width: 60%;
  height: 120%;

  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.55) 55%,
    transparent 100%
  );

  transform: skewX(-18deg);
  filter: blur(0.5px);
  opacity: 0.9;

  animation: shineSweep 2.4s ease-in-out infinite;
  pointer-events: none;
}

/* Tiny sparkles (optional but nice) */
.head::before {
  content: "";
  position: absolute;
  inset: -10px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.6) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.4) 0 1.5px, transparent 3px),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.35) 0 1.2px, transparent 3px);
  opacity: 0.55;
  animation: sparkleBlink 1.6s ease-in-out infinite;
  pointer-events: none;
}

/* Animations */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

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

@keyframes shineSweep {
  0% { left: -120%; opacity: 0.0; }
  20% { opacity: 0.9; }
  50% { left: 120%; opacity: 0.9; }
  70% { opacity: 0.0; }
  100% { left: 120%; opacity: 0.0; }
}

@keyframes sparkleBlink {
  0%, 100% { opacity: 0.25; transform: scale(0.98); }
  50% { opacity: 0.7; transform: scale(1.02); }
}

/* Optional: reduce animation for accessibility */
@media (prefers-reduced-motion: reduce) {
  .head,
  .head::before,
  .head::after {
    animation: none !important;
  }
}
/* container spacing */
.form-group {
  width: 100%;
  margin: 14px 0;
}

/* cute input wrapper */
.kid-input {
  position: relative;
  width: 100%;
}

/* icon inside input */
.kid-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(18px, 3.2vw, 22px);
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12));
  opacity: 0.9;
}

/* input base */
.form-control {
  width: 100%;
  padding: clamp(14px, 2.8vw, 16px) clamp(14px, 2.8vw, 16px)
           clamp(14px, 2.8vw, 16px) 46px; /* left padding for icon */
  border-radius: 18px;
  border: 2px solid transparent;
  outline: none;

  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);

  font-size: clamp(14px, 3vw, 16px);
  font-weight: 700;
  color: #0f172a;

  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* placeholder style */
.form-control::placeholder {
  color: rgba(15, 23, 42, 0.45);
  font-weight: 700;
}

/* fun hover */
.form-control:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* focus = glow + bounce */
.form-control:focus {
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow:
    0 18px 36px rgba(59, 130, 246, 0.25),
    0 0 0 5px rgba(59, 130, 246, 0.18);
  transform: translateY(-2px) scale(1.01);
  animation: focusPop 0.45s cubic-bezier(.2, 1.6, .2, 1);
}

@keyframes focusPop {
  0% { transform: translateY(0) scale(0.98); }
  60% { transform: translateY(-3px) scale(1.02); }
  100% { transform: translateY(-2px) scale(1.01); }
}

/* 🔽 THIS controls the gap between username & password */
.form-group.kid-input {
  margin: 4px 0;        /* VERY SMALL GAP */
  padding: 10px 12px;
}

/* container setup */
.kid-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;             /* space between icon & input */
}

/* icon visible */
.kid-input .kid-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* input styling (safe) */
.kid-input .form-control {
  flex: 1;
  min-width: 0;
}

/* ✨ shine animation */
.kid-input::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.55) 45%,
    rgba(255,255,255,0) 70%
  );
  width: 40%;
  left: -50%;
  top: 0;
  opacity: 0;
}

/* shine on focus */
.kid-input:has(.form-control:focus)::after {
  opacity: 0.9;
  animation: shineSlide 1s ease;
}

@keyframes shineSlide {
  0%   { left: -50%; opacity: 0; }
  30%  { opacity: 0.9; }
  100% { left: 120%; opacity: 0; }
}

/* 🎯 icon wiggle on focus */
.kid-input:has(.form-control:focus) .kid-icon {
  animation: iconWiggle 0.6s ease;
}

@keyframes iconWiggle {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15) rotate(-8deg); }
  70%  { transform: scale(1.15) rotate(8deg); }
  100% { transform: scale(1); }
}

/* invalid (required) style */
.form-control:invalid {
  border-color: rgba(244, 63, 94, 0.55);
}

.form-control:invalid:focus {
  box-shadow:
    0 18px 36px rgba(244, 63, 94, 0.22),
    0 0 0 5px rgba(244, 63, 94, 0.16);
}

/* accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .form-control,
  .kid-input::after,
  .kid-icon {
    animation: none !important;
    transition: none !important;
  }
}

.x{
    margin-top:-5px;
   margin-bottom:-20px;
}
.y{
   /* margin-top:-20px;
   margin-bottom:-10px; */
}

.bg{
  /* background image */
  background: url("https://static.vecteezy.com/system/resources/thumbnails/046/307/901/small/wooden-material-board-desk-textured-surface-wood-comic-background-in-cartoon-style-wall-panel-for-game-ui-design-vector.jpg")
    center / cover no-repeat;

  border-width: 0;
  border-radius: 18px;

  /* gentle background movement */
  animation: bgMove 8s ease-in-out infinite,
             borderGlow 3s ease-in-out infinite;

  /* IMPORTANT: no layout change */
  position: relative;
}

/* background slow pan */
@keyframes bgMove{
  0%   { background-position: 50% 50%; }
  50%  { background-position: 55% 45%; }
  100% { background-position: 50% 50%; }
}


/* 🎯 Login Button – half width & centered */
#loginBtn.btn.button{
  width: 55%;                 /* half-ish width */
  margin: 14px auto 0;        /* center horizontally */
  display: flex;
  align-items: center;
  justify-content: center;

  padding: clamp(12px, 2.6vw, 16px);
  border: 0;
  border-radius: 18px;

  font-weight: 900;
  font-size: clamp(15px, 3vw, 18px);
  letter-spacing: 0.3px;

  color: #1f2937;
  background: linear-gradient(135deg, #ffe66d, #ff9ad5, #7ae7ff);
  background-size: 140% 140%;

  box-shadow:
    0 10px 0 rgba(0,0,0,0.12),
    0 18px 28px rgba(0,0,0,0.22);

  cursor: pointer;
  position: relative;
  overflow: hidden;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    background-position 400ms ease;
}

/* ✨ soft glossy highlight */
#loginBtn.btn.button::before{
  content:"";
  position:absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 45%;
  border-radius: 14px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.7),
    rgba(255,255,255,0)
  );
  pointer-events:none;
}

/* ✨ shine sweep */
#loginBtn.btn.button::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-70%;
  width: 55%;
  height: 200%;
  transform: rotate(18deg);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.65) 50%,
    rgba(255,255,255,0) 100%
  );
  opacity: 0;
  pointer-events:none;
}

/* hover – lively but settled */
#loginBtn.btn.button:hover{
  filter: brightness(1.05) saturate(1.1);
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow:
    0 12px 0 rgba(0,0,0,0.12),
    0 22px 34px rgba(0,0,0,0.24),
    0 0 22px rgba(255, 205, 120, 0.45);
}

#loginBtn.btn.button:hover::after{
  opacity: 0.9;
  animation: btnShine 850ms ease;
}

/* press – real button feel */
#loginBtn.btn.button:active{
  transform: translateY(6px);
  box-shadow:
    0 6px 0 rgba(0,0,0,0.12),
    0 14px 18px rgba(0,0,0,0.20);
}

/* shine animation */
@keyframes btnShine{
  0%   { left:-70%; opacity: 0; }
  25%  { opacity: 0.9; }
  100% { left:140%; opacity: 0; }
}

/* 📱 Mobile tweak (still centered) */
@media (max-width: 420px){
  #loginBtn.btn.button{
    width: 70%;   /* slightly bigger for small screens */
  }
}

.z{
    margin-top:0px;
    margin:-20px;
    margin-bottom:-20px;
    
}


/* ===== Animated Gradient Background ===== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  background: linear-gradient(
    135deg,
    #ff7abf,
    #7ad7ff,
    #ffe789,
    #b58cff
  );
  background-size: 300% 300%;
  animation: gradientFlow 12s ease-in-out infinite;
  overflow-x: hidden;
}

/* ✨ Floating soft dots (kid-friendly, subtle) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.45) 0 10px, transparent 11px),
    radial-gradient(circle at 75% 20%, rgba(255,255,255,0.35) 0 14px, transparent 15px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.40) 0 12px, transparent 13px),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,0.30) 0 18px, transparent 19px),
    radial-gradient(circle at 50% 55%, rgba(255,255,255,0.18) 0 160px, transparent 240px);

  opacity: 0.85;
  animation: floatDots 7s ease-in-out infinite;
}

/* 🌈 Soft light waves (adds life, not noisy) */
body::after {
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;

  background: repeating-linear-gradient(
    120deg,
    rgba(255,255,255,0.00) 0 70px,
    rgba(255,255,255,0.10) 70px 120px,
    rgba(255,255,255,0.00) 120px 190px
  );

  opacity: 0.25;
  transform: rotate(10deg);
  animation: lightWave 9s ease-in-out infinite;
}

/* ===== Animations ===== */

@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatDots {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}

@keyframes lightWave {
  0%   { transform: translateX(-2%) rotate(10deg); }
  50%  { transform: translateX(2%) rotate(10deg); }
  100% { transform: translateX(-2%) rotate(10deg); }
}

/* 📱 Mobile tuning (smooth & not heavy) */
@media (max-width: 520px) {
  body {
    animation-duration: 14s;
  }
  body::before {
    opacity: 0.65;
    animation-duration: 9s;
  }
  body::after {
    opacity: 0.20;
    animation-duration: 11s;
  }
}

/* ♿ Accessibility */
@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after {
    animation: none !important;
  }
}
.back{
    background-color: white;
     
}


/* =========================================
   ✅ FINAL Bubble Fix (Desktop no overlap)
   Desktop: right side, BELOW role toggle
   Mobile: on slate (same as before)
   ========================================= */

/* allow bubble to sit outside form */
#loginForm{ overflow: visible !important; }

/* shared bubble base */
#pandaRightBubble.panda-right-bubble{
  position: absolute !important;
  z-index: 9999 !important;

  background: #fff;
  color: #ff0000;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.25;

  padding: 12px 14px;
  border-radius: 999px;

  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  pointer-events: none;

  opacity: 0;
  transform: scale(0.88);
  transform-origin: left center;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* show on wrong-entry */
.wrong-entry #pandaRightBubble{
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* little tail */
#pandaRightBubble.panda-right-bubble::after,
#pandaRightBubble.panda-right-bubble::before{
  content:"";
  position:absolute;
  background:#fff;
  border-radius:50%;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
#pandaRightBubble.panda-right-bubble::after{
  width: 16px; height: 16px;
  left: -10px; bottom: 8px;
}
#pandaRightBubble.panda-right-bubble::before{
  width: 9px; height: 9px;
  left: -22px; bottom: -1px;
}

/* =========================================
   ✅ DESKTOP / LAPTOP
   Keep bubble to right of slate, but NOT on role toggle
   ========================================= */
@media (min-width: 521px){

  #pandaRightBubble.panda-right-bubble{
    /* ✅ move bubble BELOW the Student/Teacher toggle area */
    top: 150px !important;      /* <-- key fix: no overlap with toggle */
    left: calc(100% + 18px) !important;  /* right side of slate */
    right: auto !important;

    /* wrap nicely if message is long */
    max-width: 360px;
    white-space: normal;
  }

  /* Optional: make long message look clean */
  #pandaRightBubble.panda-right-bubble{
    border-radius: 18px;        /* nicer for multi-line */
  }
}

/* =========================================
   ✅ MOBILE (unchanged behavior)
   Bubble appears ON the slate
   ========================================= */
@media (max-width: 520px){
  #pandaRightBubble.panda-right-bubble{
    top: 118px !important;
    left: 12px !important;
    right: 12px !important;
    max-width: none !important;

    border-radius: 18px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    text-align: center !important;
    white-space: normal !important;
  }

  #pandaRightBubble.panda-right-bubble::after,
  #pandaRightBubble.panda-right-bubble::before{
    display:none !important;
  }
}

/* ===========================
   ✅ APPEND THIS AT BOTTOM
   (Right-side bubble + shake)
   =========================== */

/* right-side bubble like original demo */
.panda-right-bubble{
  position: absolute;
  right: -180px;     /* same vibe as your demo */
  top: 55px;         /* near the top of the slate */
  z-index: 999;

  padding: 26px 22px;
  border-radius: 50%;
  background: #fff;
  color: #f00;
  font-size: 16px;
  font-weight: 800;

  box-shadow: 0 3px 5px rgba(0,0,0,0.2);

  opacity: 0;
  transform: scale(0);
  transition: 0.25s ease;
}

/* bubble tail */
.panda-right-bubble::after,
.panda-right-bubble::before{
  content:"";
  position:absolute;
  background:#fff;
  border-radius:50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.panda-right-bubble::after{
  width: 24px; height: 24px;
  left: -18px; bottom: -8px;
}
.panda-right-bubble::before{
  width: 14px; height: 14px;
  left: -34px; bottom: -22px;
}

/* show bubble only during wrong-entry */
.wrong-entry #pandaRightBubble{
  opacity: 1;
  transform: scale(1);
}

/* smooth pop */
.bubble-pop{
  animation: bubblePop 420ms cubic-bezier(.2, 1.6, .2, 1);
}
@keyframes bubblePop{
  0%{ transform: scale(0.7); opacity: 0; }
  100%{ transform: scale(1); opacity: 1; }
}

/* improve shake (your existing wrong-entry already shakes form) */
.wrong-entry{
  animation: wrong-log 0.35s;
}

/* mobile: keep bubble inside screen */
@media (max-width: 520px){
  .panda-right-bubble{
    right: 10px;     /* bring inside screen */
    top: -90px;      /* move above slate */
    border-radius: 18px;
    padding: 12px 14px;
    width: min(250px, 86vw);
    text-align: left;
  }
  .panda-right-bubble::after,
  .panda-right-bubble::before{
    display:none;    /* tail looks weird on mobile */
  }
}

/* =========================================
   ✅ Desktop: single-line bubble + higher position
   ✅ Mobile: keep multi-line on slate (unchanged)
   ========================================= */

#loginForm{ overflow: visible !important; }

@media (min-width: 521px){

  /* bubble box */
  #pandaRightBubble.panda-right-bubble{
    /* ✅ place near top-right of slate */
    top: -50px !important;                 /* was too low */
    left: calc(100% + 16px) !important;   /* right side of slate */
    right: auto !important;

    /* ✅ force single line on big screens */
    white-space: nowrap !important;
    width: max-content !important;        /* auto fit text */
    max-width: 520px !important;          /* safety cap */
    min-width: 220px !important;          /* prevents skinny bubble */

    /* ✅ nice shape */
    border-radius: 999px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
  }
}

/* ✅ On medium screens, allow wrap (2 lines max) if needed */
@media (min-width: 521px) and (max-width: 900px){
  #pandaRightBubble.panda-right-bubble{
    white-space: normal !important;
    width: 320px !important;
    max-width: 360px !important;
    border-radius: 18px !important;
  }
}

/* ✅ Mobile (same behavior: bubble ON slate, wrapping allowed) */
@media (max-width: 520px){
  #pandaRightBubble.panda-right-bubble{
    top: 118px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;

    white-space: normal !important;
    border-radius: 18px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    text-align: center !important;
  }
}