/* =====================================================
   HUOKAING THARA BANK ENTERPRISE DESIGN SYSTEM
   Secure Fintech UI Framework
===================================================== */

/* ---------------------------
   ROOT VARIABLES
--------------------------- */

/* styles.css - Binary Matrix Rain + Hologram Hybrid for Bank Website */
/* Centers content with raining binary code background, no extra HTML needed [web:7] */

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

body {
  font-family: 'Courier New', monospace;
  background: #000;
  color: #0f0;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Binary Matrix Rain Canvas Background - Pure CSS */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0,255,0,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0,255,0,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(0,255,0,0.05) 0%, transparent 50%);
  animation: matrixRain 20s linear infinite;
  z-index: 1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    /* Dense binary columns */
    linear-gradient(90deg, transparent 49%, #0f0 50%, #0f0 51%, transparent 52%),
    linear-gradient(0deg, transparent 33%, #0a0 34%, #0a0 35%, transparent 36%),
    linear-gradient(90deg, transparent 74%, #080 75%, #080 76%, transparent 77%);
  background-size: 100px 4px, 4px 50px, 80px 3px;
  animation: 
    matrixFall 8s linear infinite,
    matrixShift 3s ease-in-out infinite alternate;
  opacity: 0.1;
  z-index: 2;
  pointer-events: none;
}

/* Matrix Rain Animations */
@keyframes matrixRain {
  0% { 
    transform: translateY(0) scaleX(1);
    filter: hue-rotate(0deg) brightness(1);
  }
  25% { filter: hue-rotate(90deg) brightness(1.2); }
  50% { 
    transform: translateY(-20px) scaleX(1.05);
    filter: hue-rotate(180deg) brightness(0.8);
  }
  75% { filter: hue-rotate(270deg) brightness(1.1); }
  100% { 
    transform: translateY(0) scaleX(1);
    filter: hue-rotate(360deg) brightness(1);
  }
}

@keyframes matrixFall {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes matrixShift {
  0% { transform: translateX(0px) skewX(0deg); }
  100% { transform: translateX(20px) skewX(-2deg); }
}

/* Main Bank Container - Hologram on Matrix */
.bank-container {
  position: relative;
  max-width: 420px;
  width: 90vw;
  padding: 50px 35px;
  background: rgba(0, 15, 0, 0.3);
  backdrop-filter: blur(25px) saturate(1.5);
  border: 1px solid rgba(0, 255, 0, 0.4);
  border-radius: 25px;
  text-align: center;
  z-index: 10;
  transform-style: preserve-3d;
  
  /* Matrix + Hologram Fusion */
  box-shadow: 
    0 0 50px rgba(0, 255, 0, 0.4),
    0 0 100px rgba(0, 255, 0, 0.2),
    inset 0 0 30px rgba(0, 255, 0, 0.1),
    0 0 200px rgba(0, 255, 0, 0.1);
  
  animation: 
    matrixFloat 6s ease-in-out infinite,
    matrixPulse 4s ease-in-out infinite;
}

/* Hologram Shimmer + Matrix Glitch */
.bank-container::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg,
    transparent 20%,
    rgba(0,255,0,0.6) 30%,
    rgba(0,200,0,0.8) 50%,
    rgba(0,255,0,0.6) 70%,
    transparent 80%);
  border-radius: 25px;
  z-index: -1;
  mix-blend-mode: screen;
  background-size: 300% 300%;
  animation: 
    matrixShimmer 2.5s linear infinite,
    glitch 0.1s infinite;
  filter: blur(2px);
}

/* Matrix Scanlines */
.bank-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(0,255,0,0.08) 3px,
      rgba(0,255,0,0.08) 5px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(0,255,0,0.06) 3px,
      rgba(0,255,0,0.06) 8px
    );
  border-radius: 25px;
  pointer-events: none;
  animation: matrixScan 2s linear infinite;
}

/* Matrix Animations */
@keyframes matrixFloat {
  0%, 100% { transform: translateY(0) rotateZ(0deg); }
  33% { transform: translateY(-8px) rotateZ(1deg); }
  66% { transform: translateY(-12px) rotateZ(-1deg); }
}

@keyframes matrixPulse {
  0%, 100% { box-shadow: 0 0 50px rgba(0,255,0,0.4), 0 0 100px rgba(0,255,0,0.2); }
  50% { box-shadow: 0 0 70px rgba(0,255,0,0.6), 0 0 150px rgba(0,255,0,0.3); }
}

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

@keyframes matrixScan {
  0% { transform: translateY(-100%) skewY(-1deg); }
  100% { transform: translateY(100%) skewY(1deg); }
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-1px, 1px); }
  20% { transform: translate(1px, -1px); }
  30% { transform: translate(-2px, 0); }
}

/* Binary Typography */
h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  background: linear-gradient(90deg, #0f0, #0ff, #0f0, #080);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 
    0 0 10px #0f0,
    0 0 20px #0f0,
    0 0 40px #0f0;
  animation: binaryFlow 3s linear infinite;
  margin-bottom: 25px;
  font-weight: 700;
  letter-spacing: 2px;
}

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

/* Form Elements - Matrix Style */
input, button {
  width: 100%;
  padding: 15px;
  margin: 12px 0;
  border: 2px solid rgba(0, 255, 0, 0.6);
  border-radius: 12px;
  background: rgba(0, 20, 0, 0.7);
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(15px);
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

input::placeholder {
  color: rgba(0, 255, 0, 0.5);
}

input:focus {
  outline: none;
  border-color: #0ff;
  box-shadow: 
    0 0 25px rgba(0, 255, 0, 0.8),
    inset 0 0 20px rgba(0, 255, 0, 0.2);
  transform: scale(1.02);
}

button {
  background: linear-gradient(45deg, #0f0, #0a0, #080);
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 
    0 10px 30px rgba(0, 255, 0, 0.6),
    0 0 50px rgba(0, 255, 0, 0.4);
}

/* Responsive Matrix */
@media (max-width: 768px) {
  .bank-container {
    width: 95vw;
    padding: 35px 25px;
    margin: 15px;
  }
  
  body {
    padding: 10px;
    align-items: flex-start;
    padding-top: 25px;
  }
}

@media (max-width: 480px) {
  .bank-container {
    padding: 30px 20px;
  }
  
  h1 {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  
  body::after {
    background-size: 60px 3px, 3px 40px, 50px 2px;
  }
}

/* Performance + Accessibility */
.bank-container {
  will-change: transform, box-shadow;
  contain: layout style paint;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Matrix Particles */
body {
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #0f0, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(0,255,0,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #0f0, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(0,255,0,0.6), transparent);
  background-repeat: repeat;
  background-position: 0 0, 0 0, 0 0, 0 0;
  animation: matrixParticles 25s linear infinite;
}

@keyframes matrixParticles {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 100px 100px, 100px 100px, 100px 100px, 100px 100px; }
}
