/* Replicated from http://localhost:8888/index.html */
:root {
  --primary-color: #00f3ff;
  --secondary-color: #bc13fe;
  --bg-color: #050510;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-color: #ffffff;
  --modal-bg: #0f1218;
  --input-bg: #080a0e;
  --input-border: #2d3340;
  --accent-green: #00e5b0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.15) 0%, transparent 50%);
  background-color: var(--bg-color);
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(2);
  opacity: 0.4;
  pointer-events: none;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0) scale(2); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(50px) scale(2); }
}

.container {
  width: 90%;
  max-width: 1400px;
  text-align: center;
  z-index: 1;
  padding: 40px 20px;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #fff, var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
  animation: titleFadeIn 1.5s ease-out;
}

p.subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  perspective: 1000px;
  justify-content: center;
}

.server-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: white;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.server-card:hover::before {
  transform: translateX(100%);
}

.server-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.15), inset 0 0 10px rgba(0, 243, 255, 0.05);
}

.icon-box {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  position: relative;
  transition: 0.4s;
}

/* Gradient border */
.icon-box::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f3ff 0%, #bc13fe 50%, #00f3ff 100%);
  z-index: -1;
  opacity: 0.6;
  animation: borderRotate 4s linear infinite;
}

/* Inner mask */
.icon-box::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 50%;
  background: #0a0d12;
  z-index: -1;
}

@keyframes borderRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Outer glow ring */
.icon-box-glow {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 243, 255, 0.2);
  animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.6; }
}

.server-card:hover .icon-box {
  transform: scale(1.05);
}

.server-card:hover .icon-box::before {
  opacity: 1;
  animation: borderRotate 2s linear infinite;
}

.server-card:hover .icon-box-glow {
  border-color: rgba(0, 243, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Server-specific subtle gradients */
.card-us .icon-box::before {
  background: linear-gradient(135deg, #00f3ff 0%, #00e5b0 50%, #00f3ff 100%);
}
.card-jp .icon-box::before {
  background: linear-gradient(135deg, #00d4ff 0%, #00ffc8 50%, #00d4ff 100%);
}
.card-hk .icon-box::before {
  background: linear-gradient(135deg, #00b8ff 0%, #00e0a0 50%, #00b8ff 100%);
}

.server-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.server-status {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4ade80;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s infinite;
}

.server-info {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  width: 100%;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-bottom: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.info-row span:last-child {
  color: #fff;
  font-family: 'Consolas', monospace;
}

.bot-section {
  width: 100%;
  text-align: left;
  flex-grow: 1;
}

.bot-section-title {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.bot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-pill {
  background: rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: 0.2s;
  white-space: nowrap;
}

.bot-pill.alpha { border-color: rgba(0, 243, 255, 0.3); color: #ccfbfd; }
.bot-pill.sniper { border-color: rgba(255, 50, 50, 0.3); color: #fdd; }
.bot-pill.trade { border-color: rgba(188, 19, 254, 0.3); color: #f0cfff; }

.bot-pill:hover {
  background: rgba(255,255,255,0.15);
}

.dot-mini {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #4ade80;
}
.dot-mini.warn { background-color: #facc15; }

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

@keyframes titleFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-us:hover { --primary-color: #3b82f6; }
.card-jp:hover { --primary-color: #f43f5e; }
.card-hk:hover { --primary-color: #8b5cf6; }
.card-sg:hover { --primary-color: #10b981; }

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.auth-card {
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 40px;
  width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255,255,255,0.05);
}

.modal-overlay.active .auth-card {
  transform: scale(1);
}

.auth-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 229, 176, 0.2);
  font-family: 'Segoe UI', sans-serif;
  text-transform: uppercase;
}

.auth-title {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.auth-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-label {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: 0.2s;
}

.auth-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(0, 229, 176, 0.1);
}

.auth-input::placeholder {
  color: #334155;
}

.remember-group {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  cursor: pointer;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  background: var(--accent-green);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #000;
  font-size: 12px;
  opacity: 0.2;
  transition: 0.2s;
}

.remember-group.checked .custom-checkbox {
  opacity: 1;
}

.remember-text {
  color: #94a3b8;
  font-size: 0.9rem;
}

.btn-access {
  width: 100%;
  padding: 14px;
  background: var(--accent-green);
  color: #000;
  font-weight: bold;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  transition: 0.2s;
}
.btn-access:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(0, 229, 176, 0.3);
}

.btn-cancel {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: #64748b;
  border: 1px solid #334155;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.2s;
}
.btn-cancel:hover {
  border-color: #94a3b8;
  color: #fff;
}

.error-msg {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 6px;
  padding: 12px;
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: none;
}
.error-msg.show { display: block; }

