/* Modern Cyber-Neon Design System for School Login Screen */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #050b14;
  --bg-card: rgba(10, 18, 30, 0.7);
  --border-card: rgba(0, 240, 255, 0.15);
  --color-text-main: #ffffff;
  --color-text-muted: #8a99ad;
  --accent-cyan: #00f0ff;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --input-bg: rgba(255, 255, 255, 0.03);
  --input-border: rgba(255, 255, 255, 0.08);
  --input-border-focus: rgba(0, 240, 255, 0.5);
  --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.5);
  --glow-blue: 0 0 15px rgba(59, 130, 246, 0.5);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--color-text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Background Grids and Glows */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.25) 0%, transparent 70%);
  top: -150px;
  left: -150px;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
  bottom: -50px;
  right: -50px;
}

/* Top Cyber Header */
.cyber-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: center;
  z-index: 10;
}

.cyber-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(10, 18, 30, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.brand-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--color-text-main);
  text-transform: uppercase;
}

/* Main Split Layout Wrapper */
.auth-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* Left Side: 3D Holographic Scene Container */
.scene-container {
  flex: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.scene-viewport {
  position: relative;
  width: 500px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  transform-style: preserve-3d;
}

/* Hologram concentric rings pedestal */
.hologram-pedestal {
  position: absolute;
  bottom: 50px;
  left: 50%;
  width: 380px;
  height: 380px;
  transform: translateX(-50%) rotateX(75deg);
  transform-style: preserve-3d;
  pointer-events: none;
}

.hologram-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

.ring-1 {
  width: 340px;
  height: 340px;
  border: 2px dashed rgba(0, 240, 255, 0.25);
  animation: rotateCW 20s linear infinite;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.ring-2 {
  width: 270px;
  height: 270px;
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-width: 4px 1px;
  animation: rotateCCW 15s linear infinite;
}

.ring-3 {
  width: 190px;
  height: 190px;
  border: 2px dashed rgba(0, 240, 255, 0.55);
  animation: rotateCW 10s linear infinite;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.hologram-light-cone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 300px;
  background: linear-gradient(to top, rgba(0, 240, 255, 0.28) 0%, rgba(59, 130, 246, 0.1) 40%, transparent 100%);
  transform: translate(-50%, -50%) rotateX(-75deg) translateY(-150px);
  transform-origin: bottom center;
  clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
  filter: blur(4px);
  animation: beamPulse 4s ease-in-out infinite;
}

/* Floating 3D Rubik's Cube */
.cube-wrapper {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  animation: cubeFloat 6s ease-in-out infinite;
}

.cube-3d {
  width: 180px;
  height: 180px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(45deg);
  animation: cubeRotate 30s linear infinite;
}

.cube-face {
  position: absolute;
  width: 180px;
  height: 180px;
  background: rgba(5, 11, 20, 0.95);
  border: 2px solid rgba(0, 240, 255, 0.4);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  padding: 5px;
  backface-visibility: visible;
}

/* Positioning each cube face in 3D space */
.face-front  { transform: rotateY(0deg) translateZ(90px); }
.face-back   { transform: rotateY(180deg) translateZ(90px); }
.face-left   { transform: rotateY(-90deg) translateZ(90px); }
.face-right  { transform: rotateY(90deg) translateZ(90px); }
.face-top    { transform: rotateX(90deg) translateZ(90px); }
.face-bottom { transform: rotateX(-90deg) translateZ(90px); }

/* Cubelets grid items */
.cubelet {
  background: rgba(16, 28, 48, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 4px;
  transition: all 0.3s;
}

.cubelet.active {
  background: rgba(59, 130, 246, 0.6);
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: inset 0 0 8px rgba(59, 130, 246, 0.4);
}

.cubelet.active-glow {
  background: rgba(0, 240, 255, 0.85);
  border-color: #00f0ff;
  box-shadow: 
    0 0 15px rgba(0, 240, 255, 0.8),
    inset 0 0 6px rgba(255, 255, 255, 0.9);
}

/* Floating micro-particle cubes */
.particle-cube {
  position: absolute;
  transform-style: preserve-3d;
  pointer-events: none;
}

.pc-1 {
  top: 15%;
  left: 20%;
  animation: floatOrbit1 12s ease-in-out infinite;
}

.pc-2 {
  bottom: 25%;
  right: 15%;
  animation: floatOrbit2 16s ease-in-out infinite;
}

.pc-3 {
  top: 30%;
  right: 25%;
  animation: floatOrbit3 10s ease-in-out infinite;
}

.mini-cube {
  width: 18px;
  height: 18px;
  transform-style: preserve-3d;
  animation: spinCube 6s linear infinite;
}

.m-face {
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(0, 240, 255, 0.7);
  border: 1px solid #ffffff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}

.m-front  { transform: rotateY(0deg) translateZ(9px); }
.m-back   { transform: rotateY(180deg) translateZ(9px); }
.m-left   { transform: rotateY(-90deg) translateZ(9px); }
.m-right  { transform: rotateY(90deg) translateZ(9px); }
.m-top    { transform: rotateX(90deg) translateZ(9px); }
.m-bottom { transform: rotateX(-90deg) translateZ(9px); }

/* Right Side: Login Panel Card */
.login-container {
  flex: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-glass-card {
  width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 45px;
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  z-index: 5;
  animation: cardFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
  margin-bottom: 35px;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 500;
  color: var(--color-text-main);
  letter-spacing: 0.5px;
}

/* Custom form components styling */
.form-group-custom {
  margin-bottom: 24px;
  position: relative;
}

.input-label {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-label i {
  color: var(--accent-cyan);
  font-size: 14px;
}

.input-wrapper {
  position: relative;
}

.form-control-custom {
  width: 100%;
  height: 46px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--color-text-main);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
}

.form-control-custom:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  background: rgba(0, 240, 255, 0.02);
}

.form-control-custom::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.error-msg {
  display: block;
  color: #ff4b4b;
  font-size: 12px;
  margin-top: 6px;
  padding-left: 2px;
}

/* Forgot Restoration Header & Alert */
.forgot-header {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

.forgot-header h4 {
  color: var(--color-text-main);
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.forgot-header h4 i {
  color: var(--accent-cyan);
}

.alert-msg {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
}

.alert-msg.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Checkbox and link settings */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 13px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 16px;
  width: 16px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--accent-cyan);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #050b14;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.checkbox-container:hover .checkbox-label {
  color: var(--color-text-main);
}

.forgot-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--accent-cyan);
}

/* Electric cyber button style */
.btn-cyber-submit {
  width: 100%;
  height: 48px;
  background: var(--accent-blue);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cyber-submit:hover {
  background: var(--accent-blue-hover);
  box-shadow: var(--glow-blue);
  transform: translateY(-1px);
}

.btn-cyber-submit:active {
  transform: translateY(1px);
}

/* Card footer brand */
.card-footer-brand {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.card-footer-brand:hover {
  opacity: 0.7;
}

.footer-logo {
  height: 18px;
  width: auto;
  filter: grayscale(1) brightness(1.5);
}

.footer-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Keyframe Animations */
@keyframes rotateCW {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateCCW {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes beamPulse {
  0%, 100% {
    opacity: 0.7;
    height: 300px;
  }
  50% {
    opacity: 0.9;
    height: 320px;
  }
}

@keyframes cubeFloat {
  0%, 100% {
    transform: translate(-50%, -46%);
  }
  50% {
    transform: translate(-50%, -54%);
  }
}

@keyframes cubeRotate {
  0% {
    transform: rotateX(-20deg) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(-20deg) rotateY(360deg) rotateZ(360deg);
  }
}

@keyframes spinCube {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes floatOrbit1 {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-30px, 40px, 60px) scale(1.15);
  }
}

@keyframes floatOrbit2 {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(40px, -30px, -40px) scale(0.9);
  }
}

@keyframes floatOrbit3 {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, -40px, 50px) scale(1.1);
  }
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styling */
@media (max-width: 991px) {
  .auth-wrapper {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 40px;
  }

  .scene-container {
    flex: none;
    height: 380px;
    width: 100%;
    margin-bottom: 20px;
  }

  .scene-viewport {
    width: 320px;
    height: 320px;
  }

  .hologram-pedestal {
    width: 260px;
    height: 260px;
    bottom: 20px;
  }

  .ring-1 { width: 240px; height: 240px; }
  .ring-2 { width: 190px; height: 190px; }
  .ring-3 { width: 130px; height: 130px; }
  .hologram-light-cone {
    width: 150px;
    height: 200px;
    transform: translate(-50%, -50%) rotateX(-75deg) translateY(-100px);
  }

  .cube-wrapper {
    width: 120px;
    height: 120px;
    top: 40%;
  }

  .cube-3d {
    width: 120px;
    height: 120px;
  }

  .cube-face {
    width: 120px;
    height: 120px;
    gap: 3px;
    padding: 3px;
  }

  .face-front  { transform: rotateY(0deg) translateZ(60px); }
  .face-back   { transform: rotateY(180deg) translateZ(60px); }
  .face-left   { transform: rotateY(-90deg) translateZ(60px); }
  .face-right  { transform: rotateY(90deg) translateZ(60px); }
  .face-top    { transform: rotateX(90deg) translateZ(60px); }
  .face-bottom { transform: rotateX(-90deg) translateZ(60px); }

  .login-container {
    flex: none;
    width: 100%;
    padding: 0;
  }

  .login-glass-card {
    width: 100%;
    max-width: 420px;
    padding: 35px 25px;
  }
}

@media (max-width: 480px) {
  .scene-container {
    display: none; /* Hide interactive 3D elements on very small mobile screens for accessibility & clarity */
  }
  
  .cyber-header {
    padding: 15px;
  }

  .cyber-header .brand {
    padding: 8px 16px;
  }

  .brand-name {
    font-size: 12px;
  }
}

/* Chrome/Safari Browser Autofill overrides for Login Page */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
.form-control-custom:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0a121e inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s !important;
  color: #ffffff !important;
}