/* === Father Fury Login Screen — Cinematic Style === */

#login-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-family: 'Oswald', monospace;
  touch-action: auto;
  background: radial-gradient(ellipse at center, rgba(20,10,5,0.4) 0%, rgba(0,0,0,0.85) 100%);
  animation: ff-fade-in 0.5s ease-out;
}

@keyframes ff-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#login-overlay .ff-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(30,20,10,0.95) 0%, rgba(15,10,5,0.98) 100%);
  border: 2px solid #c8a030;
  border-radius: 4px;
  padding: 20px 28px 18px;
  width: 340px;
  max-width: 88vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 0 40px rgba(200,150,50,0.25),
    0 0 80px rgba(200,150,50,0.1),
    inset 0 0 20px rgba(0,0,0,0.6);
  text-align: center;
}

/* Corner ornaments */
#login-overlay .ff-card::before,
#login-overlay .ff-card::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid #f5c518;
}
#login-overlay .ff-card::before {
  top: -2px; left: -2px;
  border-right: none; border-bottom: none;
}
#login-overlay .ff-card::after {
  bottom: -2px; right: -2px;
  border-left: none; border-top: none;
}

#login-overlay .ff-corners {
  position: absolute;
  top: -2px; right: -2px;
  width: 24px; height: 24px;
  border-top: 2px solid #f5c518;
  border-right: 2px solid #f5c518;
}
#login-overlay .ff-corners-bl {
  position: absolute;
  bottom: -2px; left: -2px;
  width: 24px; height: 24px;
  border-bottom: 2px solid #f5c518;
  border-left: 2px solid #f5c518;
}

/* Title */
#login-overlay .ff-title {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #f5e090;
  margin: 0;
  letter-spacing: 4px;
  text-shadow:
    0 0 10px rgba(245,224,144,0.6),
    0 0 20px rgba(200,80,20,0.4),
    2px 2px 0 rgba(0,0,0,0.8);
}

#login-overlay .ff-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 20px;
  gap: 8px;
}
#login-overlay .ff-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,150,50,0.6), transparent);
  max-width: 100px;
}
#login-overlay .ff-divider-diamond {
  width: 6px; height: 6px;
  background: #f5c518;
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(245,197,24,0.8);
}

#login-overlay .ff-subtitle {
  color: rgba(245,224,144,0.7);
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: monospace;
}

/* Inputs */
#login-overlay .ff-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(10,5,2,0.85);
  border: 1px solid rgba(200,150,50,0.4);
  border-radius: 2px;
  color: #f5e090;
  font-size: 16px;
  font-family: monospace;
  box-sizing: border-box;
  outline: none;
  touch-action: auto;
  transition: all 0.2s;
  letter-spacing: 1px;
}
#login-overlay .ff-input::placeholder {
  color: rgba(245,224,144,0.35);
  letter-spacing: 1px;
}
#login-overlay .ff-input:focus {
  border-color: #f5c518;
  background: rgba(20,10,5,0.95);
  box-shadow: 0 0 12px rgba(245,197,24,0.3);
}

#login-overlay .ff-error {
  color: #ff6b6b;
  font-size: 12px;
  margin: 4px 0 12px;
  min-height: 18px;
  font-family: monospace;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255,80,80,0.5);
}

/* Main button */
#login-overlay .ff-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid #f5c518;
  border-radius: 2px;
  cursor: pointer;
  background: linear-gradient(180deg, #c8a030 0%, #8b6914 50%, #5d4408 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Oswald', monospace;
  margin-bottom: 14px;
  letter-spacing: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  box-shadow:
    0 4px 0 rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.15s;
  touch-action: auto;
}
#login-overlay .ff-btn:hover {
  background: linear-gradient(180deg, #f5c518 0%, #c8a030 50%, #8b6914 100%);
  box-shadow:
    0 4px 0 rgba(0,0,0,0.4),
    0 0 20px rgba(245,197,24,0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}
#login-overlay .ff-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}

#login-overlay .ff-toggle {
  color: rgba(245,224,144,0.6);
  font-size: 12px;
  margin: 0 0 16px;
  cursor: pointer;
  letter-spacing: 1px;
  font-family: monospace;
}
#login-overlay .ff-toggle span {
  color: #f5c518;
  font-weight: bold;
  text-decoration: underline;
}
#login-overlay .ff-toggle:hover span {
  color: #ffe566;
}

/* Skip button */
#login-overlay .ff-skip {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(245,224,144,0.25);
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  color: rgba(245,224,144,0.6);
  font-size: 12px;
  font-family: monospace;
  letter-spacing: 3px;
  touch-action: auto;
  transition: all 0.15s;
}
#login-overlay .ff-skip:hover {
  border-color: rgba(245,197,24,0.5);
  color: #f5e090;
  background: rgba(245,197,24,0.05);
}

#login-overlay .ff-name-field {
  display: none;
}

/* Landscape mobile — compact layout */
@media (max-height: 500px) {
  #login-overlay .ff-card {
    padding: 14px 22px 12px;
    max-height: 95vh;
  }
  #login-overlay .ff-title { font-size: 22px; letter-spacing: 2px; }
  #login-overlay .ff-divider { margin: 4px 0 10px; }
  #login-overlay .ff-subtitle { margin: 0 0 10px; font-size: 10px; }
  #login-overlay .ff-input { padding: 8px 10px; margin-bottom: 8px; font-size: 15px; }
  #login-overlay .ff-error { margin: 2px 0 8px; font-size: 11px; min-height: 14px; }
  #login-overlay .ff-btn { padding: 10px; font-size: 16px; margin-bottom: 8px; }
  #login-overlay .ff-toggle { margin: 0 0 8px; font-size: 11px; }
  #login-overlay .ff-skip { padding: 8px; font-size: 11px; }
}


/* === Profile Popup === */
#profile-popup {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  font-family: 'Oswald', monospace;
  touch-action: auto;
  background: radial-gradient(ellipse at center, rgba(20,10,5,0.5) 0%, rgba(0,0,0,0.92) 100%);
  animation: ff-fade-in 0.3s ease-out;
}

#profile-popup .pf-card {
  position: relative;
  background: linear-gradient(135deg, rgba(30,20,10,0.96) 0%, rgba(15,10,5,0.99) 100%);
  border: 2px solid #c8a030;
  border-radius: 4px;
  padding: 28px 32px 22px;
  width: 380px;
  max-width: 92vw;
  box-shadow:
    0 0 40px rgba(200,150,50,0.3),
    0 0 80px rgba(200,150,50,0.12),
    inset 0 0 20px rgba(0,0,0,0.6);
  text-align: center;
}

#profile-popup .pf-corners,
#profile-popup .pf-corners-bl,
#profile-popup .pf-corners-tr,
#profile-popup .pf-corners-tl {
  position: absolute;
  width: 24px; height: 24px;
}
#profile-popup .pf-corners-tl { top: -2px; left: -2px; border-top: 2px solid #f5c518; border-left: 2px solid #f5c518; }
#profile-popup .pf-corners-tr { top: -2px; right: -2px; border-top: 2px solid #f5c518; border-right: 2px solid #f5c518; }
#profile-popup .pf-corners-bl { bottom: -2px; left: -2px; border-bottom: 2px solid #f5c518; border-left: 2px solid #f5c518; }
#profile-popup .pf-corners { bottom: -2px; right: -2px; border-bottom: 2px solid #f5c518; border-right: 2px solid #f5c518; }

#profile-popup .pf-avatar {
  width: 90px; height: 90px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8a030 0%, #5d4408 100%);
  border: 3px solid #f5c518;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  box-shadow:
    0 0 20px rgba(245,197,24,0.5),
    inset 0 -4px 8px rgba(0,0,0,0.4);
}

#profile-popup .pf-name {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #f5e090;
  margin: 0 0 2px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(245,224,144,0.5), 2px 2px 0 rgba(0,0,0,0.7);
}

#profile-popup .pf-email {
  color: rgba(245,224,144,0.5);
  font-size: 11px;
  margin: 0 0 18px;
  letter-spacing: 1px;
  font-family: monospace;
}

#profile-popup .pf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
  gap: 8px;
}
#profile-popup .pf-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,150,50,0.6), transparent);
  max-width: 90px;
}
#profile-popup .pf-divider-diamond {
  width: 6px; height: 6px;
  background: #f5c518;
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(245,197,24,0.8);
}

#profile-popup .pf-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

#profile-popup .pf-stat {
  background: linear-gradient(180deg, rgba(20,15,8,0.8) 0%, rgba(10,7,4,0.9) 100%);
  border: 1px solid rgba(200,150,50,0.3);
  border-radius: 2px;
  padding: 10px 8px;
  text-align: center;
  position: relative;
}
#profile-popup .pf-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 2px;
  background: linear-gradient(to right, transparent, #f5c518, transparent);
}

#profile-popup .pf-stat-icon {
  font-size: 18px;
  margin-bottom: 4px;
}
#profile-popup .pf-stat-label {
  color: rgba(245,224,144,0.55);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: monospace;
}
#profile-popup .pf-stat-value {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-top: 2px;
  text-shadow: 0 0 8px currentColor;
}
#profile-popup .pf-stat-hp .pf-stat-value { color: #ff6b6b; }
#profile-popup .pf-stat-en .pf-stat-value { color: #66aaff; }
#profile-popup .pf-stat-lvl .pf-stat-value { color: #4cff4c; }
#profile-popup .pf-stat-kill .pf-stat-value { color: #f39c12; }

/* Buttons */
#profile-popup .pf-btn-logout {
  width: 100%;
  padding: 12px;
  border: 1px solid #c0392b;
  border-radius: 2px;
  cursor: pointer;
  background: linear-gradient(180deg, #c0392b 0%, #7d1f15 50%, #4a1109 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Oswald', monospace;
  margin-bottom: 8px;
  letter-spacing: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  box-shadow: 0 3px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  touch-action: auto;
  transition: all 0.15s;
}
#profile-popup .pf-btn-logout:hover {
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 50%, #7d1f15 100%);
  box-shadow: 0 3px 0 rgba(0,0,0,0.4), 0 0 16px rgba(231,76,60,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
#profile-popup .pf-btn-logout:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.4); }

#profile-popup .pf-btn-close {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(245,224,144,0.25);
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  color: rgba(245,224,144,0.6);
  font-size: 12px;
  font-family: monospace;
  letter-spacing: 3px;
  touch-action: auto;
  transition: all 0.15s;
}
#profile-popup .pf-btn-close:hover {
  border-color: rgba(245,197,24,0.5);
  color: #f5e090;
  background: rgba(245,197,24,0.05);
}
