:root {
  --bg: #02040d;
  --bg-soft: rgba(14, 25, 58, 0.8);
  --surface: rgba(11, 19, 47, 0.92);
  --surface-strong: rgba(6, 11, 28, 0.96);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f7f9ff;
  --text-muted: #9db1dd;
  --accent: #4dc2ff;
  --accent-strong: #10a4ff;
  --success: #65dd7a;
  --warning: #f8c742;
  --danger: #ff5d5d;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: transparent !important;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

#bgVideo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(0.45) saturate(1.15);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 34, 77, 0.35), rgba(2, 4, 13, 0.95) 58%);
  z-index: -1;
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 28px 24px 48px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.brand {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-links a,
.button,
.button-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 12px 20px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.button:hover,
.button-inline:hover {
  transform: translateY(-1px);
  border-color: rgba(77, 194, 255, 0.35);
}

.button.primary {
  background: linear-gradient(135deg, rgba(77, 194, 255, 0.15), rgba(16, 164, 255, 0.22));
  border-color: rgba(77, 194, 255, 0.4);
  color: var(--accent);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.section {
  margin-bottom: 34px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.section-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.card-content {
  padding: 24px;
}

.card-hero {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(20, 55, 122, 0.8), rgba(2, 4, 13, 0.8));
}

.card-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 36%);
}

.card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.hero-copy {
  display: grid;
  gap: 16px;
  max-width: 700px;
  margin-top: 12px;
}

.hero-copy p {
  max-width: 720px;
  color: var(--text-muted);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.auth-panel,
.panel {
  background: rgba(7, 16, 33, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-panel {
  max-width: 520px;
  margin: 0 auto;
}

.form-group {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}

.form-group input:focus {
  border-color: rgba(77, 194, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(77, 194, 255, 0.12);
}

.tab-switcher {
  display: flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.tab-switcher button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 14px 16px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-switcher button.active {
  color: var(--text);
  background: rgba(77, 194, 255, 0.12);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-group button {
  flex: 1 1 120px;
  min-width: 110px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
}

.status-pill.pending { background: rgba(255, 196, 0, 0.14); color: var(--warning); }
.status-pill.approved { background: rgba(69, 189, 116, 0.12); color: var(--success); }
.status-pill.rejected { background: rgba(255, 93, 93, 0.14); color: var(--danger); }

.request-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}

.request-row small {
  color: var(--text-muted);
}

.request-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.input-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.input-inline input {
  flex: 1;
}

.panel-grid {
  display: grid;
  gap: 18px;
}

.hidden {
  display: none !important;
}

#pageNotice {
  display: none;
  color: var(--text);
  font-weight: 700;
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(11, 21, 48, 0.9);
  border: 1px solid rgba(77, 194, 255, 0.18);
}

#pageNotice.visible {
  display: block;
}

@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-panel { padding: 42px; }
}

@media (max-width: 768px) {
  .page { padding: 20px 12px 28px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .nav-links { width: 100%; justify-content: flex-start; gap: 8px; }
  .nav-links a { font-size: 0.85rem; padding: 10px 14px; }
  .auth-panel { padding: 24px; }
}

@media (max-width: 540px) {
  .card-hero { min-height: 180px; }
  .section-title h2 { font-size: 1.5rem; }
}

/* Card link hover transitions */
.card-link {
  transition: transform 0.2s ease;
}
.card-link:hover {
  transform: translateY(-4px);
}
.card-link:hover .card {
  border-color: rgba(77, 194, 255, 0.35) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

/* RGB Glow Animations & Casino Theme Styles */
.rgb-text {
  background: linear-gradient(270deg, #ff1a40, #a155ff, #4dc2ff, #65dd7a, #ff1a40);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rgb-glow 6s ease infinite;
}

@keyframes rgb-glow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.rgb-border {
  position: relative;
  border-radius: var(--radius);
  z-index: 1;
}

.rgb-border::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, #ff1a40, #a155ff, #4dc2ff, #65dd7a, #ff1a40);
  z-index: -1;
  background-size: 400%;
  border-radius: calc(var(--radius) + 2px);
  animation: rgb-glow 12s linear infinite;
  opacity: 0.6;
  filter: blur(8px);
}

/* Banner Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.carousel-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}

.carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-indicator {
  width: 24px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: var(--accent);
  width: 32px;
  box-shadow: 0 0 10px var(--accent);
}

/* Admin Banner Table Styles */
.admin-banner-img {
  width: 120px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.admin-banner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  margin-bottom: 8px;
}

/* Advanced Animated RGB Background */
.animated-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  overflow: hidden;
  background: #02040d;
}

.animated-bg::before,
.animated-bg::after {
  content: '';
  position: absolute;
  width: 60vw;
  height: 60vw;
  min-width: 400px;
  min-height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-bg::before {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, #a155ff 0%, transparent 70%);
}

.animated-bg::after {
  bottom: -10%;
  right: -10%;
  background: radial-gradient(circle, #4dc2ff 0%, transparent 70%);
  animation-delay: -10s;
  animation-duration: 25s;
}

.animated-bg .orb-3 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40vw;
  height: 40vw;
  min-width: 300px;
  min-height: 300px;
  background: radial-gradient(circle, #ff1a40 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  transform: translate(-50%, -50%);
  animation: float-center 15s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(60deg) scale(2);
  transform-origin: bottom center;
  animation: gridMove 20s linear infinite;
  z-index: 1;
}

.flying-plane {
  position: absolute;
  opacity: 0;
  z-index: 2;
  filter: drop-shadow(0 0 10px currentColor);
  animation: fly-plane linear infinite;
}

.plane-1 {
  bottom: 10%;
  left: -10%;
  width: 45px;
  height: 45px;
  animation-duration: 7s;
  animation-delay: 0s;
  color: #ff1a40;
}

.plane-2 {
  bottom: 40%;
  left: -20%;
  width: 65px;
  height: 65px;
  animation-duration: 11s;
  animation-delay: 3s;
  color: #4dc2ff;
}

.plane-3 {
  bottom: 25%;
  left: -15%;
  width: 35px;
  height: 35px;
  animation-duration: 9s;
  animation-delay: 6s;
  color: #a155ff;
}

@keyframes fly-plane {
  0% { transform: translate(0, 0) rotate(25deg); opacity: 0; }
  10% { opacity: 0.8; }
  85% { opacity: 0.8; }
  100% { transform: translate(120vw, -90vh) rotate(25deg); opacity: 0; }
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20%, 10%) scale(1.1); }
  100% { transform: translate(-10%, 20%) scale(0.9); }
}

@keyframes float-center {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -70%) scale(1.2); }
  100% { transform: translate(-70%, -30%) scale(0.8); }
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 1000px; }
}

/* Mobile Header Override */
@media (max-width: 768px) {
  .header-bar {
    flex-wrap: wrap !important;
    gap: 12px;
    padding: 12px 16px !important;
  }
  .header-right {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
    gap: 12px !important;
  }
  .balance-display {
    padding: 6px 12px !important;
    font-size: 0.9rem;
  }
  .balance-plus-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 1rem !important;
  }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    display: none !important;
  }
  
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, #5b42bf 0%, #352187 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
  }
  
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    gap: 4px;
    flex: 1;
    height: 100%;
  }
  
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button:hover,
  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav button:active,
  .mobile-bottom-nav a:active {
    color: #ffca28; /* Gold active color matching the image */
  }
  
  .mobile-bottom-nav img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    transition: transform 0.2s ease;
  }

  .mobile-bottom-nav a:hover img {
    transform: translateY(-2px);
  }
  
  /* Center Floating Button */
  .mobile-bottom-nav .nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    width: 68px;
    height: 68px;
    background: radial-gradient(circle at 50% 30%, #ce9eff 0%, #682cf5 70%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(104, 44, 245, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    border: 6px solid #02040d; /* Simulates the cutout curve */
    z-index: 10;
    color: #fff;
  }

  .mobile-bottom-nav .nav-center img {
    width: 45px;
    height: 45px;
    margin-bottom: 2px;
  }

  .nav-center-text {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
  }

  .nav-spacer {
    flex: 0.8;
  }
  
  .page {
    padding-bottom: 90px !important;
  }
}

