/* Global Styles - Premium Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  --color-bg-dark: #050507;
  --color-bg-card: #0e0e12;
  --color-bg-card-hover: #13131a;

  --color-primary: #8b5cf6;
  --color-secondary: #ec4899;
  --color-accent: #06b6d4;

  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(14, 14, 18, 0.6);
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-dark) !important;
  color: #e4e4e7;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* Enhanced Background System */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08), transparent 25%);
  z-index: 0;
  pointer-events: none;
  filter: blur(60px);
}

/* Noise Texture for Texture/Depth - Optimized */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  /* Lightweight static noise pattern */
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAA5OTkAAABERERmZmYzMzOZmZlVVVU5OTl2aJ1DAAAAB3RSTlMABDQzMzMzM7x4+qgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfmBwoXLS0O/H3dAAAAhklEQVQ4y6XTwQ3AIAwE0Qc0QAZo/wWzB5rQe+0vY4E4f0hZ0Z8+B6sN2Ag7YqewJ3YKe2KnsCd2Cntip7Andgp7YqewJ3YKe2KnsCd2Cntip7Andgp7YqewJ3YKe2KnsCd2Cntip7Andgp7YqewJ3YKe2KnsCd2Cntip7Andgp7YqewJ3YKe2KnsCd2CnsB4bM/0Ww0i1YAAAAASUVORK5CYII=");
  opacity: 0.03;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: overlay;
}

#root {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Utility Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.gradient-text {
  background: linear-gradient(135deg, #c084fc 0%, #f472b6 50%, #f87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-animate {
  background: linear-gradient(to right, #c084fc, #f472b6, #f87171, #c084fc);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-flow 5s linear infinite;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Container Max Widths */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }
}

/* Feature Card */
.feature-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(20, 20, 25, 0.6) 0%, rgba(14, 14, 18, 0.6) 100%);
}

.feature-card:hover {
  transform: translateY(-5px);
  inset: -5px;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem !important;
  }

  h2 {
    font-size: 2rem !important;
  }

  @keyframes shimmer {
    100% {
      transform: translateX(100%);
    }
  }

  .animate-shimmer {
    animation: shimmer 2s infinite;
  }

  @keyframes pulse-slow {

    0%,
    100% {
      opacity: 1;
      filter: brightness(1);
    }

    50% {
      opacity: 0.7;
      filter: brightness(1.3);
    }
  }

  .animate-pulse-slow {
    animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  /* Responsive Table Styles */
  @media (max-width: 768px) {
    .arbiscan-table {
      display: block;
    }

    .arbiscan-table thead {
      display: none;
    }

    .arbiscan-table tbody {
      display: block;
      width: 100%;
    }

    .arbiscan-table tr {
      display: block;
      background: rgba(14, 14, 18, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      margin-bottom: 16px;
      padding: 16px;
      position: relative;
      overflow: hidden;
    }

    .arbiscan-table tr:hover {
      background: rgba(19, 19, 26, 0.8);
      border-color: rgba(139, 92, 246, 0.3);
    }

    .arbiscan-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border: none;
      text-align: right;
      width: 100%;
    }

    .arbiscan-table td::before {
      content: attr(data-label);
      font-weight: 600;
      color: #9ca3af;
      font-size: 0.875rem;
      margin-right: 16px;
      text-align: left;
    }

    .arbiscan-table td[data-label="Zdarzenie"] {
      display: block;
      text-align: left;
      padding-bottom: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      margin-bottom: 12px;
    }

    .arbiscan-table td[data-label="Zdarzenie"]::before {
      display: none;
    }

    .arbiscan-table td[data-label="Akcja"] {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      justify-content: center;
    }

    .arbiscan-table td[data-label="Akcja"]::before {
      display: none;
    }

    .arbiscan-table td[data-label="Akcja"] button {
      width: 100%;
      padding: 12px;
    }

    .event-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .event-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .event-name {
      font-size: 1rem;
      font-weight: 600;
      color: white;
    }
  }
}

/* Smooth color fade animation for logo */
@keyframes color-fade {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }

  50% {
    filter: hue-rotate(15deg) brightness(1.05);
  }

  100% {
    filter: hue-rotate(0deg) brightness(1);
  }
}

.animate-color-fade {
  animation: color-fade 5s ease-in-out infinite;
}

/* Header Button Gradient Animation */
.btn-header-gradient {
  position: relative;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  /* Indigo to Purple */
  color: white;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
  border: none;
}

.btn-header-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  /* Pink to Purple */
  z-index: -1;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.btn-header-gradient:hover::before {
  opacity: 1;
}

.btn-header-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
  /* Pink glow */
}

/* Button Styles - Theme Consistent */
.btn-primary {
  position: relative;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  /* Indigo to Purple */
  color: white;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  border: none;
  isolation: isolate;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  z-index: 1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Hover Glow Effect */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  border-radius: 9999px;
  z-index: -1;
  filter: blur(0px);
  opacity: 0;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(236, 72, 153, 0.4), 0 10px 10px -5px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover::before {
  filter: blur(20px);
  opacity: 0.6;
  inset: -5px;
  /* Ensure background is NOT clipped to text */
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
}

/* 3. General Glass/Blur Protection */
.glass-panel,
[class*="glass"],
[class*="backdrop-blur"] {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  background-color: rgba(14, 14, 18, 0.6) !important;
  /* Enforce semi-transparent dark bg */
}