/* Giang Hồ Chi Chiến / Võ Lâm Sinh Tồn — Account & LAN Styles */

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 36, 27, 0.95), rgba(12, 22, 17, 0.95));
  border: 1px solid #7d8f6d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  color: #e5ded0;
}

.account-bar.not-logged-in {
  border-color: #c9823b;
  background: linear-gradient(135deg, rgba(38, 26, 16, 0.95), rgba(22, 14, 9, 0.95));
}

.acc-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.acc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #1b4d32;
  color: #7df0a8;
  border: 1px solid #367c55;
}

.acc-badge.warn {
  background: #522718;
  color: #f7a26d;
  border-color: #8c4224;
}

.acc-user b, .acc-char b {
  color: #f3d48d;
}

.acc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.acc-btn {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #738466;
  background: #25382b;
  color: #e3ddce;
  transition: all 0.15s ease;
}

.acc-btn:hover {
  background: #37533f;
  border-color: #a3b890;
  color: #fff;
}

.acc-btn.primary {
  background: #8b682b;
  border-color: #e0b45c;
  color: #fff5df;
  box-shadow: 0 0 8px rgba(224, 180, 92, 0.3);
}

.acc-btn.primary:hover {
  background: #a98036;
  border-color: #ffd67d;
}

/* Modal Dialog */
.acc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.acc-modal-backdrop[hidden] {
  display: none !important;
}

.acc-dialog {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(145deg, #18281f, #101c15);
  border: 1px solid #a8915b;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 145, 91, 0.15);
  color: #ebdcc4;
  position: relative;
}

.acc-dialog-head {
  text-align: center;
  margin-bottom: 18px;
}

.acc-dialog-head .eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1px;
  color: #c9a55e;
  font-weight: 700;
  margin-bottom: 4px;
}

.acc-dialog-head h2 {
  font-size: 24px;
  color: #f7dfa5;
  margin: 4px 0 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.acc-dialog-head p {
  font-size: 13px;
  color: #a8b8a5;
  margin: 0;
}

.acc-tabs {
  display: flex;
  border-bottom: 1px solid #5a6e50;
  margin-bottom: 18px;
  gap: 4px;
}

.acc-tab-btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #9cb196;
  cursor: pointer;
  transition: all 0.15s ease;
}

.acc-tab-btn.on {
  color: #f8dfa5;
  border-bottom-color: #dcb360;
  background: rgba(220, 179, 96, 0.08);
}

.acc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.acc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.acc-field label {
  font-size: 13px;
  font-weight: 600;
  color: #d8cebe;
}

.acc-field input {
  padding: 10px 12px;
  font-size: 15px;
  background: #0d1a13;
  border: 1px solid #6b7d60;
  border-radius: 6px;
  color: #fff4dc;
  outline: none;
  transition: border-color 0.15s ease;
}

.acc-field input:focus {
  border-color: #dcb360;
  box-shadow: 0 0 6px rgba(220, 179, 96, 0.4);
}

.acc-field small {
  font-size: 11px;
  color: #8c9e88;
}

.acc-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.acc-form-actions button {
  flex: 1;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.acc-alert {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 14px;
  line-height: 1.4;
  text-align: center;
}

.acc-alert.error {
  background: #471d18;
  border: 1px solid #944036;
  color: #ffc9be;
}

.acc-alert.success {
  background: #184227;
  border: 1px solid #36824f;
  color: #aff5c8;
}

.acc-lan-box {
  margin-top: 18px;
  padding: 12px;
  border-radius: 6px;
  background: rgba(10, 18, 13, 0.85);
  border: 1px solid #4a5c44;
  font-size: 12px;
}

.acc-lan-box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #e5cca0;
  font-weight: 700;
}

.acc-lan-url-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.acc-lan-url-row code {
  flex: 1;
  padding: 6px 8px;
  background: #060e0a;
  border: 1px solid #3a4a34;
  border-radius: 4px;
  color: #8be4aa;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.acc-copy-btn {
  padding: 6px 10px;
  background: #25392d;
  border: 1px solid #6b805f;
  color: #ded6c3;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.acc-copy-btn:hover {
  background: #395744;
  color: #fff;
}

@media (max-width: 600px) {
  .account-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .acc-actions {
    justify-content: flex-end;
  }
}

/* Intro Buttons & LAN Match Controls */
.intro-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.lan-btn {
  width: 100%;
  padding: 13px 18px;
  background: linear-gradient(135deg, #1b4d32 0%, #0d2619 100%);
  color: #a4f5c2;
  border: 1px solid #458f62;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.lan-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #256b46 0%, #133a27 100%);
  border-color: #6edaa0;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(27, 77, 50, 0.5);
}

.lan-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.lan-status-banner {
  margin: 10px 0 4px;
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(27, 77, 50, 0.95), rgba(13, 38, 25, 0.95));
  border: 1px solid #52ab76;
  color: #d1fae5;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: pulseLanBanner 2.5s infinite alternate;
}

.lan-status-banner button {
  background: #2b7a4f;
  color: #fff;
  border: 1px solid #7be3ab;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.lan-status-banner button:hover {
  background: #399c66;
}

@keyframes pulseLanBanner {
  from { border-color: #52ab76; }
  to { border-color: #8af5b8; box-shadow: 0 0 16px rgba(82, 171, 118, 0.35); }
}

/* Modal LAN Panel */
#lanPanel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(5px);
}

#lanPanel[hidden] {
  display: none !important;
}

.lan-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #18261b, #0c140f);
  border: 1px solid #5a734e;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ede6d8;
  position: relative;
}

.lan-card .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #8ae4aa;
  margin-bottom: 6px;
}

.lan-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #f5dfb0;
  font-family: inherit;
}

.lan-lead {
  font-size: 13px;
  color: #c9bfaf;
  margin: 0 0 14px;
  line-height: 1.45;
}

.lan-urls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.lan-url {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  background: #060e0a;
  border: 1px solid #3d5038;
  color: #79f0a6;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
}

.lan-status {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(35, 54, 40, 0.6);
  border: 1px dashed #597351;
  font-size: 13px;
  color: #f7e3ba;
  margin-bottom: 14px;
}

.lan-players {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lan-players li {
  padding: 7px 12px;
  border-radius: 5px;
  background: rgba(18, 30, 23, 0.7);
  border: 1px solid #364832;
  font-size: 13px;
  color: #e5ded0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lan-actions button {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.lan-actions button.primary {
  background: linear-gradient(135deg, #a47631 0%, #6e4e1a 100%);
  border-color: #f0c36b;
  color: #fff;
}

.lan-actions button.primary:hover {
  background: linear-gradient(135deg, #be8b3e 0%, #835e23 100%);
}

.lan-actions button.secondary {
  background: #203126;
  border-color: #556b4f;
  color: #d8d0bf;
}

.lan-actions button.secondary:hover {
  background: #2d4535;
  color: #fff;
}

/* ==========================================================================
   Thanh tiến độ nạp dữ liệu % (Võ Lâm Sinh Tồn / Giang Hồ Chi Chiến)
   ========================================================================== */
.game-loading-wrap {
  margin: 10px 0 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(20, 29, 22, 0.95), rgba(14, 20, 15, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease;
  box-sizing: border-box;
  width: 100%;
}

.game-loading-wrap.fade-out {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.game-loading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
}

.game-loading-status {
  color: #dfd7c2;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-loading-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: pulseLoadingDot 1.2s infinite alternate;
}

@keyframes pulseLoadingDot {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.game-loading-percent {
  color: #ffd700;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.game-loading-track {
  width: 100%;
  height: 9px;
  background: rgba(8, 12, 9, 0.9);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65);
}

.game-loading-fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: linear-gradient(90deg, #d4af37 0%, #f59e0b 50%, #f97316 100%);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.game-loading-fill::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: loadingShimmer 1.8s infinite linear;
}

@keyframes loadingShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (pointer: coarse) and (orientation: landscape) {
  .intro .game-loading-wrap {
    grid-column: 2;
    margin: 4px 0 8px;
    padding: 8px 12px;
  }
}

