/* ==========================================
   CSS : สำหรับหน้าประตูทางเข้า (Gateway)
   ========================================== */
:root {
  --gw-bg-gradient: radial-gradient(circle at 50% 30%, #2a2d3b 0%, #121318 100%);
  --gw-text-main: #ffffff;
  --gw-text-sub: #a0aec0;
  --gw-btn-bg: #ffffff;
  --gw-btn-text: #111827;
  --gw-btn-hover: #f3f4f6;
}

.gateway-container {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99999;
  background: var(--gw-bg-gradient); color: var(--gw-text-main); font-family: 'Prompt', sans-serif;
  display: flex; flex-direction: column; overflow: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
}
.gateway-container.hidden { opacity: 0; visibility: hidden; transform: scale(1.02); pointer-events: none; }
.gateway-container * { box-sizing: border-box; }

.gw-top-header { position: absolute; top: 40px; right: 60px; display: flex; align-items: center; z-index: 10; background: transparent !important; border: none !important; }
.gw-header-text { display: flex; flex-direction: column; justify-content: center; text-align: right; }
.gw-title-th { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 22px; color: #ffffff; margin: 0 0 2px 0; letter-spacing: 0.02em; }
.gw-title-en { font-family: 'Prompt', sans-serif; font-weight: 400; font-size: 14px; color: var(--gw-text-sub); margin: 0; letter-spacing: 0.03em; }

.gw-center-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; text-align: center; padding: 20px; }
.gw-brand-group { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.gw-sub-brand { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 500; letter-spacing: 0.3em; color: #e2e8f0; margin-bottom: 0px; }
.gw-main-brand { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 700; letter-spacing: 0.15em; color: #ffffff; margin: 0 0 40px; line-height: 1.1; }

.gw-status-btn {
  background: var(--gw-btn-bg); color: var(--gw-btn-text); border: none; border-radius: 6px;
  padding: 12px 32px; font-family: 'Prompt', sans-serif; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px; transition: all 0.3s ease; text-decoration: none; position: relative; overflow: hidden;
}
.gw-status-btn.offline { cursor: not-allowed; opacity: 0.9; }
.gw-status-btn.online { cursor: pointer; box-shadow: 0 0 20px rgba(255,255,255,0.2); }
.gw-status-btn.online::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 150%; padding-bottom: 150%;
  background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%) scale(0); opacity: 0; transition: transform 0.5s ease, opacity 0.5s ease; border-radius: 50%;
}
.gw-status-btn.online:hover { background: var(--gw-btn-hover); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255,255,255,0.3); }
.gw-status-btn.online:hover::before { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.gw-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; z-index: 1; }
.gw-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
#gw-status-text { z-index: 1; position: relative; }

.gw-bottom-left { position: absolute; bottom: 40px; left: 60px; display: flex; flex-direction: column; gap: 12px; z-index: 10; }
.gw-social-icons { display: flex; gap: 12px; opacity: 0.7; transition: opacity 0.3s; }
.gw-social-icons:hover { opacity: 1; }
.gw-social-icons svg { width: 20px; height: 20px; fill: currentColor; transition: transform 0.3s; cursor: pointer; }
.gw-social-icons svg:hover { transform: translateY(-3px) scale(1.1); color: #ffce11; }
.gw-copyright { font-size: 12px; color: var(--gw-text-sub); font-weight: 300; }

.gw-bottom-right { position: absolute; bottom: 40px; right: 60px; display: flex; align-items: center; gap: 24px; z-index: 10; }
.gw-version-btn { background: none; border: none; font-size: 12px; color: var(--gw-text-sub); font-weight: 300; letter-spacing: 0.05em; cursor: pointer; padding: 10px; opacity: 0.5; transition: all 0.3s ease; font-family: inherit; }
.gw-version-btn:hover { opacity: 1; color: #ffce11; transform: scale(1.05); }

.gw-admin-modal { position: fixed; inset: 0; background: rgba(10, 12, 16, 0.8); backdrop-filter: blur(8px); z-index: 999999; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.gw-admin-modal.show { display: flex; opacity: 1; }
.gw-modal-content { background: #1e222d; border: 1px solid #333847; padding: 32px; border-radius: 12px; width: 90%; max-width: 340px; text-align: center; box-shadow: 0 25px 50px rgba(0,0,0,0.5); transform: translateY(20px); transition: transform 0.3s ease; }
.gw-admin-modal.show .gw-modal-content { transform: translateY(0); }
.gw-modal-content h3 { margin: 0 0 8px; font-size: 18px; color: #fff; font-family: 'Prompt', sans-serif;}
.gw-modal-content p { font-size: 13px; color: var(--gw-text-sub); margin: 0 0 24px; font-family: 'Prompt', sans-serif;}
.gw-modal-content input { width: 100%; padding: 12px 16px; background: #151821; border: 1px solid #333847; color: #fff; border-radius: 6px; font-family: inherit; font-size: 15px; margin-bottom: 20px; outline: none; text-align: center; letter-spacing: 0.2em; transition: border-color 0.3s, box-shadow 0.3s; }
.gw-modal-content input:focus { border-color: #ffce11; box-shadow: 0 0 10px rgba(255, 206, 17, 0.2); }
.gw-btn-group { display: flex; gap: 12px; }
.gw-btn { flex: 1; padding: 10px; border: none; border-radius: 6px; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.gw-btn-cancel { background: #333847; color: var(--gw-text-sub); }
.gw-btn-cancel:hover { background: #474d5e; color: #fff; transform: translateY(-2px); }
.gw-btn-submit { background: #fff; color: #000; }
.gw-btn-submit:hover { background: #ffce11; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 206, 17, 0.3); }

@media (max-width: 768px) { 
  .gw-top-header { top: 24px; right: 24px; } 
  .gw-bottom-left { bottom: 24px; left: 24px; } 
  .gw-bottom-right { bottom: 24px; right: 24px; } 
}
body.gateway-active { overflow: hidden; }