
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Rothek';
  src: url('/fonts/Trial-Rothek-Normal.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

:root {
  /* Palette */
  --bg-main: #000000;
  --bg-secondary: #260B3F;
  --primary: #9025E1;
  --secondary: #96FBC4;
  --accent: #F9F586;
  --text: #F4EED0;

  --bg-gradient: radial-gradient(at top center, var(--bg-secondary), var(--bg-main));
  
  --muted: rgba(244, 238, 208, 0.6);          
  
  --accent-glow: rgba(144, 37, 225, 0.35);
  --live: #ff3b30;           
  
  --glass-bg: rgba(38, 11, 63, 0.4);
  --glass-bg-hover: rgba(38, 11, 63, 0.7);
  
  --glass-border: 1px solid rgba(150, 251, 196, 0.2);
  --glass-highlight: 1px solid rgba(150, 251, 196, 0.4);
  
  --blur-val: 20px;

  --radius: 24px;            
  --radius-pill: 100px;      
  
  --shadow-sm: 0 4px 20px -4px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 40px -8px rgba(144, 37, 225, 0.2);
  --shadow-hover: 0 20px 50px -12px rgba(144, 37, 225, 0.4);
  --shadow-modal: 0 40px 80px rgba(0,0,0,0.5);
  
  --font-main: 'IBM Plex Mono', monospace;
  --font-display: 'Rothek', sans-serif;
}

/* =========================================
   2. GLOBAL RESET & BASE
   ========================================= */

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  
  background: var(--bg-main); 
  background-image: var(--bg-gradient);
  background-attachment: fixed; 
}

body::before { display: none; }

a { 
  color: var(--secondary); 
  text-decoration: none; 
  transition: all 0.2s ease; 
}
a:hover { color: var(--accent); text-shadow: 0 0 12px var(--accent-glow); }

.container { 
  max-width: 1240px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

/* =========================================
   3. HEADER (Floating Liquid Capsule)
   ========================================= */

.site-header {
  padding-top: 24px;
  padding-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  pointer-events: none;
}

.header-inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  
  background: rgba(38, 11, 63, 0.6);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  
  border: 1px solid rgba(150, 251, 196, 0.15);
  border-top: 1px solid rgba(150, 251, 196, 0.3);
  border-left: 1px solid rgba(150, 251, 196, 0.3);
  
  border-radius: var(--radius-pill);
  padding: 8px 12px 8px 24px;
  box-shadow: var(--shadow-md);
}


.brand { display: flex; align-items: center; }
.brand-link { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-transform: uppercase;
}
.brand-accent { color: var(--primary); }


.nav-center {
  justify-self: center;
  display: flex;
  
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.nav-link {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-link:hover { color: var(--text); background: rgba(144, 37, 225, 0.1); }

.nav-link.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(144, 37, 225, 0.4);
}


.btn {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  
  box-shadow: 
    0 8px 20px -6px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn:hover {
  background: #a24bf0;
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px -8px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-wallet {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.5px;
  background: var(--secondary);
  color: var(--bg-main);
  padding: 14px 28px;
  box-shadow: 0 4px 16px rgba(150, 251, 196, 0.2);
  transition: all 0.2s ease;
  font-weight: 700;
}

.btn-wallet:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 245, 134, 0.3);
}

.btn-wallet.is-connected {
  background: transparent;
  color: var(--secondary);
  box-shadow: none;
  border: 1px solid var(--secondary);
}

.btn-wallet.is-connected:hover {
  background: rgba(150, 251, 196, 0.1);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* =========================================
   4. MAIN CONTENT
   ========================================= */

.section-title-row {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  margin: 40px 0 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--secondary);
  margin: 0;
  letter-spacing: -1px;
  text-transform: uppercase;
  
  text-shadow: 0 0 10px rgba(150, 251, 196, 0.3);
}

.icon-refresh {
  width: 44px; height: 44px;
  border: 1px solid rgba(150, 251, 196, 0.2);
  border-radius: 50%;
  background: rgba(38, 11, 63, 0.4);
  backdrop-filter: blur(4px);
  -webkit-mask: url('/img/refresh.svg') center / 20px 20px no-repeat;
  mask: url('/img/refresh.svg') center / 20px 20px no-repeat;
  background-color: var(--secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.icon-refresh:hover {
  background-color: var(--accent);
  transform: rotate(90deg) scale(1.1);
}

/* =========================================
   5. GRID & CARDS (Glass Cards)
   ========================================= */

.grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: 60px;
}

@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border: 1px solid rgba(150, 251, 196, 0.1);
  border-top-color: rgba(150, 251, 196, 0.2);
  border-left-color: rgba(150, 251, 196, 0.2);
  
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
  animation: cardFadeIn 0.6s ease forwards;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-10px);
  background: var(--glass-bg-hover);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  z-index: 2;
}

.card-media {
  width: calc(100% - 20px);
  margin: 10px 10px 0 10px;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  
  background: rgba(0,0,0,0.2);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-img { transform: scale(1.08); }

.card-badge {
  position: absolute;
  top: 18px; right: 18px;
  background: rgba(255, 59, 48, 0.9);
  color: #fff;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
  backdrop-filter: blur(4px);
  font-family: var(--font-main);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  font-family: var(--font-display);
}

.addr {
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--accent);
  background: rgba(144, 37, 225, 0.2); 
  border: 1px solid rgba(144, 37, 225, 0.3);
  padding: 6px 12px;
  border-radius: 12px;
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
}


.no-streams {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(150, 251, 196, 0.1);
  border-radius: var(--radius);
  color: var(--muted);
}
.no-streams p { margin: 6px 0; font-size: 18px; }

/* =========================================
   6. FOOTER
   ========================================= */

.site-footer {
  border-top: 1px solid rgba(150, 251, 196, 0.1);
  margin-top: auto;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(38, 11, 63, 0.6);
  border: 1px solid rgba(150, 251, 196, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer-social:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(150, 251, 196, 0.3);
}

.footer-x-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.footer-social:hover .footer-x-icon {
  filter: brightness(0);
  opacity: 1;
}

/* =========================================
   7. WALLET MODAL & POPOVER
   ========================================= */


.wallet-pop {
  position: absolute;
  top: 0; left: 0;
  width: 260px;
  
  background: rgba(38, 11, 63, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(150, 251, 196, 0.2);
  
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  border-radius: 20px;
  padding: 20px;
  z-index: 110;
  opacity: 0; 
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.wallet-pop.is-open {
  opacity: 1; 
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.wallet-pop__row {
  display: flex; 
  align-items: center; 
  margin-bottom: 16px;
  font-size: 14px;
}

.wallet-pop__actions {
  display: flex;
  justify-content: flex-end;
}

.btn-disconnect {
  background: none;
  border: none;
  color: var(--live);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.btn-disconnect:hover { text-decoration: underline; }



.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8); 
  backdrop-filter: blur(12px); 
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  
  background: #1a052b; /* Darker background for modal */
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(150, 251, 196, 0.2);
  
  border-radius: 32px;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.modal.is-open .modal__card {
  transform: translateY(0);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(150, 251, 196, 0.1);
}

.modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--secondary);
}

.modal__close {
  background: rgba(150, 251, 196, 0.1);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: 0.2s;
}
.modal__close:hover {
  background: var(--secondary);
  color: var(--bg-main);
}

.modal__body {
  padding: 32px;
}

.wallet-list {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.wallet-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  background: rgba(38, 11, 63, 0.5);
  border: 1px solid rgba(150, 251, 196, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  text-align: left;
}

.wallet-item:hover {
  background: rgba(38, 11, 63, 0.8);
  border-color: var(--primary);
  box-shadow: 0 8px 20px -4px rgba(144, 37, 225, 0.2);
  transform: translateY(-2px);
}

.wallet-item:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.wallet-item.is-loading {
  justify-content: center;
  gap: 10px;
  color: var(--secondary);
}

.modal__hint {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

.modal__error {
  color: var(--live);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  background: rgba(255, 59, 48, 0.1);
  padding: 10px;
  border-radius: 12px;
}

.spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin-refresh 0.8s linear infinite;
}

/* =========================================
   8. ANIMATIONS
   ========================================= */

@keyframes cardFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes spin-refresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
