@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════
   GIGABOUND PORTAL — GOLD PREMIUM THEME
   Shared across login, admin, and dashboard
   ═══════════════════════════════════════════════ */

:root {
  /* Portal variables (used by admin/dashboard inline CSS) */
  --bg: #04040e;
  --card: rgba(14,12,22,0.75);
  --card-solid: #0e0c16;
  --card2: #161222;
  --border: #2a2238;
  --accent: #d4a853;
  --accent2: #e8c878;
  --accent-glow: rgba(212,168,83,0.25);
  --accent-glow-strong: rgba(212,168,83,0.5);
  --green: #00b894;
  --red: #ff6b6b;
  --orange: #fdcb6e;
  --blue: #74b9ff;
  --cyan: #06b6d4;
  --text: #f0ece4;
  --text2: #8a8578;
  --gold: #d4a853;
  --gradient-accent: linear-gradient(135deg, #d4a853 0%, #b8862d 100%);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(212,168,83,0.12) 0%, rgba(184,134,45,0.06) 100%);
  --gradient-title: linear-gradient(135deg, #d4a853, #f0d890, #d4a853);
  --mesh-1: radial-gradient(ellipse 600px 400px at 20% 20%, rgba(212,168,83,0.06) 0%, transparent 70%);
  --mesh-2: radial-gradient(ellipse 500px 500px at 80% 80%, rgba(108,92,231,0.04) 0%, transparent 70%);
  --mesh-3: radial-gradient(ellipse 400px 300px at 50% 50%, rgba(212,168,83,0.03) 0%, transparent 70%);
  --logo-shadow-1: drop-shadow(0 0 20px rgba(212,168,83,0.4));
  --logo-shadow-2: drop-shadow(0 0 40px rgba(212,168,83,0.2)) drop-shadow(0 0 10px rgba(37,99,235,0.15));
  --logo-shadow-hover: drop-shadow(0 0 30px rgba(212,168,83,0.6)) drop-shadow(0 0 50px rgba(212,168,83,0.3));

  /* Override main site variables (when style.css is also loaded) */
  --bg-primary: #04040e;
  --bg-secondary: #06060f;
  --bg-card: rgba(14,12,22,0.75);
  --bg-card-solid: #0e0c16;
  --text-muted: #8a8578;
}

/* ─── ANIMATED MESH BACKGROUND ─── */
.portal-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--mesh-1), var(--mesh-2), var(--mesh-3);
  z-index: 0;
  pointer-events: none;
  animation: meshDrift 20s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}

/* ─── GLASSMORPHISM CARDS ─── */
.portal-glass {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.portal-glass::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--accent-glow), transparent 40%, transparent 60%, var(--accent-glow));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.portal-glass:hover::before {
  opacity: 1;
}

/* ─── ENTRANCE ANIMATIONS ─── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.portal-animate {
  animation: fadeSlideUp 0.6s ease-out both;
}

.portal-animate-delay-1 { animation-delay: 0.1s; }
.portal-animate-delay-2 { animation-delay: 0.2s; }
.portal-animate-delay-3 { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════════
   PREMIUM LOGO REVEAL — Matrix Build
   Logo assembles from falling data columns.
   12 vertical strips drop into place.
   Single play, then holds.
   ═══════════════════════════════════════════════ */

.logo-reveal {
  position: relative;
  width: 360px;
  height: 360px;
  margin: 0 auto 8px;
}

/* Matrix rain canvas — masked edges blend into background */
.matrix-rain {
  position: absolute;
  top: -40px;
  left: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 30%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 55% at 50% 50%, black 30%, transparent 70%);
}

/* Each strip is a copy of the full image, clipped to its column */
.logo-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  opacity: 0;
  animation: stripDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Clip each strip to its column (12 columns, ~8.33% each) */
.s-1  { clip-path: inset(0 91.67% 0 0);       }
.s-2  { clip-path: inset(0 83.33% 0 8.33%);    }
.s-3  { clip-path: inset(0 75%    0 16.67%);   }
.s-4  { clip-path: inset(0 66.67% 0 25%);      }
.s-5  { clip-path: inset(0 58.33% 0 33.33%);   }
.s-6  { clip-path: inset(0 50%    0 41.67%);   }
.s-7  { clip-path: inset(0 41.67% 0 50%);      }
.s-8  { clip-path: inset(0 33.33% 0 58.33%);   }
.s-9  { clip-path: inset(0 25%    0 66.67%);   }
.s-10 { clip-path: inset(0 16.67% 0 75%);      }
.s-11 { clip-path: inset(0 8.33%  0 83.33%);   }
.s-12 { clip-path: inset(0 0      0 91.67%);   }

/* Stagger order — center-out wave: 6,7 → 5,8 → 4,9 → 3,10 → 2,11 → 1,12 */
.s-6  { animation-delay: 0.3s; }
.s-7  { animation-delay: 0.38s; }
.s-5  { animation-delay: 0.5s; }
.s-8  { animation-delay: 0.58s; }
.s-4  { animation-delay: 0.7s; }
.s-9  { animation-delay: 0.78s; }
.s-3  { animation-delay: 0.9s; }
.s-10 { animation-delay: 0.98s; }
.s-2  { animation-delay: 1.1s; }
.s-11 { animation-delay: 1.18s; }
.s-1  { animation-delay: 1.3s; }
.s-12 { animation-delay: 1.38s; }

@keyframes stripDrop {
  0%   {
    opacity: 0;
    transform: translateY(-60px) scaleY(1.4);
    filter: brightness(2) blur(3px);
  }
  40%  {
    opacity: 1;
    transform: translateY(4px) scaleY(0.97);
    filter: brightness(1.5) blur(1px);
  }
  70%  {
    transform: translateY(-2px) scaleY(1.01);
    filter: brightness(1.1) blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: brightness(1) blur(0);
  }
}

/* Topbar logo glow (smaller effect for admin/dashboard) */
.logo-glow {
  filter: var(--logo-shadow-1);
  animation: topbarGlow 3s ease-in-out infinite;
}

@keyframes topbarGlow {
  0%, 100% { filter: var(--logo-shadow-1); }
  50%      { filter: var(--logo-shadow-2); }
}

/* ═══════════════════════════════════════════════
   PORTAL LOGIN PAGE STYLES
   ═══════════════════════════════════════════════ */

.portal-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.portal-wrap {
  width: 100%;
  max-width: 440px;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.portal-logo {
  text-align: center;
  margin-bottom: 4px;
}

.portal-title {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  font-weight: 700;
  background: var(--gradient-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.portal-sub {
  color: var(--text2);
  font-size: 14px;
}

.portal-card {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 36px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 60px var(--accent-glow);
}

.portal-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--accent-glow), transparent 40%, transparent 60%, var(--accent-glow));
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.portal-card:hover::before {
  opacity: 1;
}

.portal-field {
  margin-bottom: 16px;
}

.portal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: 'JetBrains Mono', monospace;
}

.portal-field .input-wrap {
  position: relative;
}

.portal-field .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text2);
  pointer-events: none;
  opacity: 0.5;
}

.portal-field input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.portal-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px var(--accent-glow);
}

.portal-field input::placeholder {
  color: var(--text2);
  opacity: 0.6;
}

.portal-btn {
  width: 100%;
  padding: 14px;
  background: var(--gradient-accent);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.portal-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.portal-btn:hover::after {
  transform: translateX(100%);
}

.portal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px var(--accent-glow-strong);
}

.portal-btn:active {
  transform: translateY(0);
}

.portal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.portal-error {
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.25);
  color: #ff6b6b;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
  line-height: 1.5;
}

.portal-footer {
  text-align: center;
  margin-top: 16px;
}

.portal-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text2);
  font-size: 12px;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.portal-secure svg {
  color: var(--accent);
}

.portal-footer a {
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.portal-footer a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════
   TOPBAR (Admin / Dashboard)
   ═══════════════════════════════════════════════ */

.portal-topbar {
  background: linear-gradient(135deg, rgba(14,12,22,0.9) 0%, rgba(16,24,40,0.9) 50%, rgba(10,14,28,0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent);
  position: relative;
  z-index: 10;
}

/* ═══════════════════════════════════════════════
   ADMIN TAG
   ═══════════════════════════════════════════════ */

.admin-tag-premium {
  background: var(--gradient-accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════
   PORTAL PARTICLES CONTAINER
   ═══════════════════════════════════════════════ */

#portal-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  .portal-wrap { padding: 16px; }
  .portal-card { padding: 24px 20px; }
  .portal-field { margin-bottom: 14px; }
  .logo-reveal { width: 260px; height: 260px; }
  .portal-topbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 480px) {
  .portal-wrap { padding: 12px; }
  .portal-card { padding: 20px 16px; }
  .portal-field { margin-bottom: 12px; }
  .portal-field input { padding: 12px 14px 12px 40px; font-size: 14px; }
  .portal-btn { padding: 12px; font-size: 14px; }
  .logo-reveal { width: 220px; height: 220px; }
  .portal-title { font-size: 1.3rem; }
  .portal-footer { margin-top: 12px; }
}
