/* eu2you enhanced dark theme */
:root {
  --bg: #000000;
  --text: #D8D8D8;
  --muted: #A0A0A0;
  --primary: #5EE16A;
  --accent: #FF00FF;
  --max-w: 1200px;
  --gutter: 24px;
  --lh: 1.5;
  --border: #1a1a1a;
  --card-bg: #0c0c0c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  line-height: var(--lh);
  /* Hide scrollbars but keep scrolling functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  /* Performance optimizations */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide scrollbars for WebKit browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Hide scrollbars for scrollable containers */
.table-wrapper,
.card {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.table-wrapper::-webkit-scrollbar,
.card::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.fullscreen-body {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.85);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  will-change: background, border-color;
  transition: background 0.25s ease, border-color 0.25s ease;
  /* Performance: contain layout and paint */
  contain: layout style paint;
}

.header.fullscreen-header {
  z-index: 300;
  background: rgba(0,0,0,0.95);
  border-bottom-color: var(--primary);
}

.header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  min-height: 72px;
  transition: none;
}

.logo {
  color: var(--primary);
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: rgba(94,225,106,0.06);
  line-height: 1;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav a {
  display: inline-flex;
  align-items: center;
  height: 36px;
}

.btn:hover {
  background: rgba(94,225,106,0.12);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  font-weight: 600;
}

.btn.primary:hover {
  background: #6ef078;
  border-color: #6ef078;
}

.btn.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.accent {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(94,225,106,0.10);
}

.btn.accent:hover {
  background: rgba(94,225,106,0.18);
  text-decoration: none;
}

/* Sections */
.section {
  padding: 40px 0;
  scroll-margin-top: 84px;
}

/* Hero Section with Background Image */
.hero {
  text-align: center;
  padding: 0;
  min-height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  /* Performance optimizations */
  will-change: opacity;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  padding: 80px var(--gutter);
}

.hero h1 {
  font-size: 48px;
  line-height: 1.15;
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 760px;
  margin: 0 auto 16px;
  font-size: 18px;
  line-height: 1.6;
}

/* Exchange Block with Enhanced Fullscreen */
.exchange-block {
  min-height: 720px;
  display: flex;
  align-items: center;
  position: relative;
}

.exchange-block.fullscreen-active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200;
  background: #000000;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  border: none;
  animation: fadeInFullscreen 0.25s ease-out;
}

@keyframes fadeInFullscreen {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.exchange-container {
  width: 100%;
  max-width: 1400px;
  position: relative;
  z-index: 1;
  transition: max-width 0.3s ease, padding 0.3s ease;
}

.fullscreen-active .exchange-container {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
  padding: 40px var(--gutter);
}

.exchange-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: opacity, transform;
}

.fullscreen-active .exchange-header {
  position: absolute;
  top: 88px;
  right: var(--gutter);
  width: auto;
  margin: 0;
  z-index: 10;
}

.exchange-info {
  flex: 1;
  min-width: 280px;
  opacity: 1;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  visibility: visible;
  height: auto;
  overflow: hidden;
}

.fullscreen-active .exchange-info {
  opacity: 0;
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.fullscreen-btn {
  flex-shrink: 0;
  white-space: nowrap;
  position: relative;
  z-index: 10;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.fullscreen-active .fullscreen-btn {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(94,225,106,0.10);
}

.widget-card {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  z-index: 1;
  background: #0a0a0a;
  transition: min-height 0.3s ease, width 0.3s ease, max-width 0.3s ease, 
              margin-top 0.3s ease, padding 0.3s ease, 
              background 0.3s ease, box-shadow 0.3s ease;
  will-change: min-height, width, max-width, margin, padding, background, box-shadow;
}

.fullscreen-active .widget-card {
  min-height: 600px;
  width: 100%;
  max-width: 900px;
  border: 1px solid #1a1a1a;
  background: #000000;
  margin-top: 0;
  padding: 40px;
  box-shadow: 0 0 80px rgba(94,225,106,0.15);
}

.widget-card #extopWidget {
  width: 100%;
  transition: transform 0.3s ease;
}

.fullscreen-active .widget-card #extopWidget {
  transform: scale(1);
}

/* Fullscreen Close Button */
.fullscreen-close-btn {
  display: none;
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: rgba(94,225,106,0.10);
  border: 1px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  z-index: 400;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.fullscreen-close-btn:hover {
  background: rgba(94,225,106,0.20);
}

.fullscreen-close-btn svg {
  width: 20px;
  height: 20px;
}

/* Widget iframe styling */
#extopWidget,
#extopWidget iframe {
  position: relative;
  z-index: 2;
}

/* Card */
.card {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--card-bg);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: #262626;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.feature-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.feature-icon {
  width: 32px;
  height: 32px;
  border: 1px solid #262626;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  background: rgba(94,225,106,0.06);
}

.feature-title {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-desc {
  color: var(--muted);
  font-size: 14px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.stat-item {
  text-align: center;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.stat-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

/* Features List */
.features-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.features-list li {
  padding: 12px 0;
  padding-left: 28px;
  position: relative;
}

.features-list li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table thead {
  background: rgba(94,225,106,0.04);
}

.table th {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.table tbody tr {
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(94,225,106,0.02);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-item .q {
  cursor: pointer;
  font-weight: 600;
  position: relative;
  padding-right: 32px;
}

.faq-item .q:after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item .q.active:after {
  transform: rotate(45deg);
}

.faq-item .a {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Contact List */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-label {
  color: var(--muted);
  margin-right: 8px;
  font-weight: 600;
}

/* Footer */
.footer {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer p {
  margin: 8px 0;
}

/* Block Layout */
.blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 24px var(--gutter);
}

.block {
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 40px;
  transition: all 0.2s ease;
}

.block:hover {
  border-color: #262626;
}

.block .container {
  padding: 0;
}

.block h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 700;
}

/* Centered Page */
.page-centered .container {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.page-centered .card {
  margin: 0 auto;
  text-align: center;
}

.blocks.page-centered {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blocks.page-centered .section {
  width: 100%;
}

/* Responsive */
@media (max-width: 991px) {
  .blocks {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .exchange-block .exchange-container {
    max-width: var(--max-w);
  }
}

@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 36px;
  }
  .block {
    padding: 32px 24px;
  }
  .block h2 {
    font-size: 28px;
  }
  .exchange-header {
    flex-direction: column;
  }
  .fullscreen-active .exchange-container {
    padding: 32px var(--gutter);
    transition: padding 0.3s ease, margin-top 0.3s ease;
  }
  .fullscreen-active .widget-card {
    min-height: 500px;
    padding: 32px;
    transition: min-height 0.3s ease, padding 0.3s ease;
  }
  .fullscreen-active .exchange-header {
    top: 80px;
    transition: top 0.3s ease, right 0.3s ease;
  }
}

@media (max-width: 576px) {
  .header .bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px var(--gutter);
  }
  .logo {
    font-size: 16px;
  }
  .nav {
    width: auto;
    justify-content: flex-end;
    gap: 12px;
  }
  .nav a:not(.btn) {
    display: none;
  }
  .btn {
    width: auto;
    min-width: 120px;
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
  }
  .hero {
    min-height: 640px;
  }
  .hero-content {
    padding: 60px var(--gutter);
  }
  .hero h1 {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .hero p {
    font-size: 16px;
  }
  .exchange-block {
    min-height: 680px;
  }
  .block {
    padding: 24px 16px;
  }
  .block h2 {
    font-size: 24px;
  }
  .fullscreen-btn svg {
    margin-right: 6px;
  }
  .fullscreen-active .exchange-container {
    padding: 24px 16px;
    margin-top: 60px;
    transition: padding 0.3s ease, margin-top 0.3s ease;
  }
  .fullscreen-active .widget-card {
    min-height: calc(100vh - 140px);
    padding: 24px;
    transition: min-height 0.3s ease, padding 0.3s ease;
  }
  .fullscreen-active .widget-card #extopWidget {
    transform: scale(1);
  }
  .fullscreen-active .exchange-header {
    top: 68px;
    right: 16px;
    transition: top 0.3s ease, right 0.3s ease;
  }
  .fullscreen-close-btn {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .fullscreen-close-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 992px) {
  .hero {
    min-height: 760px;
  }
  .hero-content {
    padding: 100px var(--gutter);
  }
  .hero h1 {
    font-size: 56px;
  }
}