/*
  ESS Student Portal — Modern UI Theme
  - Gradient animated background
  - Glassmorphism login card
  - Light/Dark theme via CSS variables
*/

html, body {
  height: 100%;
}

:root {
  --bg-from: #6ea8fe;      /* indigo-300 */
  --bg-to: #38d9a9;        /* teal-400 */
  --glass: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.45);
  --text: #1f2a44;
  --muted: #5b6a86;
  --accent: #0d6efd;       /* bootstrap primary */
}

body.theme-dark {
  --bg-from: #0b1020;
  --bg-to: #13314e;
  --glass: rgba(16, 22, 38, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #e6edf7;
  --muted: #9db1c9;
  --accent: #66d9e8;
}

/* Animated gradient background with floating blobs */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: linear-gradient(120deg, var(--bg-from), var(--bg-to));
  background-size: 200% 200%;
  animation: bgShift 15s ease infinite;
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

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

/* Soft blob accents */
body::before,
body::after {
  content: '';
  position: absolute;
  width: 50vmax;
  height: 50vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  z-index: 0;
}
body::before {
  background: #ffd43b; /* yellow */
  top: -20vmax; left: -10vmax;
  animation: float1 20s ease-in-out infinite;
}
body::after {
  background: #845ef7; /* purple */
  bottom: -25vmax; right: -10vmax;
  animation: float2 22s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(5vmax, 3vmax); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(-5vmax, -4vmax); }
}

/* Login card */
.form-signin {
  width: 100%;
  max-width: 440px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.neo-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-radius: 18px;
}

.title-accent {
  color: var(--text);
}

.muted { color: var(--muted); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  border: 0;
  box-shadow: 0 10px 20px rgba(13, 110, 253, 0.3);
}
.btn-primary:hover { filter: brightness(1.05); }

/* Floating utilities dock */
.util-dock .btn { backdrop-filter: blur(6px); }

/* Password toggle button inside floating input */
.toggle-pass {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

/* Card link tiles */
.link-tile {
  transition: transform .15s ease, box-shadow .15s ease;
}
.link-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Digital clock chip */
.clock-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
}
