/* ==========================================================================
   FLAME TECH — VIP KEY AUTHENTICATION SYSTEM STYLES
   Cyberpunk / Red Neon High-Tech Design
   ========================================================================== */

:root {
  --ft-key-red: #e8001e;
  --ft-key-red-glow: rgba(232, 0, 30, 0.45);
  --ft-key-red-subtle: rgba(232, 0, 30, 0.12);
  --ft-key-bg-modal: rgba(11, 11, 16, 0.94);
  --ft-key-border: rgba(232, 0, 30, 0.3);
  --ft-key-text: #f5f6fb;
  --ft-key-muted: #8e95ab;
  --ft-key-green: #00e676;
  --ft-key-green-glow: rgba(0, 230, 118, 0.35);
}

/* Allow text selection & pointer in key inputs despite parent restrictions */
.ft-key-modal,
.ft-key-modal *,
.ft-allow-select {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

/* ==========================================================================
   MODAL OVERLAY & BACKDROP
   ========================================================================== */
.ft-key-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(232, 0, 30, 0.18), transparent 70%),
              rgba(4, 4, 7, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.ft-key-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* When overlay locks the whole app */
body.ft-vip-locked #app,
body.ft-vip-locked .hub {
  filter: blur(12px) brightness(0.4) saturate(0.5);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.4s ease;
}

/* ==========================================================================
   MODAL DIALOG CONTAINER
   ========================================================================== */
.ft-key-modal {
  position: relative;
  width: min(100%, 460px);
  background: var(--ft-key-bg-modal);
  border: 1px solid var(--ft-key-border);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8),
              0 0 35px var(--ft-key-red-glow),
              inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-height: 94vh;
  overflow-y: auto;
}

.ft-key-overlay.active .ft-key-modal {
  transform: translateY(0) scale(1);
}

/* Decorative tech elements */
.ft-key-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff3d55, var(--ft-key-red), transparent);
  box-shadow: 0 0 12px var(--ft-key-red);
}

.ft-key-modal::after {
  content: "SECURITY PROTOCOL // 256-BIT";
  position: absolute;
  top: 8px;
  right: 16px;
  font-family: monospace;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.25);
}

/* Close button */
.ft-key-close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ft-key-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.ft-key-close-btn:hover {
  background: rgba(232, 0, 30, 0.2);
  color: #fff;
  border-color: var(--ft-key-red);
}

/* Header */
.ft-key-header {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.ft-key-badge-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, #ff3d55, #9b0014);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--ft-key-red-glow), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  position: relative;
}

.ft-key-badge-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.ft-key-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
}

.ft-key-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ft-key-muted);
  line-height: 1.4;
}

/* HWID Information Box */
.ft-hwid-box {
  background: rgba(18, 18, 26, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ft-hwid-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ft-key-muted);
  margin-bottom: 2px;
}

.ft-hwid-value {
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #ff8595;
  letter-spacing: 0.8px;
  word-break: break-all;
}

.ft-hwid-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ft-hwid-copy-btn:hover {
  background: var(--ft-key-red-subtle);
  border-color: var(--ft-key-red);
  color: #ff7083;
}

/* Key Input Group */
.ft-key-field-group {
  margin-bottom: 16px;
}

.ft-key-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ft-key-muted);
  margin-bottom: 8px;
}

.ft-key-field-label span.req {
  color: var(--ft-key-red);
}

.ft-key-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ft-key-input {
  width: 100%;
  height: 48px;
  background: rgba(16, 16, 24, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0 85px 0 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ft-key-input:focus {
  border-color: var(--ft-key-red);
  box-shadow: 0 0 16px var(--ft-key-red-glow), inset 0 0 8px rgba(232, 0, 30, 0.2);
}

.ft-key-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.5px;
  font-size: 12px;
  font-weight: 400;
}

.ft-key-input-actions {
  position: absolute;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ft-key-paste-btn,
.ft-key-clear-btn {
  height: 34px;
  padding: 0 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.ft-key-paste-btn:hover {
  background: rgba(232, 0, 30, 0.25);
  border-color: var(--ft-key-red);
  color: #ff91a0;
}

.ft-key-clear-btn {
  width: 32px;
  padding: 0;
  color: var(--ft-key-muted);
}

.ft-key-clear-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Alert / Status Banner */
.ft-key-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 16px;
  display: none;
  animation: ftShake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.ft-key-alert.active {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ft-key-alert.error {
  background: rgba(232, 0, 30, 0.15);
  border: 1px solid rgba(232, 0, 30, 0.4);
  color: #ff8595;
}

.ft-key-alert.success {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #69f0ae;
}

.ft-key-alert.info {
  background: rgba(33, 150, 243, 0.15);
  border: 1px solid rgba(33, 150, 243, 0.4);
  color: #90caf9;
}

/* Activate Button */
.ft-key-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #ff1738 0%, #b30017 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--ft-key-red-glow);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.ft-key-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(255, 23, 56, 0.6);
  filter: brightness(1.08);
}

.ft-key-submit-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.ft-key-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.ft-key-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ftSpin 0.7s linear infinite;
  display: none;
}

.ft-key-submit-btn.loading .ft-key-spinner {
  display: block;
}

.ft-key-submit-btn.loading .ft-key-btn-text {
  display: none;
}

/* Secondary Support Row */
.ft-key-footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.ft-key-footer-link {
  color: var(--ft-key-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
  cursor: pointer;
}

.ft-key-footer-link:hover {
  color: #ff8595;
}

.ft-key-server-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: monospace;
  font-size: 10px;
  color: var(--ft-key-muted);
}

.ft-server-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ft-key-green);
  box-shadow: 0 0 6px var(--ft-key-green);
}

/* ==========================================================================
   VIP TOPBAR BADGE & STATUS PILL
   ========================================================================== */
.ft-vip-key-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
  background: rgba(232, 0, 30, 0.15);
  border: 1px solid rgba(232, 0, 30, 0.35);
  color: #ff8595;
  box-shadow: 0 0 10px rgba(232, 0, 30, 0.2);
}

.ft-vip-key-badge:hover {
  background: rgba(232, 0, 30, 0.28);
  border-color: var(--ft-key-red);
  transform: translateY(-1px);
}

.ft-vip-key-badge.active {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.35);
  color: #69f0ae;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.ft-vip-key-badge.expired {
  background: rgba(255, 152, 0, 0.15);
  border-color: rgba(255, 152, 0, 0.4);
  color: #ffb74d;
}

.ft-vip-key-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* ==========================================================================
   KEY DETAIL DRAWER / DIALOG (View current license info)
   ========================================================================== */
.ft-license-card {
  background: rgba(22, 22, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.ft-license-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.ft-license-row:last-child {
  border-bottom: none;
}

.ft-license-label {
  color: var(--ft-key-muted);
}

.ft-license-value {
  font-weight: 700;
  color: #fff;
  font-family: Consolas, monospace;
}

.ft-license-value.success {
  color: #00e676;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.ft-key-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid var(--ft-key-red);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--ft-key-red-glow);
  border-radius: 10px;
  padding: 10px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ft-key-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes ftSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ftShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
