/* ============================================
   AI SYSTEM DASHBOARD - EXACT MATCH
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&display=swap');

.ai-dashboard-section {
  background: #020617;
  padding: 50px 20px;
  color: #fff;
  font-family: 'Kanit', sans-serif;
  position: relative;
  overflow: hidden;
}
.ai-dashboard-section * { box-sizing: border-box; }

.ai-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Header */
.ai-header { text-align: center; margin-bottom: 40px; }
.vip-badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.4);
  padding: 6px 20px; border-radius: 30px; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 2px; margin-bottom: 15px; background: rgba(192, 132, 252, 0.1);
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.2);
}
.ai-title {
  font-family: 'Orbitron', sans-serif; font-size: 3rem; font-weight: 900;
  margin: 0 0 5px 0; letter-spacing: 2px; color: #fff; text-shadow: 0 0 20px rgba(0,229,255,0.2);
}
.ai-title em { font-style: normal; color: #00e5ff; }
.ai-subtitle { font-size: 0.8rem; letter-spacing: 4px; color: #64748b; margin-bottom: 10px; text-transform: uppercase; }
.ai-desc { color: #94a3b8; font-size: 0.95rem; }

/* Status Bar */
.ai-status-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  background: rgba(15, 23, 42, 0.6); margin-bottom: 30px; padding: 20px 0;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.status-item {
  display: flex; align-items: center; justify-content: center; gap: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.05); padding: 0 20px;
}
.status-item:last-child { border-right: none; }
.status-icon {
  width: 45px; height: 45px; border: 1px solid rgba(0, 229, 255, 0.2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #00e5ff; font-size: 1.3rem;
  background: rgba(0, 229, 255, 0.05);
}
.status-info { display: flex; flex-direction: column; }
.status-label { font-size: 0.65rem; color: #94a3b8; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.status-val { font-size: 1.3rem; font-weight: 700; font-family: 'Orbitron', sans-serif; line-height: 1; }
.status-val.online { color: #22c55e; }
.status-val.cyan { color: #00e5ff; }
.status-sub { font-size: 0.6rem; color: #64748b; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

/* Cards */
.ai-cards { display: flex; flex-direction: column; gap: 20px; }
.ai-card {
  position: relative; display: grid; grid-template-columns: 180px 1fr 1.2fr 200px; gap: 25px;
  background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 25px; align-items: center;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

/* Full electronic glow border */
.ai-card.cyan {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 15px rgba(0,229,255,0.2), 0 0 40px rgba(0,229,255,0.1), inset 0 0 25px rgba(0,229,255,0.06);
  animation: glowCyan 2.5s ease-in-out infinite alternate;
}
.ai-card.purple {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 15px rgba(192,132,252,0.2), 0 0 40px rgba(192,132,252,0.1), inset 0 0 25px rgba(192,132,252,0.06);
  animation: glowPurple 2.5s ease-in-out infinite alternate;
}
.ai-card.blue {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 15px rgba(96,165,250,0.2), 0 0 40px rgba(96,165,250,0.1), inset 0 0 25px rgba(96,165,250,0.06);
  animation: glowBlue 2.5s ease-in-out infinite alternate;
}

@keyframes glowCyan {
  0% { box-shadow: 0 0 10px rgba(0,229,255,0.15), 0 0 30px rgba(0,229,255,0.08), inset 0 0 20px rgba(0,229,255,0.04); border-color: rgba(0,229,255,0.35); }
  100% { box-shadow: 0 0 25px rgba(0,229,255,0.35), 0 0 60px rgba(0,229,255,0.15), inset 0 0 40px rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.7); }
}
@keyframes glowPurple {
  0% { box-shadow: 0 0 10px rgba(192,132,252,0.15), 0 0 30px rgba(192,132,252,0.08), inset 0 0 20px rgba(192,132,252,0.04); border-color: rgba(192,132,252,0.35); }
  100% { box-shadow: 0 0 25px rgba(192,132,252,0.35), 0 0 60px rgba(192,132,252,0.15), inset 0 0 40px rgba(192,132,252,0.08); border-color: rgba(192,132,252,0.7); }
}
@keyframes glowBlue {
  0% { box-shadow: 0 0 10px rgba(96,165,250,0.15), 0 0 30px rgba(96,165,250,0.08), inset 0 0 20px rgba(96,165,250,0.04); border-color: rgba(96,165,250,0.35); }
  100% { box-shadow: 0 0 25px rgba(96,165,250,0.35), 0 0 60px rgba(96,165,250,0.15), inset 0 0 40px rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.7); }
}

/* Hover glow intensify */
.ai-card.cyan:hover { box-shadow: 0 0 30px rgba(0,229,255,0.4), 0 0 80px rgba(0,229,255,0.2), inset 0 0 50px rgba(0,229,255,0.1); border-color: rgba(0,229,255,0.8); animation-play-state: paused; }
.ai-card.purple:hover { box-shadow: 0 0 30px rgba(192,132,252,0.4), 0 0 80px rgba(192,132,252,0.2), inset 0 0 50px rgba(192,132,252,0.1); border-color: rgba(192,132,252,0.8); animation-play-state: paused; }
.ai-card.blue:hover { box-shadow: 0 0 30px rgba(96,165,250,0.4), 0 0 80px rgba(96,165,250,0.2), inset 0 0 50px rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.8); animation-play-state: paused; }

.card-num {
  position: absolute; top: -1px; left: -1px;
  background: rgba(0, 229, 255, 0.1); border-bottom: 1px solid rgba(0, 229, 255, 0.3); border-right: 1px solid rgba(0, 229, 255, 0.3);
  padding: 4px 15px; border-radius: 12px 0 10px 0; font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.9rem;
}
.ai-card.cyan .card-num { color: #00e5ff; background: rgba(0, 229, 255, 0.1); border-color: rgba(0, 229, 255, 0.3); }
.ai-card.purple .card-num { color: #c084fc; background: rgba(192, 132, 252, 0.1); border-color: rgba(192, 132, 252, 0.3); }
.ai-card.blue .card-num { color: #60a5fa; background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.3); }

.card-icon-area { display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.card-icon-area img { width: 140px; height: 140px; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 0 10px rgba(0,229,255,0.3)); }
.ai-card.purple .card-icon-area img { filter: drop-shadow(0 0 10px rgba(192,132,252,0.3)); }
.ai-card.blue .card-icon-area img { filter: drop-shadow(0 0 10px rgba(96,165,250,0.3)); }

.card-info { display: flex; flex-direction: column; }
.card-info h3 { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; margin: 0 0 5px 0; color: #fff; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
/* Thai text in card titles — use Kanit with premium gradient styling */
.card-info h3 span {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px currentColor);
  letter-spacing: 0.5px;
  line-height: 1.4;
}
.ai-card.cyan h3 span {
  background-image: linear-gradient(135deg, #00e5ff, #67f0ff, #00bcd4);
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
}
.ai-card.purple h3 span {
  background-image: linear-gradient(135deg, #c084fc, #e9b0ff, #a855f7);
  filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.5));
}
.ai-card.blue h3 span {
  background-image: linear-gradient(135deg, #60a5fa, #93c5fd, #3b82f6);
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.5));
}
.card-info p { margin: 0; color: #94a3b8; font-size: 0.8rem; letter-spacing: 0.3px; }
.card-info p.th-desc {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
  font-weight: 400;
  opacity: 0.9;
}
.active-badge {
  display: inline-flex; align-items: center; gap: 5px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e; padding: 2px 10px; border-radius: 12px; font-size: 0.65rem; font-weight: 700; margin-top: 15px; width: fit-content;
}

.card-stats { border-left: 1px solid rgba(255,255,255,0.05); padding-left: 25px; display: flex; flex-direction: column; justify-content: center; }
.stat-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.stat-label { font-size: 0.6rem; color: #64748b; letter-spacing: 1px; text-transform: uppercase; }
.stat-val { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 700; }
.stat-val.cyan { color: #00e5ff; }
.stat-val.purple { color: #c084fc; }

.seg-bar-container { width: 100%; height: 8px; position: relative; margin-bottom: 12px; }
.seg-bar-bg { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.1) 4px, transparent 4px, transparent 6px); }
.seg-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.seg-bar-fill.cyan { background: repeating-linear-gradient(90deg, #00e5ff, #00e5ff 4px, transparent 4px, transparent 6px); box-shadow: 0 0 10px rgba(0,229,255,0.3); }
.seg-bar-fill.purple { background: repeating-linear-gradient(90deg, #c084fc, #c084fc 4px, transparent 4px, transparent 6px); box-shadow: 0 0 10px rgba(192,132,252,0.3); }

.mini-chart { width: 100%; height: 25px; margin-top: 5px; }
.rank-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rank-item { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; }
.rank-item .num { background: rgba(255,255,255,0.1); color: #fff; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 0.75rem; margin-right: 12px; }
.rank-item .name { flex: 1; color: #e2e8f0; }
.rank-item .pct { color: #60a5fa; font-weight: 700; font-family: 'Orbitron', sans-serif; margin-left: 10px; }

.card-action { border-left: 1px solid rgba(255,255,255,0.05); padding-left: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cyber-btn-wrap {
  padding: 2px; clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
  display: inline-block; width: 100%;
}
.cyber-btn-wrap.cyan { background: linear-gradient(135deg, rgba(0,229,255,0.8), rgba(0,229,255,0.2)); }
.cyber-btn-wrap.purple { background: linear-gradient(135deg, rgba(192,132,252,0.8), rgba(192,132,252,0.2)); }
.cyber-btn-wrap.blue { background: linear-gradient(135deg, rgba(96,165,250,0.8), rgba(96,165,250,0.2)); }

.cyber-btn {
  display: flex; align-items: center; justify-content: space-between; background: #050a15;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  padding: 12px 15px; text-decoration: none; transition: all 0.3s;
}
.cyber-btn:hover { background: rgba(255,255,255,0.05); }
.btn-text { display: flex; flex-direction: column; align-items: flex-start; }
.btn-text span:first-child { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: #fff; }
.btn-text span:last-child { font-size: 1.05rem; font-family: 'Orbitron', sans-serif; font-weight: 900; }
.cyber-btn-wrap.cyan .btn-text span:last-child { color: #00e5ff; }
.cyber-btn-wrap.purple .btn-text span:last-child { color: #c084fc; }
.cyber-btn-wrap.blue .btn-text span:last-child { color: #60a5fa; }
.cyber-btn i { font-size: 1.2rem; color: #fff; }
.btn-sub { font-size: 0.8rem; color: #94a3b8; margin-top: 10px; text-align: center; }

/* Footer Bar */
.ai-footer-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 30px; padding: 15px 30px; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px; background: rgba(15, 23, 42, 0.4);
}
.footer-left, .footer-right { display: flex; align-items: center; gap: 15px; }
.footer-left i { color: #00e5ff; font-size: 1.5rem; animation: pulse 2s infinite; }
.footer-left span { color: #94a3b8; letter-spacing: 3px; font-size: 0.85rem; font-weight: 700; }
.footer-right span { color: #64748b; font-size: 0.7rem; text-align: right; line-height: 1.3; letter-spacing: 1px; }
.footer-right i { color: #475569; font-size: 2rem; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Responsive */
@media(max-width: 1024px) {
  .ai-card { grid-template-columns: 150px 1fr 1fr; }
  .card-action { border-left: none; border-top: 1px solid rgba(255,255,255,0.1); padding-left: 0; padding-top: 20px; grid-column: 1 / -1; }
}
@media(max-width: 768px) {
  .ai-status-bar { grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; background: transparent; border: none; box-shadow: none; }
  .status-item { border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 15px 5px; background: rgba(15, 23, 42, 0.6); flex-direction: column; text-align: center; gap: 8px; justify-content: flex-start; }
  .status-icon { width: 35px; height: 35px; font-size: 1.1rem; }
  .status-info { align-items: center; }
  .status-val { font-size: 1.1rem; word-break: break-word; line-height: 1.2; }
  .status-label { font-size: 0.6rem; white-space: normal; line-height: 1.2; }
  .status-sub { font-size: 0.55rem; }

  .ai-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
  }

  .ai-card {
    display: grid !important;
    grid-template-columns: 75px minmax(0, 1fr) 90px !important;
    grid-template-areas:
      "icon info action"
      "icon stats action" !important;
    align-items: center;
    text-align: left !important;
    padding: 12px 10px !important;
    gap: 8px 8px !important;
  }
  
  .card-num {
    padding: 2px 8px !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }

  .card-icon-area {
    grid-area: icon;
    align-self: center;
  }
  .card-icon-area img {
    width: 70px !important;
    height: 70px !important;
  }

  .card-info {
    grid-area: info;
  }
  .card-info h3 {
    font-size: 1.1rem !important;
    gap: 4px !important;
    flex-wrap: wrap;
    line-height: 1.2 !important;
  }
  .card-info h3 span {
    font-size: 1rem !important;
  }
  .card-info p {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }
  .card-info p.th-desc {
    font-size: 0.8rem !important;
    margin-top: 4px !important;
    line-height: 1.3 !important;
  }
  .active-badge {
    margin: 4px 0 0 0 !important;
    font-size: 0.65rem !important;
    padding: 2px 6px !important;
    line-height: 1.2 !important;
  }

  .card-stats {
    grid-area: stats;
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px !important;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .stat-header {
    justify-content: space-between !important;
    margin-bottom: 2px !important;
  }
  .stat-label {
    font-size: 0.65rem !important;
  }
  .stat-val {
    font-size: 1.1rem !important;
  }
  .seg-bar-container {
    height: 5px !important;
    margin-bottom: 6px !important;
  }
  .mini-chart {
    height: 15px !important;
  }
  .rank-list {
    gap: 3px !important;
  }
  .rank-item {
    font-size: 0.8rem !important;
  }
  .rank-item .num {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.75rem !important;
    margin-right: 4px !important;
  }
  .rank-item .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }

  .card-action {
    grid-area: action;
    border-left: 1px solid rgba(255,255,255,0.05) !important;
    padding-left: 6px !important;
    border-top: none !important;
    padding-top: 0 !important;
    align-self: center;
    justify-self: stretch !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cyber-btn-wrap {
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px) !important;
    width: 100% !important;
    display: block !important;
  }
  .cyber-btn {
    padding: 6px 4px !important;
    gap: 2px !important;
    justify-content: center !important;
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px) !important;
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  .btn-text {
    align-items: center !important;
  }
  .btn-text span:last-child {
    font-size: 0.8rem !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }
  .cyber-btn i {
    font-size: 1rem !important;
    margin-left: -2px !important;
  }
  .btn-sub {
    font-size: 0.75rem !important;
    margin-top: 4px !important;
  }

  .ai-footer-bar { flex-direction: column; gap: 15px; text-align: center; }
  .footer-right { flex-direction: column-reverse; }
  .footer-right span { text-align: center; }
}

/* ============================================
   BORDER GLOW EFFECT - Provider Cards
   ============================================ */
.prov-card > * { position: relative; z-index: 2; }

.prov-card.green { border-color: rgba(34,197,94,0.25) !important; --card-glow: #22c55e; animation: pulseGreen 3s ease-in-out infinite alternate; }
.prov-card.gold { border-color: rgba(234,179,8,0.25) !important; --card-glow: #eab308; animation: pulseGold 3s ease-in-out infinite alternate; }
.prov-card.blue { border-color: rgba(59,130,246,0.25) !important; --card-glow: #3b82f6; animation: pulseBlue 3s ease-in-out infinite alternate; }
.prov-card.red { border-color: rgba(239,68,68,0.25) !important; --card-glow: #ef4444; animation: pulseRed 3s ease-in-out infinite alternate; }

/* Breathing glow */
@keyframes pulseGreen {
  0% { box-shadow: 0 0 6px rgba(34,197,94,0.08); }
  100% { box-shadow: 0 0 18px rgba(34,197,94,0.2), 0 0 35px rgba(34,197,94,0.08); }
}
@keyframes pulseGold {
  0% { box-shadow: 0 0 6px rgba(234,179,8,0.08); }
  100% { box-shadow: 0 0 18px rgba(234,179,8,0.2), 0 0 35px rgba(234,179,8,0.08); }
}
@keyframes pulseBlue {
  0% { box-shadow: 0 0 6px rgba(59,130,246,0.08); }
  100% { box-shadow: 0 0 18px rgba(59,130,246,0.2), 0 0 35px rgba(59,130,246,0.08); }
}
@keyframes pulseRed {
  0% { box-shadow: 0 0 6px rgba(239,68,68,0.08); }
  100% { box-shadow: 0 0 18px rgba(239,68,68,0.2), 0 0 35px rgba(239,68,68,0.08); }
}

/* Slow trace light on border */
.prov-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 35%,
    var(--card-glow) 50%,
    transparent 65%,
    transparent 100%
  );
  background-size: 300% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderTrace 6s linear infinite;
  z-index: 0;
  filter: drop-shadow(0 0 6px var(--card-glow));
  will-change: background-position;
  transform: translateZ(0);
}

@keyframes borderTrace {
  0% { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}

/* Hover - full glow */
.prov-card.green:hover { box-shadow: 0 0 25px rgba(34,197,94,0.35), 0 0 50px rgba(34,197,94,0.12) !important; border-color: rgba(34,197,94,0.5) !important; }
.prov-card.gold:hover { box-shadow: 0 0 25px rgba(234,179,8,0.35), 0 0 50px rgba(234,179,8,0.12) !important; border-color: rgba(234,179,8,0.5) !important; }
.prov-card.blue:hover { box-shadow: 0 0 25px rgba(59,130,246,0.35), 0 0 50px rgba(59,130,246,0.12) !important; border-color: rgba(59,130,246,0.5) !important; }
.prov-card.red:hover { box-shadow: 0 0 25px rgba(239,68,68,0.35), 0 0 50px rgba(239,68,68,0.12) !important; border-color: rgba(239,68,68,0.5) !important; }

/* ============================================
   SCROLL REVEAL - Provider Cards
   ============================================ */
.prov-card.scroll-hidden { opacity: 0; transform: translateY(30px); }
.prov-card.scroll-reveal { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }

.prov-score.counting { transition: none; }

@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes glPulseIcon {
  0%, 100% { transform: scale(1); opacity: 0.8; filter: drop-shadow(0 0 5px currentColor); }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 10px currentColor); }
}

@keyframes glPulseIcon {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes pulseGlowOpacity {
  0% { opacity: 0.1; }
  100% { opacity: 0.6; }
}

@keyframes glLaserSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes glCandyFlow {
  0% { background-position: 0 0; }
  100% { background-position: 28px 0; }
}

/* ============================================
   HORIZONTAL GAME LIST (PREMIUM UI)
   ============================================ */
.prov-grid.game-list-mode {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px;
}
@media (max-width: 900px) {
  .prov-grid.game-list-mode {
    grid-template-columns: 1fr !important;
  }
}

.gl-card {
  display: flex;
  background: linear-gradient(145deg, #111827 0%, #0f172a 100%);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.35); /* Visible frame */
  padding: 12px;
  gap: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  position: relative;
  align-items: stretch;
  min-height: 120px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateZ(0); /* Hardware acceleration */
}
/* The Glow Layer (GPU Accelerated) */
.gl-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gl-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255,255,255,0.6);
  z-index: 10;
}

/* Theme Green */
.gl-card.theme-green { border-color: rgba(34, 197, 94, 0.6); }
.gl-card.theme-green::before { 
  box-shadow: 0 0 40px #22c55e, inset 0 0 20px #22c55e; 
  opacity: 0.3;
}
.gl-card.theme-green:hover::before { opacity: 0.9; }

/* Theme Gold */
.gl-card.theme-gold { border-color: rgba(234, 179, 8, 0.6); }
.gl-card.theme-gold::before { 
  box-shadow: 0 0 40px #eab308, inset 0 0 20px #eab308; 
  opacity: 0.3;
}
.gl-card.theme-gold:hover::before { opacity: 0.9; }

/* Theme Red */
.gl-card.theme-red { border-color: rgba(239, 68, 68, 0.6); }
.gl-card.theme-red::before { 
  box-shadow: 0 0 40px #ef4444, inset 0 0 20px #ef4444; 
  opacity: 0.3;
}
.gl-card.theme-red:hover::before { opacity: 0.9; }

/* Left Column - Image */
.gl-img-box {
  position: relative;
  width: 110px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.gl-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gl-card:hover .gl-img-box img {
  transform: scale(1.1);
}
.gl-rank {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 16px;
  font-weight: 900;
  padding: 4px 10px;
  border-bottom-right-radius: 8px;
  z-index: 2;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.6);
  letter-spacing: 0.5px;
}
.theme-green .gl-rank { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.theme-gold .gl-rank { background: linear-gradient(135deg, #d97706, #eab308); color: #fff; }
.theme-red .gl-rank { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }

.gl-title-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 50%, transparent 100%);
  padding: 25px 6px 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
  z-index: 2;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}
.gl-prov-name {
  font-size: 9px;
  color: #e2e8f0;
  display: block;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* Middle Column - Stats */
.gl-stats-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,0.1);
  padding-right: 12px;
  min-width: 0;
}
.gl-label {
  font-size: 10px;
  color: #cbd5e1;
  text-transform: uppercase;
  margin-bottom: 2px;
  display: block;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.gl-conf-val {
  font-size: 34px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  margin-bottom: 8px;
}
.gl-conf-val i { 
  font-size: 20px; 
  opacity: 0.9; 
}

.gl-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.gl-trend i { font-size: 16px; font-weight: 900; }
.gl-trend-chart {
  width: 45px;
  height: 16px;
  margin-left: auto;
}

.gl-pattern {
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  letter-spacing: 0.5px;
}
.gl-pattern i { font-size: 14px; }

.theme-green .gl-conf-val, .theme-green .gl-trend, .theme-green .gl-pattern { color: #4ade80; text-shadow: 0 0 10px rgba(74,222,128,0.5); }
.theme-gold .gl-conf-val, .theme-gold .gl-trend, .theme-gold .gl-pattern { color: #facc15; text-shadow: 0 0 10px rgba(250,204,21,0.5); }
.theme-red .gl-conf-val, .theme-red .gl-trend, .theme-red .gl-pattern { color: #f87171; text-shadow: 0 0 10px rgba(248,113,113,0.5); }

/* Right Column - Details */
.gl-details-col {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.gl-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #f1f5f9;
  margin-bottom: 2px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.gl-bar-val { font-weight: 900; font-size: 11px; }
.theme-green .gl-bar-val { color: #4ade80; }
.theme-gold .gl-bar-val { color: #facc15; }
.theme-red .gl-bar-val { color: #f87171; }

.gl-bar-bg {
  height: 6px;
  background: rgba(0,0,0,0.5);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}
.gl-bar-fill {
  height: 100%;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transform: translateZ(0); /* Avoid repaints */
}
.gl-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%, transparent 100%);
  background-size: 200% 100%;
  animation: barShineSweep 3s ease-in-out infinite;
  will-change: background-position;
}
@keyframes barShineSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.theme-green .gl-bar-fill { 
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 30%, #bbf7d0 50%, #4ade80 70%, #16a34a 100%); 
}
.theme-gold .gl-bar-fill { 
  background: linear-gradient(90deg, #d97706 0%, #facc15 30%, #fef08a 50%, #facc15 70%, #d97706 100%); 
}
.theme-red .gl-bar-fill { 
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 30%, #fecaca 50%, #ef4444 70%, #b91c1c 100%); 
}

.gl-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 6px;
}
.gl-online {
  font-size: 11px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.theme-green .gl-online i { color: #4ade80; }
.theme-gold .gl-online i { color: #facc15; }
.theme-red .gl-online i { color: #f87171; }

.gl-btn {
  font-size: 10px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  color: #fff;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}
.theme-green .gl-btn { 
  border-color: #22c55e; 
  color: #4ade80; 
  background: rgba(34,197,94,0.1);
}
.theme-green .gl-btn:hover {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 0 20px rgba(34,197,94,0.8);
}

.theme-gold .gl-btn { 
  border-color: #eab308; 
  color: #facc15; 
  background: rgba(234,179,8,0.1);
}
.theme-gold .gl-btn:hover {
  background: #eab308;
  color: #fff;
  box-shadow: 0 0 20px rgba(234,179,8,0.8);
}

.theme-red .gl-btn { 
  border-color: #ef4444; 
  color: #f87171; 
  background: rgba(239,68,68,0.1);
}
.theme-red .gl-btn:hover {
  background: rgba(239,68,68,0.2);
  box-shadow: 0 0 20px rgba(239,68,68,0.8);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .gl-card {
    display: flex;
    flex-direction: row;
    padding: 10px;
    gap: 8px;
    min-height: 110px;
    align-items: stretch;
  }
  .gl-img-box {
    width: 90px;
    height: auto;
    min-height: 115px;
  }
  .gl-rank {
    font-size: 12px;
    padding: 2px 6px;
  }
  .gl-title-overlay {
    font-size: 10px;
    padding: 20px 4px 4px;
    line-height: 1.1;
  }
  .gl-prov-name {
    font-size: 8px;
  }
  .gl-stats-col {
    flex: 1;
    padding-right: 6px;
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    padding-bottom: 0;
    justify-content: center;
  }
  .gl-details-col {
    flex: 1.2;
    padding-top: 0;
    padding-left: 2px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .gl-label { font-size: 8px; margin-bottom: 1px; letter-spacing: 0; }
  .gl-conf-val {
    font-size: 20px;
    margin-bottom: 2px;
    gap: 4px;
    white-space: nowrap;
  }
  .gl-conf-val i { font-size: 12px; }
  .gl-trend { font-size: 10px; margin-bottom: 4px; gap: 4px; }
  .gl-trend i { font-size: 12px; }
  .gl-trend-chart { width: 35px; height: 12px; }
  .gl-pattern { font-size: 9px; }
  .gl-pattern i { font-size: 10px; }
  
  .gl-bar-row { font-size: 8px; margin-bottom: 1px; }
  .gl-bar-row span:first-child { letter-spacing: 0; }
  .gl-bar-val { font-size: 9px; }
  .gl-bar-bg { margin-bottom: 4px; height: 3px; }
  
  .gl-footer { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
  .gl-online { font-size: 9px; margin-bottom: 0; justify-content: center; padding-top: 2px; border-top: none; }
  .gl-btn {
    font-size: 10px;
    padding: 6px;
    width: 100%;
  }
}
