/* Casea Casino - Custom Styles */

/* ===== CSS Variables ===== */
:root {
  --bg-dark: #1a110a;
  --bg-card: #2d1f14;
  --bg-card-hover: #3d2a1a;
  --accent-green: #22c55e;
  --accent-green-hover: #16a34a;
  --accent-gold: #f59e0b;
  --text-primary: #fef3e2;
  --text-muted: #a89080;
  --border-color: #4a3525;
}

/* ===== Base Prose Readability ===== */
.prose {
  line-height: 1.75;
  color: var(--text-primary);
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* ===== Shimmer Animation ===== */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--accent-green) 0%,
    var(--accent-gold) 50%,
    var(--accent-green) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease-in-out infinite;
}

/* ===== Float Animation ===== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

.float-delayed {
  animation: float 4s ease-in-out infinite;
  animation-delay: 1s;
}

.float-slow {
  animation: float 6s ease-in-out infinite;
}

/* ===== Glow Effects ===== */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.6);
  }
}

.glow-pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

.glow-green {
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.glow-gold {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* ===== Card Styles ===== */
.card-glass {
  background: linear-gradient(135deg, rgba(45, 31, 20, 0.9) 0%, rgba(26, 17, 10, 0.95) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ===== Button Styles ===== */
.btn-cta {
  background: linear-gradient(135deg, var(--accent-green) 0%, #15803d 100%);
  color: white;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-cta:hover {
  background: linear-gradient(135deg, var(--accent-green-hover) 0%, #166534 100%);
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-green);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid var(--accent-green);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--accent-green);
  color: var(--bg-dark);
}

/* ===== Navigation Pills ===== */
.nav-pill {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-pill:hover {
  background: var(--accent-green);
  color: var(--bg-dark);
  border-color: var(--accent-green);
}

/* ===== Tab Styles ===== */
.tab-btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.75rem 0.75rem 0 0;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-bottom: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--bg-card-hover);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== Table Styles ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg-card);
  color: var(--accent-gold);
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: rgba(45, 31, 20, 0.5);
}

/* ===== Badge Styles ===== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-rtp {
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent-green);
}

.badge-jackpot {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
}

.badge-bonus {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.badge-popular {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ===== Star Rating ===== */
.stars {
  color: var(--accent-gold);
  letter-spacing: 2px;
}

/* ===== Smooth Scroll ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ===== Responsive Table Wrapper ===== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Focus States for Accessibility ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* ===== Selection Color ===== */
::selection {
  background: var(--accent-green);
  color: var(--bg-dark);
}

/* ===== Left Collapsible Sidebar ===== */
.sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: 220px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
  border-right: 1px solid var(--border-color);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
}

@media (min-width: 640px) {
  .sidebar {
    top: 80px;
  }
}

/* Mobile: collapse by default */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-220px);
  }
}

.sidebar-collapsed {
  transform: translateX(-220px);
}

.sidebar-expanded {
  transform: translateX(0);
}

.sidebar-toggle {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 45;
  width: 36px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-green) 0%, #15803d 100%);
  border: none;
  border-radius: 0 14px 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 3px 0 12px rgba(34, 197, 94, 0.4);
}

.sidebar-toggle:hover {
  background: linear-gradient(135deg, #16a34a 0%, #166534 100%);
  box-shadow: 3px 0 20px rgba(34, 197, 94, 0.6);
}

.sidebar-toggle.sidebar-open {
  left: 220px;
}

/* Desktop: toggle starts at sidebar edge since sidebar is open by default */
@media (min-width: 1024px) {
  .sidebar-toggle {
    left: 220px;
  }
}

.sidebar-toggle .icon-open {
  display: block;
}
.sidebar-toggle .icon-close {
  display: none;
}
.sidebar-toggle.sidebar-open .icon-open {
  display: none;
}
.sidebar-toggle.sidebar-open .icon-close {
  display: block;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  border-left-color: var(--accent-green);
}

.sidebar-link-vip {
  color: var(--accent-gold);
}

.sidebar-link-vip:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.page-wrapper {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
  .page-wrapper {
    margin-left: 220px;
  }
  .page-wrapper.sidebar-closed {
    margin-left: 0;
  }
  .page-wrapper.sidebar-open {
    margin-left: 220px;
  }
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none;
  }
}
