/* Stats Overview Styling */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stats-card {
    background: var(--cyber-gradient-dark);
    border: 1px solid var(--cyber-border);
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
    text-align: center;
}

.stats-card-title {
    font-family: var(--font-headers);  /* Orbitron font */
    font-size: 14px;
    color: var(--cyber-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stats-card-value {
    font-family: var(--font-data);    /* JetBrains Mono */
    font-size: 24px;
    font-weight: 700;
    color: var(--cyber-primary);
    text-shadow: var(--glow-text);
}

/* Add hover effect */
.stats-card:hover {
    border-color: var(--cyber-primary);
    box-shadow: 0 0 15px rgba(0, 255, 159, 0.2);
}

/* Responsive layout for stats */
@media (max-width: 992px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
}

/**
 * Main Styles for HashMonkey Mining Pool Frontend
 * Cyberpunk Theme
 */

/* ---------------------------------------------
 * Base Styles and Resets
 * --------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--cyber-text);
  background-color: var(--cyber-background-darker);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--cyber-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--timing-function),
              text-shadow var(--duration-fast) var(--timing-function);
}

a:hover, a:focus {
  color: var(--cyber-primary-bright);
  text-shadow: var(--glow-text);
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headers);
  line-height: 1.2;
  margin-bottom: 0.5em;
  font-weight: 700;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Container for main content */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---------------------------------------------
 * Cyberpunk Background Elements
 * --------------------------------------------- */
.cyber-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-index-background);
  pointer-events: none;
  overflow: hidden;
}

/* Scanlines effect */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, var(--scanline-opacity)) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 100% 2px;
  animation: scanlines var(--scanline-speed) linear infinite;
  opacity: 0.15;
}

/* Grid pattern */
.grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--cyber-border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--cyber-border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.05;
}

/* Vignette effect */
.vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.8);
}

/* ---------------------------------------------
 * Header Styles
 * --------------------------------------------- */
.main-header {
  background-color: var(--cyber-background);
  border-bottom: 1px solid var(--cyber-border);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  padding: var(--space-xxs) 0;
  position: sticky;
  top: 0;
  z-index: var(--z-index-floating);
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 var(--space-sm);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 24px;
  margin-right: var(--space-xs);
  filter: drop-shadow(0 0 5px var(--cyber-primary));
}

.site-title {
  font-family: var(--font-headers);
  font-size: var(--font-size-large);
  font-weight: 700;
  color: var(--cyber-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.title-accent {
  color: var(--cyber-primary);
}

/* Main Navigation */
.main-nav ul {
  display: flex;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: var(--space-xxs) var(--space-xs);
  color: var(--cyber-text);
  font-family: var(--font-headers);
  font-size: var(--font-size-small);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: all var(--duration-fast) var(--timing-function);
  line-height: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--cyber-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-medium) var(--timing-function);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--cyber-text);
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.active {
  color: var(--cyber-primary);
  text-shadow: var(--glow-text);
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  gap: var(--space-xxs);
  line-height: 1;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--cyber-error);
}

.status-indicator.online {
  background-color: var(--cyber-success);
  box-shadow: 0 0 8px var(--cyber-success);
}

.status-text {
  font-size: var(--font-size-small);
  color: var(--cyber-text-muted);
  line-height: 1;
}

/* ---------------------------------------------
 * Main Content Area
 * --------------------------------------------- */
.main-content {
    flex: 1;
    padding: var(--space-xl) 0;
    background-color: var(--cyber-background);
    min-height: 100vh;
    position: relative;
}

/* Views System */
.view-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Dashboard View */
.dashboard-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--cyber-background);
    z-index: 1000;
    overflow-y: auto;
}

.dashboard-view.active {
    display: block;
}

/* Pools Section */
.pools-section {
    display: block;
    position: relative;
    z-index: 1;
}

/* When dashboard is active, hide other content */
.dashboard-view.active ~ .stats-overview,
.dashboard-view.active ~ .pools-section {
    display: none;
}

.view-title {
  font-size: var(--font-size-xxlarge);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.cyber-glow {
  color: var(--cyber-primary);
  text-shadow: var(--glow-text);
}

/* Section Titles */
.section-title {
  font-size: var(--font-size-large);
  margin: var(--space-xl) 0 var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--cyber-border);
  color: var(--cyber-text);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100px;
  height: 2px;
  background-color: var(--cyber-primary);
  box-shadow: var(--glow-small);
}

/* Stats Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stats-card {
  background: var(--cyber-gradient-dark);
  border: 1px solid var(--cyber-border);
  border-radius: var(--border-radius-md);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-medium) var(--timing-function),
              box-shadow var(--duration-medium) var(--timing-function);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  border-color: var(--cyber-primary);
}

.stats-card-title {
  font-family: var(--font-headers);
  font-size: 14px;
  color: var(--cyber-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stats-card-value {
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 700;
  color: var(--cyber-primary);
  text-shadow: var(--glow-text);
  transition: color 0.3s ease;
}

/* Add animation for value updates */
.stats-card-value.animated {
  animation: value-update 0.3s ease-in-out;
}

@keyframes value-update {
  0% {
    color: var(--cyber-secondary);
    text-shadow: var(--glow-medium);
  }
  100% {
    color: var(--cyber-primary);
    text-shadow: var(--glow-text);
  }
}

/* Pools Grid */
.pools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.pool-card {
  background: var(--cyber-gradient-dark);
  border: 1px solid var(--cyber-border);
  border-radius: var(--border-radius-md);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-medium) var(--timing-function),
              box-shadow var(--duration-medium) var(--timing-function),
              border-color var(--duration-medium) var(--timing-function);
  overflow: hidden;
  height: 250px;
  position: relative;
}

.pool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-color: var(--cyber-primary);
}

/* Loading state */
.pool-card.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-pulse {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    var(--cyber-background-lighter) 25%, 
    var(--cyber-background) 50%, 
    var(--cyber-background-lighter) 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
}

/* Recent Blocks */
.recent-blocks {
  background: var(--cyber-gradient-dark);
  border: 1px solid var(--cyber-border);
  border-radius: var(--border-radius-md);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  margin-top: var(--space-lg);
}

/* Cyber Loading */
.cyber-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  color: var(--cyber-text-muted);
}

.loading-dots {
  margin-top: var(--space-xs);
}

.loading-dots span {
  animation: loading-dots 1.5s infinite;
  display: inline-block;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ---------------------------------------------
 * Footer Styles
 * --------------------------------------------- */
.main-footer {
  background: linear-gradient(to bottom, 
    var(--cyber-background-darker) 0%,
    var(--cyber-background) 100%
  );
  border-top: 1px solid var(--cyber-border);
  padding: 10px 0;
  position: relative;
  overflow: hidden;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--cyber-primary) 50%, 
    transparent 100%
  );
  opacity: 0.2;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo-small {
  height: 16px;
}

.footer-title {
  font-family: var(--font-headers);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyber-text-muted);
}

.footer-copyright {
  color: var(--cyber-text-dim);
  font-size: 11px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------
 * Notification System
 * --------------------------------------------- */
.notification-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-index-tooltip);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
}

.notification {
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slide-in-right var(--duration-medium) var(--timing-function);
}

.notification.info {
  background-color: var(--cyber-info);
  color: var(--cyber-background-darker);
}

.notification.success {
  background-color: var(--cyber-success);
  color: var(--cyber-background-darker);
}

.notification.warning {
  background-color: var(--cyber-warning);
  color: var(--cyber-background-darker);
}

.notification.error {
  background-color: var(--cyber-error);
  color: var(--cyber-text);
}

.notification-close {
  margin-left: var(--space-md);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--timing-function);
}

.notification-close:hover {
  opacity: 1;
}

/* ---------------------------------------------
 * Animations
 * --------------------------------------------- */

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes loading-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes loading-dots {
  0%, 20% {
    transform: translateY(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
  80%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
}

/* Glitch effect for text */
@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 var(--cyber-primary), -0.05em -0.025em 0 var(--cyber-accent);
    clip-path: rect(25px, 9999px, 10px, 0);
  }
  25% {
    text-shadow: 0.05em 0 0 var(--cyber-primary), -0.05em -0.025em 0 var(--cyber-accent);
    clip-path: rect(85px, 9999px, 70px, 0);
  }
  50% {
    text-shadow: -0.05em -0.025em 0 var(--cyber-primary), 0.025em 0.025em 0 var(--cyber-accent);
    clip-path: rect(60px, 9999px, 40px, 0);
  }
  75% {
    text-shadow: -0.05em -0.025em 0 var(--cyber-primary), 0.025em 0.025em 0 var(--cyber-accent);
    clip-path: rect(35px, 9999px, 50px, 0);
  }
  100% {
    text-shadow: 0.05em 0 0 var(--cyber-primary), -0.05em -0.025em 0 var(--cyber-accent);
    clip-path: rect(10px, 9999px, 85px, 0);
  }
}

/* Cyberpunk data stream animation */
@keyframes data-stream {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 0% 100%;
  }
}

/* ---------------------------------------------
 * Media Queries for Responsiveness
 * --------------------------------------------- */

/* Medium screens */
@media (max-width: 992px) {
  .main-header .container {
    flex-direction: column;
    gap: var(--space-xxs);
  }
  
  .logo-container {
    margin-bottom: var(--space-xxs);
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
  }
  
  .connection-status {
    margin-top: var(--space-xxs);
  }
  
  .stats-card {
    padding: var(--space-md);
  }
  
  .stats-value {
    font-size: var(--font-size-large);
  }
}

/* Small screens */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .main-header {
    padding: var(--space-xxs) 0;
  }
  
  .nav-link {
    padding: var(--space-xxs) var(--space-xs);
  }
  
  .main-content {
    padding: var(--space-lg) 0;
  }
  
  .view-title {
    font-size: var(--font-size-xlarge);
    margin-bottom: var(--space-lg);
  }
  
  .section-title {
    font-size: var(--font-size-base);
  }
  
  .pools-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .notification-container {
    top: var(--space-sm);
    right: var(--space-sm);
    left: var(--space-sm);
    max-width: none;
  }
}

/* Extra small screens */
@media (max-width: 576px) {
  .logo {
    height: 30px;
  }
  
  .site-title {
    font-size: var(--font-size-large);
  }
  
  .stats-overview {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
    margin-top: var(--space-md);
  }
}

/* Dark mode - already the default */
@media (prefers-color-scheme: dark) {
  /* No changes needed */
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .pool-card:hover {
    transform: none;
  }
  
  .stats-card:hover {
    transform: none;
  }
  
  .notification {
    animation: fade-in var(--duration-medium) var(--timing-function);
  }
}

