@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Plus+Jakarta+Sans:wght@400;600;700&display=swap');

:root {
  --bg-color: #030712;
  --panel-bg: rgba(17, 24, 39, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary-glow: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --secondary-glow: linear-gradient(135deg, #06b6d4, #10b981);
  --accent-neon: #a78bfa;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --glow-shadow: 0 0 25px rgba(139, 92, 246, 0.25);
  --font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 10% 20%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* Glassmorphism Container */
.container {
  width: 90%;
  max-width: 480px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  position: relative;
}

.container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--primary-glow);
  z-index: -1;
  border-radius: 26px;
  opacity: 0.15;
  filter: blur(10px);
}

/* Header & Logo styling */
.header {
  text-align: center;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-glow);
  box-shadow: var(--glow-shadow);
  margin-bottom: 1rem;
  animation: pulse-glow 3s infinite ease-in-out;
}

.logo-icon {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff, #d8b4fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Stats / Dashboard Cards */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-value.highlight {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Console & Log Outputs */
.console-panel {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  height: 120px;
  overflow-y: auto;
  color: #34d399;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.console-line {
  word-break: break-all;
}

.console-line.system {
  color: var(--accent-neon);
}

.console-line.error {
  color: #f87171;
}

/* Action Buttons */
button {
  background: var(--primary-glow);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 1.1rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.5);
  filter: brightness(1.1);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

button.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  box-shadow: none;
}

button.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  transform: none;
}

button.mining-active {
  background: var(--secondary-glow);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Wallet Connected Info Panel */
.wallet-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
}

.address-pill {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f87171; /* red disconnected */
  display: inline-block;
  margin-right: 0.5rem;
}

.status-dot.connected {
  background: #34d399; /* green connected */
  box-shadow: 0 0 8px #34d399;
}

/* Keyframe Animations */
@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.45);
  }
}

.spinning {
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive adjust */
@media (max-width: 400px) {
  .container {
    padding: 1.5rem 1.2rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Chart Filter Tabs */
.chart-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.chart-tab:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-main) !important;
  transform: none !important;
  box-shadow: none !important;
}

.chart-tab.active {
  background: var(--primary-glow) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3) !important;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  width: 100%;
  max-width: 380px;
  background: #0b0f19;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 24px;
  padding: 2rem 1.6rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.15);
  animation: modal-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes modal-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-btn {
  background: rgba(246, 133, 27, 0.14); /* MetaMask orange tint */
  border: 1px solid rgba(246, 133, 27, 0.3);
  color: #ff9f43;
  border-radius: 14px;
  padding: 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.modal-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}


