/* ============================================================
   ganar.win — Login modal (premium dark fintech)
   Scoped with .gw-* prefix to avoid Bootstrap conflicts.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..700&family=Geist:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  --gw-bg-modal: #0F1424;
  --gw-bg-modal-2: #131A2E;
  --gw-neon: #00FFA8;
  --gw-neon-deep: #00B377;
  --gw-neon-soft: rgba(0, 255, 168, 0.14);
  --gw-text: #F2F4F8;
  --gw-text-dim: #7B85A0;
  --gw-text-muted: #4A5169;
  --gw-border: rgba(255, 255, 255, 0.06);
  --gw-border-bright: rgba(0, 255, 168, 0.25);
}

/* Reset/override Bootstrap modal defaults */
#login_box .modal-dialog{
  max-width: 410px;
  margin: 1.75rem auto;
}
#login_box .modal-content{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
#login_box .main-section{
  max-width: 100% !important;
  flex: 0 0 100% !important;
  padding: 0 !important;
}
#login_box .user-img,
#login_box .user-name,
#login_box .form-input,
#login_box .link-part{ display: none !important; }

/* === MODAL CARD === */
.gw-card{
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, var(--gw-bg-modal-2) 0%, var(--gw-bg-modal) 100%);
  border: 1px solid var(--gw-border);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow:
    0 30px 80px -10px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.03),
    inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
  font-family: 'Geist', system-ui, sans-serif;
  color: var(--gw-text);
  text-align: left;
  animation: gwModalIn .5s cubic-bezier(.2,.9,.2,1);
}
@keyframes gwModalIn{
  from{ opacity: 0; transform: translateY(20px) scale(0.96); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

.gw-card::before{
  content:'';
  position:absolute;
  top:-80px; left: 50%;
  transform: translateX(-50%);
  width: 280px; height: 200px;
  background: radial-gradient(ellipse, var(--gw-neon-soft), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.gw-card::after{
  content:'';
  position:absolute; inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.gw-card > *{ position: relative; z-index: 1; }

/* Close button */
.gw-close{
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid var(--gw-border);
  border-radius: 8px;
  color: var(--gw-text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid; place-items: center;
  transition: all .2s ease;
  z-index: 3;
  font-family: 'Geist', sans-serif;
  opacity: 1;
  text-shadow: none;
  padding: 0;
}
.gw-close:hover{
  border-color: var(--gw-neon);
  color: var(--gw-neon);
  background: rgba(0,255,168,0.05);
}

/* Avatar with rotating halo */
.gw-mark-wrap{
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.gw-mark{
  position: relative;
  width: 88px; height: 88px;
  display: grid; place-items: center;
}
.gw-mark::before{
  content:'';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--gw-neon), #14B8E0 25%, #7C5BFF 50%, var(--gw-neon) 75%, var(--gw-neon));
  z-index: 0;
  animation: gwSpin 14s linear infinite;
  filter: blur(0.5px);
}
.gw-mark::after{
  content:'';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gw-bg-modal);
  z-index: 1;
}
@keyframes gwSpin{
  to{ transform: rotate(360deg); }
}
.gw-mark img{
  position: relative;
  z-index: 2;
  width: 78px; height: 78px;
  border-radius: 50%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(0, 255, 168, 0.25));
}

/* Headings */
.gw-title{
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 6px;
  color: var(--gw-text);
}
.gw-title em{
  font-style: italic;
  color: var(--gw-neon);
  font-weight: 400;
}
.gw-subtitle{
  text-align: center;
  font-size: 13px;
  color: var(--gw-text-dim);
  margin: 0 0 28px;
}

/* PHP error message slot */
.gw-card .alert{
  background: rgba(255, 71, 87, 0.08) !important;
  border: 1px solid rgba(255, 71, 87, 0.25) !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font-size: 12px !important;
  color: #FF8B95 !important;
  font-family: 'JetBrains Mono', monospace !important;
  margin-bottom: 14px !important;
  text-align: left !important;
}

/* Form */
.gw-field{ margin-bottom: 12px; }
.gw-input-wrap{ position: relative; }
.gw-input-wrap input{
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--gw-border);
  border-radius: 11px;
  padding: 14px 14px 14px 44px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 14px;
  color: var(--gw-text);
  outline: none;
  transition: all .25s ease;
  box-shadow: none;
  height: auto;
  line-height: normal;
}
.gw-input-wrap input::placeholder{ color: var(--gw-text-muted); }
.gw-input-wrap input:focus{
  border-color: var(--gw-neon);
  background: rgba(0,255,168,0.04);
  box-shadow: 0 0 0 4px rgba(0,255,168,0.08);
  color: var(--gw-text);
}
.gw-input-icon{
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gw-text-muted);
  width: 18px; height: 18px;
  display: grid; place-items: center;
  pointer-events: none;
  transition: color .25s ease;
}
.gw-input-wrap:focus-within .gw-input-icon{ color: var(--gw-neon); }

/* Remember + Forgot row */
.gw-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 22px;
}
.gw-remember{
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--gw-text-dim);
  margin: 0;
}
.gw-remember input[type="checkbox"]{
  display: none !important;
}
.gw-remember .gw-box{
  width: 16px; height: 16px;
  border: 1px solid var(--gw-border);
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
  position: relative;
  flex-shrink: 0;
  transition: all .2s ease;
  display: inline-block;
}
.gw-remember .gw-box::after{
  content:''; position: absolute; inset: 3px;
  background: var(--gw-neon); border-radius: 1px;
  opacity: 0; transform: scale(0.5);
  transition: all .2s ease;
  box-shadow: 0 0 8px var(--gw-neon);
}
.gw-remember input:checked + .gw-box{
  border-color: var(--gw-neon);
  background: rgba(0,255,168,0.08);
}
.gw-remember input:checked + .gw-box::after{ opacity: 1; transform: scale(1); }

.gw-forgot{
  font-size: 12px;
  color: var(--gw-text-dim);
  text-decoration: none !important;
  transition: color .2s ease;
}
.gw-forgot:hover{ color: var(--gw-neon); }

/* Submit */
.gw-submit{
  width: 100%;
  background: linear-gradient(180deg, var(--gw-neon), var(--gw-neon-deep));
  border: none;
  color: #001A0F;
  padding: 14px 22px;
  border-radius: 11px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
  box-shadow:
    0 6px 20px rgba(0,255,168,0.28),
    inset 0 1px 0 rgba(255,255,255,0.3);
  text-transform: none;
}
.gw-submit:hover{
  transform: translateY(-1px);
  box-shadow:
    0 10px 28px rgba(0,255,168,0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
  color: #001A0F;
}
.gw-submit:active{ transform: translateY(0); }
.gw-submit::after{
  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 .6s ease;
}
.gw-submit:hover::after{ left: 100%; }

/* Bottom CTA */
.gw-signup{
  text-align: center;
  font-size: 13px;
  color: var(--gw-text-dim);
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--gw-border);
}
.gw-signup a{
  color: var(--gw-neon);
  text-decoration: none !important;
  font-weight: 500;
  position: relative;
}
.gw-signup a::after{
  content:''; position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--gw-neon);
  transition: width .3s ease;
}
.gw-signup a:hover::after{ width: 100%; }

/* Mobile */
@media (max-width: 480px){
  .gw-card{ padding: 28px 22px 22px; }
  .gw-mark{ width: 76px; height: 76px; }
  .gw-mark img{ width: 68px; height: 68px; }
  .gw-title{ font-size: 22px; }
}
