:root{
  --teal-1:#0bb0a8;
  --teal-2:#0a5f73;
  --brand-yellow:#FFD34E;
  --rp-gap-top:24px;
  --rp-tl-x:64px;
  --rp-tl-y:52px;
  --rp-bl-x:52px;
  --rp-bl-y:44px;
  --rp-bg:url("assets/images/university_background.jpg");
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:#fff;
  background:#052f3a;
  overflow:hidden;
}

.container{
  display:flex;
  height:100vh;
  width:100%;
  isolation:isolate;
  position:relative;
}

.left-panel{
  width:100%;
  padding:64px 64px 56px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
  background:
    radial-gradient(1200px 100% at -5% -10%,rgba(255,255,255,.14) 0%,transparent 55%),
    radial-gradient(1200px 90% at 40% 110%,rgba(255,255,255,.10) 0%,transparent 60%),
    linear-gradient(135deg,#11C3C6 0%,#0A8BA0 40%,#083854 100%);
}

.left-panel::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(0,0,0,.14),transparent 22%);
  pointer-events:none;
}

.header{
  display:flex;
  align-items:center;
  gap:14px;
  padding-left:100px;
}

.header-logo{
  width:54px;
  height:auto;
  filter:drop-shadow(0 0 10px rgba(0,255,255,0.6));
}

.header p {
  font-family: 'Open Sauce One', sans-serif;
  font-weight: 800; /* Bold */
  font-size: 15.5px;
  line-height: 1.45;
  letter-spacing: .25px;
  color: #fff;
  text-transform: uppercase;
}


.main-content{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  gap:14px;
  height:100%;
  margin-top:-72px;
  max-width:560px;
  padding-left:100px;
}

.title {
  font-family: 'Lovelo', sans-serif;
  color: #fff;
  font-size: 114px;
  font-weight: 900;
  line-height: .94;
  letter-spacing: -1.8px;
  text-shadow: 0 5px 16px rgba(0,0,0,.18);
  margin: 0;
  padding: 0;
}

.subtitle {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700; /* Bold weight */
  color: #e9fbff;
  font-size: 37.5px;
  line-height: 1.25;
  margin: 6px 0 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
  transform: none;
  margin-left: 0;
  padding-left: 0;
  text-indent: 0;
  display: block;
}


.login-btn {
  align-self: center;
  margin-top: 30px;
  padding: 18px 120px;
  min-width: 450px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFD34E 0%, #FFC83D 100%);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .6px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  box-shadow:
    0 0 0 2px rgba(0,132,146,.65),
    0 0 0 14px rgba(17,197,190,.16),
    0 14px 32px rgba(0,0,0,.22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  overflow: hidden;
}

.login-btn::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.36), transparent 58%);
  pointer-events: none;
}

.login-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.08);
  pointer-events: none;
}

.login-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 0 2px rgba(0,132,146,.75),
    0 0 0 18px rgba(17,197,190,.20),
    0 18px 38px rgba(0,0,0,.26);
  filter: saturate(1.03);
}

.login-btn:active {
  transform: translateY(0) scale(.995);
  box-shadow:
    0 0 0 2px rgba(0,132,146,.7),
    0 0 0 14px rgba(17,197,190,.16),
    0 12px 26px rgba(0,0,0,.22),
    inset 0 4px 0 rgba(0,0,0,.06);
}

.login-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(0,132,146,.8),
    0 0 0 22px rgba(17,197,190,.22),
    0 18px 38px rgba(0,0,0,.26);
}

/* ===== SPINNER STYLING ===== */
.login-btn .spinner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* When loading */
.login-btn.loading .btn-text {
  opacity: 0;
  visibility: hidden; /* 👈 Hides text completely */
  transition: opacity .25s ease, visibility .25s ease;
}

.login-btn.loading .spinner {
  opacity: 1;
  visibility: visible; /* 👈 Shows spinner */
}


.right-panel{
  position:absolute;
  top:var(--rp-gap-top);
  right:0;
  height:93.5%;
  width:48%;
  z-index:3;
  overflow:hidden;
  border-top-left-radius:var(--rp-tl-x) var(--rp-tl-y);
  border-bottom-left-radius:var(--rp-bl-x) var(--rp-bl-y);
  background-image:url("../images/university_background.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-blend-mode:overlay;
  background-color:rgba(0,0,0,0.25);
  border-top-left-radius:100px;
  border-bottom-left-radius:100px;
  box-shadow:-12px 0 32px rgba(0,0,0,0.28);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:48px 36px;
  text-align:center;
}

.rp-logo{
  width:min(360px,68%);
  max-width:200px;
  height:auto;
  display:block;
  filter:drop-shadow(0 18px 32px rgba(0,0,0,.35));
  transform:translateY(-100px);
}

.rp-tagline {
  font-family: 'Blinker', sans-serif;
  font-weight: 400; /* Regular weight */
  margin-top: 22px;
  font-size: 20px;
  letter-spacing: .2px;
  color: #e8fdff;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
  max-width: 520px;
  line-height: 1.35;
  opacity: .95;
  transform: translateY(-100px);
}

.rp-glow{
  position:absolute;
  pointer-events:none;
  border-radius:50%;
  filter:blur(28px);
  opacity:.36;
}

.rp-glow-1{
  width:380px;
  height:380px;
  right:-120px;
  top:-80px;
  background:radial-gradient(circle at 50% 50%,rgba(189, 195, 195, 0.65),transparent 60%);
}

.rp-glow-2{
  width:420px;
  height:420px;
  left:-120px;
  bottom:-140px;
  background:radial-gradient(circle at 50% 50%,rgba(15,157,175,.55),transparent 60%);
}

/* ---------- Base responsive scaling ---------- */
@media(max-width:1200px){
  .title{font-size:96px}
  .subtitle{font-size:24px}
}

@media(max-width:1024px){
  .title{font-size:84px}
  .subtitle{font-size:22px}
  .login-btn{padding:16px 60px}
  .rp-tagline{font-size:18px}
}

@media(max-width:820px){
  .right-panel{
    position:absolute;
    width:100%;
    height:46%;
    right:auto;
    left:0;
    top:0;
    border-radius:0 0 22px 22px;
  }
  .left-panel{
    padding:24px 20px 32px;
  }
  .main-content{
    margin-top:0;
    height:auto;
    padding-top:calc(46vh + 10px);
  }
}

@media(max-width:520px){
  .title{font-size:56px;letter-spacing:-1px}
  .subtitle{font-size:18px}
  .header p{font-size:13px}
  .login-btn{font-size:18px;padding:14px 44px}
  .rp-logo{width:64%}
  .rp-tagline{font-size:16px}
}

/* =========================================================
   ADD-ONS: fluid sizing, extra breakpoints, safe areas
========================================================= */

:root{
  --rp-mobile-h: 46vh;
  --fz-title-min: 40px;
  --fz-title-max: 114px;
  --fz-sub-min: 16px;
  --fz-sub-max: 38px;
}

.left-panel,
.right-panel{
  padding-left:calc(env(safe-area-inset-left,0px)+24px);
  padding-right:calc(env(safe-area-inset-right,0px)+24px);
}

@media(max-height:720px){
  body{overflow:auto;}
  .container{height:auto;min-height:100vh;}
  .main-content{margin-top:0;}
}

.title{font-size:clamp(var(--fz-title-min),8vw,var(--fz-title-max));}
.subtitle{font-size:clamp(var(--fz-sub-min),2.2vw,var(--fz-sub-max));}

@media(min-width:1366px) and (max-width:1600px){
  .main-content{max-width:680px;}
  .subtitle{letter-spacing:.2px;}
}

@media(min-width:1800px){
  .right-panel{width:50%;}
  .title{letter-spacing:-2px;}
}

@media(max-width:900px){
  .header p{font-size:14px;}
  .login-btn{font-size:20px;}
}

@media(max-width:820px){
  :root{--rp-mobile-h:48vh;}
  .right-panel{
    position:absolute;
    width:100%;
    height:var(--rp-mobile-h);
    right:auto;left:0;top:0;
    border-radius:0 0 22px 22px;
    box-shadow:0 8px 24px rgba(0,0,0,.22);
    padding:28px 22px;
  }
  .left-panel{padding:20px 18px 28px;}
  .main-content{
    height:auto;
    margin-top:0;
    padding-top:calc(var(--rp-mobile-h)+12px);
    max-width:92vw;
  }
  .rp-logo{max-width:220px;width:62%;transform:translateY(-12px);}
  .rp-tagline{font-size:17px;transform:translateY(-6px);}
}

@media(max-width:390px){
  .title{font-size:clamp(34px,10vw,48px);}
  .subtitle{font-size:clamp(14px,4vw,16px);}
  .login-btn{font-size:16px;padding:11px 34px;}
}

@media(max-height:540px){
  .right-panel{--rp-mobile-h:42vh;}
  .main-content{padding-top:calc(var(--rp-mobile-h)+8px);}
}

@media(prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
}

.right-panel{
  image-rendering:-webkit-optimize-contrast;
  background-position:center center;
  background-size:cover;
}

.title,.subtitle,.rp-tagline{
  word-wrap:break-word;
  overflow-wrap:anywhere;
}

@media(max-width:680px){
  .header{justify-content:center;}
}

/* =========================================================
   SMOOTH RELOAD ANIMATIONS (added; no removals above)
========================================================= */

:root{
  --ease-smooth: cubic-bezier(.22,.61,.36,1);
  --ease-emph: cubic-bezier(.16,.84,.44,1);
  --a0: .10s;
  --a1: .18s;
  --a2: .28s;
  --a3: .38s;
  --a4: .48s;
  --a5: .58s;
}

/* Keyframes */
@keyframes fadeInSoft{
  from{opacity:0}
  to{opacity:1}
}
@keyframes riseIn{
  from{opacity:0; transform:translateY(14px) scale(.985)}
  to{opacity:1; transform:translateY(0) scale(1)}
}
@keyframes slideInRight{
  from{opacity:0; transform:translateX(28px)}
  to{opacity:1; transform:translateX(0)}
}
@keyframes popIn{
  0%{opacity:0; transform:scale(.98)}
  60%{opacity:1; transform:scale(1.012)}
  100%{opacity:1; transform:scale(1)}
}
@keyframes bgParallaxIn{
  from{background-position: 58% 52%; filter:brightness(.92) saturate(.96)}
  to{background-position: 50% 50%; filter:brightness(1) saturate(1)}
}
@keyframes gentleFloat{
  0%{transform:translateY(0)}
  50%{transform:translateY(-6px)}
  100%{transform:translateY(0)}
}
@keyframes softPulse{
  0%,100%{opacity:.32; filter:blur(28px)}
  50%{opacity:.44; filter:blur(32px)}
}

/* Page/container entrance */
.container{ 
  animation: fadeInSoft .4s var(--ease-smooth) var(--a0) both;
}

/* Left panel lifts in */
.left-panel{
  will-change: transform, opacity;
  animation: riseIn .55s var(--ease-smooth) var(--a0) both;
}

/* Header and text stagger */
.header{ 
  will-change: transform, opacity;
  animation: riseIn .55s var(--ease-smooth) var(--a1) both;
}

.title{
  will-change: transform, opacity;
  animation: riseIn .60s var(--ease-emph) var(--a2) both;
}

.subtitle{
  will-change: transform, opacity;
  animation: riseIn .60s var(--ease-smooth) var(--a3) both;
}

.login-btn{
  will-change: transform, opacity;
  animation: popIn .50s var(--ease-emph) var(--a4) both;
}

/* Right panel slides + gentle background easing */
.right-panel{
  will-change: transform, opacity, background-position, filter;
  animation: slideInRight .65s var(--ease-smooth) var(--a2) both,
             bgParallaxIn 1.2s var(--ease-smooth) var(--a2) both;
}

/* Logo/tagline fade without breaking your existing translateY */
.rp-logo{
  will-change: opacity, transform;
  animation: fadeInSoft .6s var(--ease-smooth) var(--a3) both;
}

.rp-tagline{
  will-change: opacity, transform;
  animation: fadeInSoft .7s var(--ease-smooth) var(--a4) both;
}

/* Very subtle ambient motion on the glows */
.rp-glow-1{
  animation: gentleFloat 6s ease-in-out 1.2s infinite, softPulse 8s ease-in-out .8s infinite;
}
.rp-glow-2{
  animation: gentleFloat 7s ease-in-out 1.6s infinite, softPulse 9s ease-in-out 1.1s infinite;
}

/* Mobile tweaks so the entrance still feels smooth */
@media(max-width:820px){
  .right-panel{
    animation: fadeInSoft .45s var(--ease-smooth) var(--a1) both,
               bgParallaxIn 1.1s var(--ease-smooth) var(--a2) both;
  }
  .rp-logo{ animation-delay: .25s; }
  .rp-tagline{ animation-delay: .35s; }
}

/* =========================================================
   ENHANCED RELOAD ANIMATIONS PLUS
========================================================= */

@keyframes curtainRevealX{
  0%  {transform:translateX(0); opacity:1}
  99% {transform:translateX(100%); opacity:1}
  100%{transform:translateX(100%); opacity:0}
}
@keyframes panelShimmer{
  0%  {opacity:.0; transform:translateX(-8%) skewX(-8deg)}
  60% {opacity:.18; transform:translateX(110%) skewX(-8deg)}
  100%{opacity:0; transform:translateX(120%) skewX(-8deg)}
}
@keyframes glossSweep{
  0%{opacity:0; transform:translateX(60%) skewX(-12deg)}
  20%{opacity:.18}
  60%{opacity:.14}
  100%{opacity:0; transform:translateX(-120%) skewX(-12deg)}
}
@keyframes underlineGrow{
  from{transform:scaleX(0); opacity:0}
  to{transform:scaleX(1); opacity:1}
}
@keyframes btnShine{
  0%{transform:translateX(-140%) skewX(-20deg); opacity:0}
  25%{opacity:.55}
  60%{opacity:.25}
  100%{transform:translateX(160%) skewX(-20deg); opacity:0}
}
@keyframes softBlurIn{
  from{filter:blur(8px) saturate(.96); opacity:0.0}
  to{filter:blur(0) saturate(1); opacity:1}
}

/* 1) Page-wide soft curtain reveal using container ::before */
.container::before{
  content:"";
  position:fixed;
  inset:0;
  background:linear-gradient(90deg, rgba(5,22,28,.9) 0%, rgba(5,22,28,.6) 40%, rgba(5,22,28,0) 100%);
  z-index:999;
  pointer-events:none;
  transform:translateX(0);
  animation: curtainRevealX .85s var(--ease-emph) .05s both;
}

/* 2) Left panel shimmer sweep (non-blocking overlay) */
.left-panel::before{
  content:"";
  position:absolute;
  top:0; bottom:0;
  left:-20%;
  width:40%;
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(255,255,255,.12) 50%,rgba(255,255,255,0) 100%);
  mix-blend-mode:soft-light;
  filter:blur(6px);
  pointer-events:none;
  opacity:0;
  animation: panelShimmer 1.2s var(--ease-smooth) .18s both;
  border-top-right-radius:120px;
  border-bottom-right-radius:120px;
}

/* 3) Right panel glossy diagonal sweep via ::before */
.right-panel::before{
  content:"";
  position:absolute;
  top:-10%; bottom:-10%;
  right:-40%;
  width:70%;
  background:linear-gradient(110deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,.16) 35%,
            rgba(255,255,255,0) 70%);
  filter:blur(10px);
  mix-blend-mode:soft-light;
  pointer-events:none;
  opacity:0;
  transform:translateX(0);
  animation: glossSweep 1.1s var(--ease-smooth) .35s both;
}

/* 4) Title underline reveal (does not change your text color) */
.title{
  position:relative;
}
.title::after{
  content:"";
  position:absolute;
  left:8%;
  right:8%;
  bottom:-10px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,255,255,.0) 0%,rgba(255,255,255,.55) 30%,rgba(255,255,255,.0) 100%);
  transform-origin:left center;
  transform:scaleX(0);
  opacity:0;
  pointer-events:none;
  animation: underlineGrow .6s var(--ease-emph) .42s both;
}

/* Subitle slim underline for cohesion */
.subtitle{
  position:relative;
}
.subtitle::after{
  content:"";
  position:absolute;
  left:22%;
  right:22%;
  bottom:-8px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(233,251,255,.6) 40%,rgba(255,255,255,0) 100%);
  transform:scaleX(0);
  transform-origin:left center;
  opacity:0;
  pointer-events:none;
  animation: underlineGrow .55s var(--ease-smooth) .52s both;
}

/* 5) Button soft blur-in + shine sweep on load */
.login-btn{
  filter:blur(0);
}
.login-btn::after{
  /* keep existing styles and add a background-clip trick through mask */
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 40%, #000 60%, transparent 100%);
          mask: linear-gradient(90deg, transparent 0%, #000 40%, #000 60%, transparent 100%);
  background-origin:border-box;
  animation: btnShine .9s var(--ease-emph) .55s both;
}
.login-btn::marker{}
.login-btn ._shine{}
.login-btn::before{}
.login-btn::selection{}

.login-btn{
  animation: softBlurIn .45s var(--ease-smooth) .40s both;
}
.login-btn span{
  animation: softBlurIn .45s var(--ease-smooth) .45s both;
}

/* 6) Gentle initial clarity of right-panel content */
.right-panel > *{
  animation: softBlurIn .6s var(--ease-smooth) .30s both;
}
.rp-logo{ animation-delay:.35s; }
.rp-tagline{ animation-delay:.45s; }

@media(prefers-reduced-motion:reduce){
  .container::before,
  .left-panel::before,
  .right-panel::before,
  .title::after,
  .subtitle::after{ display:none !important; }
}

/* =========================================================
   EXTRA RESPONSIVE OVERRIDES (ADDED ONLY, NOTHING REMOVED)
   - Fix overflow on small screens
   - Center content better on mobile
   - Avoid button/logos overflowing on narrow viewports
========================================================= */

/* Allow scrolling on tablets & smaller so nothing is cut off */
@media (max-width: 1024px) {
  body{
    overflow-y:auto;
  }
  .container{
    height:auto;
    min-height:100vh;
  }
}

/* Better layout for tablets & mobiles */
@media (max-width: 820px) {
  .header{
    padding-left:0;
    justify-content:center;
    text-align:center;
  }
  .main-content{
    padding-left:0;
    align-items:center;
    text-align:center;
  }
}

/* Tight mobile: avoid button overflow, keep everything readable */
@media (max-width: 520px) {
  .login-btn{
    min-width:0;
    width:100%;
    max-width:340px;
    align-self:center;
  }
  .container{
    align-items:flex-start;
  }
}

/* Ultra small phones */
@media (max-width: 390px) {
  .main-content{
    max-width:96vw;
  }
}

/* Very short landscape screens (e.g. phone rotated) */
@media (max-width: 900px) and (max-height: 540px) {
  body{
    overflow-y:auto;
  }
  .container{
    height:auto;
    min-height:100vh;
  }
  .right-panel{
    position:relative;
    top:0;
    height:auto;
    border-radius:0 0 22px 22px;
  }
  .main-content{
    margin-top:12px;
    padding-top:18px;
  }
}

/* =========================================================
   EXTRA PHONE-FOCUSED LAYOUT OVERRIDES (STACKED VIEW)
========================================================= */

@media (max-width: 600px) {
  html, body{
    height:auto;
  }
  body{
    overflow-y:auto;
  }

  .container{
    flex-direction:column;
    height:auto;
    min-height:100vh;
    padding:0 0 24px;
  }

  /* Right panel as top hero image */
  .right-panel{
    position:relative;
    top:0;
    width:100%;
    height:260px;
    border-radius:0 0 22px 22px;
    box-shadow:0 8px 24px rgba(0,0,0,.35);
    padding:24px 20px;
  }

  .rp-logo{
    transform:translateY(0);
    max-width:60%;
  }

  .rp-tagline{
    transform:translateY(0);
    font-size:15px;
    max-width:90%;
  }

  /* Left panel content below */
  .left-panel{
    position:relative;
    padding:20px 18px 28px;
  }

  .header{
    padding-left:0;
    justify-content:center;
    margin-bottom:8px;
  }

  .main-content{
    margin-top:0;
    padding-top:16px;
    padding-left:0;
    max-width:92vw;
  }

  .title{
    font-size:clamp(32px,9vw,44px);
    letter-spacing:-1px;
  }

  .subtitle{
    font-size:clamp(15px,4.2vw,18px);
  }

  .login-btn{
    width:100%;
    max-width:340px;
    min-width:0;
    padding:12px 24px;
    font-size:18px;
  }
}

/* Super tiny phones */
@media (max-width: 360px) {
  .title{
    font-size:clamp(28px,9.5vw,36px);
  }
  .subtitle{
    font-size:clamp(13px,3.8vw,15px);
  }
  .login-btn{
    font-size:16px;
    padding:10px 20px;
  }
}
