/**
 * SIPOIN — "The Sleek Split" (Magic v9)
 * Dual-Panel modern authentication design system.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --sipoin-p1: #4f46e5;
  --sipoin-p2: #7c3aed;
  --sipoin-dark: #0f172a;
  --sipoin-accent: #f43f5e;
  --sipoin-card: rgba(255, 255, 255, 0.95);
  --sipoin-glass: rgba(255, 255, 255, 0.15);
  --sipoin-border: rgba(255, 255, 255, 0.3);
  --sipoin-radius: 28px;
  --sipoin-muted: #64748b;
  --sipoin-ink: #1e293b;
  --sipoin-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
}

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

body.sipoin-public {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f4f8; /* Light, Clean Background */
  background: radial-gradient(circle at top right, #fcfdff, #e2e8f0);
  overflow-x: hidden;
  padding: 20px;
}

/* Magic v10: Digital Rain Particle System */
#v10-rain-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.particle-v10 {
  position: absolute;
  color: rgba(79, 70, 229, 0.6); /* Base opacity at 60% */
  font-family: 'Outfit', 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
  user-select: none;
  will-change: transform, opacity;
  transition: opacity 1s ease-in-out;
}

.particle-v10.glow {
  color: rgba(124, 58, 237, 0.3);
  text-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}
@keyframes move {
  from { transform: translate(0,0); }
  to { transform: translate(100px, 100px); }
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 920px;
}

.login-master-card {
  display: flex;
  background: var(--sipoin-card);
  border-radius: var(--sipoin-radius);
  overflow: hidden;
  box-shadow: var(--sipoin-shadow);
  border: 1px solid var(--sipoin-border);
  min-height: 580px;
}

/* Left: Brand Panel */
.brand-panel {
  flex: 1;
  background: linear-gradient(135deg, var(--sipoin-p1), var(--sipoin-p2));
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.brand-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.logo-v9 {
  width: 110px;
  height: 110px;
  background: white;
  padding: 15px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  margin-bottom: 2rem;
  z-index: 2;
  object-fit: contain;
}

.brand-title-v9 {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 0.5rem;
  z-index: 2;
}

.brand-subtitle-v9 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}

/* Right: Form Panel */
.form-panel {
  flex: 1.2;
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

.form-header-v9 {
  margin-bottom: 2.5rem;
}

.form-header-v9 h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  color: var(--sipoin-dark);
  margin-bottom: 0.5rem;
}

.form-header-v9 p {
  color: var(--sipoin-muted);
  font-size: 1rem;
}

.login-form-v9 {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.group-v9 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.group-v9 label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  padding-left: 4px;
}

.input-wrapper-v9 {
  position: relative;
}

.control-v9 {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1rem;
  transition: all 0.25s ease;
  color: var(--sipoin-ink);
  background: #f8fafc;
}

.control-v9:focus {
  outline: none;
  border-color: var(--sipoin-p1);
  background: white;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.icon-v9 {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  transition: color 0.3s ease;
}

.control-v9:focus + .icon-v9 {
  color: var(--sipoin-p1);
}

.btn-v9 {
  background: var(--sipoin-dark);
  color: white;
  padding: 18px;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-v9:hover {
  background: var(--sipoin-p1);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.4);
}

.btn-v9:active { transform: translateY(0); }

.btn-v9:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#cf-turnstile-v9 {
  margin: 0.5rem 0;
  display: flex;
  justify-content: center;
}

/* RPG HP BAR: Remaining Attempts (Magic v19) */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.rpg-hp-container {
    width: 280px;
    margin: 0 auto 2.5rem;
    background: #111;
    border: 4px solid #333;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    padding: 6px;
    image-rendering: pixelated;
    font-family: 'Press Start 2P', cursive;
}

.rpg-hp-label {
    color: #fff;
    font-size: 10px;
    margin-bottom: 8px;
    text-align: left;
    display: flex;
    justify-content: space-between;
}

.rpg-hp-track {
    height: 16px;
    background: #333;
    border: 2px solid #000;
    position: relative;
    overflow: hidden;
}

.rpg-hp-fill {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Severity Colors for RPG Bar */
.rpg-hp-fill.hp-info { background: #22c55e; box-shadow: inset 0 -4px 0 #166534; }
.rpg-hp-fill.hp-warning { background: #f59e0b; box-shadow: inset 0 -4px 0 #92400e; }
.rpg-hp-fill.hp-danger { 
    background: #ef4444; 
    box-shadow: inset 0 -4px 0 #991b1b;
    animation: hp-critical-flash 0.5s infinite;
}

@keyframes hp-critical-flash {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
    100% { filter: brightness(1); }
}

/* Magic v29: Compact & Professional Layout Spacing */
.rpg-number-display {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    color: #e11d48;
    font-size: 3.5rem;
    margin-bottom: 0.25rem; /* Tight group with bar */
    line-height: 1;
    letter-spacing: -0.05em;
}

.rpg-hp-container {
    width: 380px; 
    margin: 0 auto 2.5rem; 
    background: #111;
    border: 4px solid #333;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    padding: 6px;
    image-rendering: pixelated;
    font-family: 'Press Start 2P', cursive;
}

.rpg-hp-track {
    height: 32px; 
    background: #333;
    border: 4px solid #000;
    position: relative;
    overflow: hidden;
}

.system-alert-v21 {
    width: 100%;
    background: #7f1d1d; 
    border: 4px solid #ef4444; 
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    padding: 20px;
    margin-bottom: 2.5rem; /* Consistent spacing */
    text-align: center;
    line-height: 2;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4);
}

.critical-label {
    display: block;
    font-size: 18px; 
    color: #fca5a5;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0 #000;
}

/* Magic v28: The Crimson Archive (Red Alert Refined) */
body.red-alert-mode {
    background: #f8fafc !important; 
    background: radial-gradient(circle at top right, #fff, #f1f5f9) !important;
}

body.red-alert-mode .brand-panel {
    background: linear-gradient(135deg, #f43f5e, #be123c) !important; 
}

body.red-alert-mode .login-master-card {
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.1);
}

.btn-green-v27 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981, #059669); 
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px -10px rgba(16, 185, 129, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-green-v27:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -10px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #34d399, #10b981);
}

.footer-v9 {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8; 
}

@keyframes alert-border-blink {
    from { border-color: #ef4444; transform: scale(1); }
    to { border-color: #fca5a5; transform: scale(1.03); }
}

/* MOBILE RESPONSIVE (Portrait) */
@media (max-width: 768px) {
  .login-master-card {
    flex-direction: column;
    min-height: auto;
    max-width: 440px;
  }
  .brand-panel { padding: 3rem 2rem; }
  .brand-title-v9 { font-size: 2.5rem; }
  .form-panel { padding: 2.5rem 2rem; }
}
