/**
 * Cyber Action Portal - Frontend Stylesheet
 * Ultra High-Performance CSS (Hardware Accelerated 60fps)
 */

:root {
  --cgp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cgp-btn-height: 58px;
}

/* ==========================================================================
   1. Portal Wrapper & Header
   ========================================================================== */
.cgp-portal-wrap {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: var(--cgp-font);
  text-align: center;
  position: relative;
  padding: 10px 0;
}

.cgp-portal-wrap * {
  box-sizing: border-box;
}

.cgp-header-block {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cgp-logo-box {
  max-width: 220px;
  margin-bottom: 4px;
}

.cgp-logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.cgp-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cgp-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  animation: cgp-pulse 2s infinite;
}

.cgp-badge-text {
  font-size: 12px;
  font-weight: 700;
  color: #e0f2fe;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cgp-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   2. Button Group Layout
   ========================================================================== */
.cgp-btn-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* Reset any unwanted Flatsome paragraph/br inside shortcode */
.cgp-btn-group p,
.cgp-btn-group br {
  display: none !important;
  margin: 0 !important;
}

/* ==========================================================================
   3. Glossy 3D Cyber Button Base
   ========================================================================== */
.cgp-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: var(--cgp-btn-height);
  border-radius: 999px;
  text-decoration: none !important;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}

/* Specular Top Glass Reflection */
.cgp-btn::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 10%;
  right: 10%;
  height: 44%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.08) 85%, transparent 100%);
  border-radius: 999px 999px 24px 24px;
  pointer-events: none;
  z-index: 2;
}

/* Inner Layout */
.cgp-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 20px;
  position: relative;
  z-index: 3;
}

/* SVG Vector Icon HD */
.cgp-btn-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
}

.cgp-btn-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.cgp-btn-web .cgp-btn-icon svg {
  stroke: #ffffff;
  fill: none;
}

/* Typography on Button */
.cgp-btn-labels {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.cgp-main-label {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(255, 255, 255, 0.3);
}

.cgp-sub-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Recommended badge for user's device */
.cgp-rec-badge {
  display: none;
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

.cgp-btn.is-recommended .cgp-rec-badge {
  display: inline-block;
  animation: cgp-glow-pulse 1.8s infinite alternate;
}

/* Hover & Active States */
.cgp-btn:hover {
  transform: translateY(-2.5px) scale(1.01);
  filter: brightness(1.12);
}

.cgp-btn:active {
  transform: translateY(1.5px) scale(0.985);
  filter: brightness(0.95);
}

/* ==========================================================================
   4. Light Sheen Sweep Animation
   ========================================================================== */
.cgp-portal-wrap.has-sheen .cgp-btn-shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.05) 80%,
    transparent 100%
  );
  transform: skewX(-25deg);
  z-index: 4;
  pointer-events: none;
  animation: cgp-sheen-sweep 3.6s infinite ease-in-out;
}

.cgp-portal-wrap.has-sheen .cgp-btn:nth-child(2) .cgp-btn-shine {
  animation-delay: 0.8s;
}

.cgp-portal-wrap.has-sheen .cgp-btn:nth-child(3) .cgp-btn-shine {
  animation-delay: 1.6s;
}

@keyframes cgp-sheen-sweep {
  0% { left: -120%; }
  35% { left: 160%; }
  100% { left: 160%; }
}

@keyframes cgp-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes cgp-glow-pulse {
  0% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.4); }
  100% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 2px #fff; }
}

/* ==========================================================================
   5. Themes Definition (Color Schemes)
   ========================================================================== */

/* THEME 1: CYBER NEON (789Club Signature: Blue & Pink Purple) */
.theme-neon .cgp-btn {
  background: 
    radial-gradient(ellipse 65% 100% at 95% 80%, rgba(220, 20, 180, 0.88) 0%, rgba(140, 15, 180, 0.4) 55%, transparent 75%),
    linear-gradient(180deg, #4da4ff 0%, #1557d4 22%, #081e6b 58%, #201366 100%);
  border: 1px solid rgba(130, 185, 255, 0.65);
  border-bottom: 1.5px solid rgba(225, 60, 200, 0.8);
  box-shadow: 
    0 5px 15px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(45, 120, 255, 0.45),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.75),
    inset 0 -2px 5px rgba(0, 0, 0, 0.6);
}
.theme-neon .cgp-btn:hover {
  box-shadow: 
    0 7px 22px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(65, 145, 255, 0.75),
    inset 0 1.5px 3px rgba(255, 255, 255, 0.95);
}
.theme-neon .cgp-btn.is-recommended {
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.75), inset 0 0 10px rgba(0, 240, 255, 0.4);
}

/* THEME 2: ROYAL GOLD (Sunwin / Luxury VIP) */
.theme-gold .cgp-btn {
  background: 
    radial-gradient(ellipse 70% 100% at 90% 80%, rgba(255, 215, 0, 0.9) 0%, rgba(184, 134, 11, 0.5) 55%, transparent 75%),
    linear-gradient(180deg, #ffe57f 0%, #ffb300 24%, #b27b00 62%, #422800 100%);
  border: 1px solid rgba(255, 235, 150, 0.85);
  border-bottom: 2px solid rgba(255, 180, 0, 0.9);
  box-shadow: 
    0 5px 16px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(255, 190, 30, 0.5),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.9),
    inset 0 -2px 5px rgba(0, 0, 0, 0.65);
}
.theme-gold .cgp-btn:hover {
  box-shadow: 
    0 7px 24px rgba(0, 0, 0, 0.75),
    0 0 26px rgba(255, 210, 50, 0.8),
    inset 0 1.5px 3px rgba(255, 255, 255, 1);
}
.theme-gold .cgp-btn.is-recommended {
  border: 1.5px solid #fff275;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.85), inset 0 0 10px rgba(255, 215, 0, 0.5);
}

/* THEME 3: RUBY RED (88Bet / Jun88 Casino Lucky Red) */
.theme-ruby .cgp-btn {
  background: 
    radial-gradient(ellipse 65% 100% at 90% 80%, rgba(255, 190, 0, 0.85) 0%, rgba(220, 20, 60, 0.4) 55%, transparent 75%),
    linear-gradient(180deg, #ff4d6d 0%, #c9184a 24%, #800f2f 62%, #38040e 100%);
  border: 1px solid rgba(255, 160, 180, 0.75);
  border-bottom: 2px solid rgba(255, 200, 50, 0.85);
  box-shadow: 
    0 5px 16px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(225, 29, 72, 0.5),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.85),
    inset 0 -2px 5px rgba(0, 0, 0, 0.65);
}
.theme-ruby .cgp-btn:hover {
  box-shadow: 
    0 7px 24px rgba(0, 0, 0, 0.75),
    0 0 26px rgba(255, 50, 90, 0.8),
    inset 0 1.5px 3px rgba(255, 255, 255, 1);
}
.theme-ruby .cgp-btn.is-recommended {
  border: 1.5px solid #ff758f;
  box-shadow: 0 0 25px rgba(255, 77, 109, 0.85), inset 0 0 10px rgba(255, 77, 109, 0.5);
}

/* THEME 4: EMERALD JADE (Fengshui Green) */
.theme-emerald .cgp-btn {
  background: 
    radial-gradient(ellipse 65% 100% at 90% 80%, rgba(0, 255, 170, 0.8) 0%, rgba(0, 128, 128, 0.4) 55%, transparent 75%),
    linear-gradient(180deg, #2ec4b6 0%, #009688 24%, #004d40 62%, #00251a 100%);
  border: 1px solid rgba(130, 255, 220, 0.75);
  border-bottom: 2px solid rgba(0, 255, 180, 0.85);
  box-shadow: 
    0 5px 16px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(0, 200, 150, 0.5),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.85),
    inset 0 -2px 5px rgba(0, 0, 0, 0.65);
}
.theme-emerald .cgp-btn:hover {
  box-shadow: 
    0 7px 24px rgba(0, 0, 0, 0.75),
    0 0 26px rgba(0, 255, 190, 0.8),
    inset 0 1.5px 3px rgba(255, 255, 255, 1);
}

/* THEME 5: TITANIUM DARK */
.theme-titanium .cgp-btn {
  background: 
    radial-gradient(ellipse 65% 100% at 90% 80%, rgba(100, 116, 139, 0.6) 0%, transparent 65%),
    linear-gradient(180deg, #64748b 0%, #334155 24%, #1e293b 62%, #0f172a 100%);
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-bottom: 2px solid rgba(148, 163, 184, 0.6);
  box-shadow: 
    0 5px 16px rgba(0, 0, 0, 0.7),
    0 0 14px rgba(100, 116, 139, 0.4),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   6. Footer Tools: 1.1.1.1 WARP Trigger
   ========================================================================== */
.cgp-footer-block {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.cgp-warp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cgp-warp-trigger:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.cgp-warp-icon {
  font-size: 15px;
}

/* ==========================================================================
   7. Warp Modal (Interactive Lightbox)
   ========================================================================== */
.cgp-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  padding: 16px;
  font-family: var(--cgp-font);
}

.cgp-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cgp-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 25, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cgp-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: #0d1527;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
  overflow: hidden;
  z-index: 2;
  transform: scale(0.92);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cgp-modal.is-open .cgp-modal-dialog {
  transform: scale(1);
}

.cgp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cgp-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cgp-modal-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.cgp-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.cgp-modal-close:hover {
  color: #ffffff;
}

.cgp-modal-body {
  padding: 24px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  max-height: 75vh;
  overflow-y: auto;
}

.cgp-modal-lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: #94a3b8;
}

/* Modal Tabs */
.cgp-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.cgp-tab-btn {
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.cgp-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.cgp-tab-btn.is-active {
  color: #ffffff;
  background: #0284c7;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.cgp-tab-content {
  display: none;
}

.cgp-tab-content.is-active {
  display: block;
  animation: cgp-fade-in 0.25s ease;
}

@keyframes cgp-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Steps Box */
.cgp-step-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.cgp-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cgp-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0284c7;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cgp-step-text strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 3px;
}

.cgp-step-text p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.cgp-modal-actions {
  text-align: center;
}

.cgp-modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s;
}

.cgp-modal-cta:hover {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.6);
}

/* DNS Guide */
.cgp-dns-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.cgp-dns-item {
  background: #090f1d;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.cgp-dns-item span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.cgp-dns-item code {
  color: #38bdf8;
  font-size: 13px;
  font-weight: 700;
}

.cgp-dns-steps {
  padding-left: 20px;
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.cgp-dns-steps li {
  margin-bottom: 8px;
}

/* Backup Card */
.cgp-backup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090f1d;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  margin-top: 12px;
}

.cgp-backup-info {
  display: flex;
  flex-direction: column;
}

.cgp-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
  margin-bottom: 4px;
}

.cgp-backup-info code {
  color: #38bdf8;
  font-size: 13px;
}

.cgp-backup-btn {
  padding: 8px 16px;
  background: #10b981;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

.cgp-modal-footer {
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 11px;
  color: #64748b;
}

/* Responsive Rules */
@media (max-width: 480px) {
  .cgp-main-label {
    font-size: 16px;
  }
  .cgp-sub-label {
    font-size: 10px;
  }
  .cgp-btn-icon {
    width: 22px;
    height: 22px;
    margin-right: 10px;
  }
  .cgp-dns-values {
    grid-template-columns: 1fr;
  }
}
