/* MineStream Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --orange: #F7931A;
  --orange-hover: #e88a15;
  --dark: #0A0A0A;
  --darker: #050505;
  --gray-900: #111111;
  --gray-800: #1A1A1A;
  --gray-700: #2A2A2A;
  --gray-600: #3A3A3A;
  --gray-400: #888888;
  --gray-300: #AAAAAA;
  --white: #F5F5F5;
  --green: #00D68F;
  --red: #FF4757;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--darker);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.mono { font-family: 'DM Mono', monospace; }

/* Grid background */
.grid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(247,147,26,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,147,26,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

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

.nav-link {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
}

.nav-link.orange {
  color: var(--orange);
}

/* Content */
.content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 48px;
  width: 100%;
}

/* Cards */
.card {
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: 16px;
  padding: 32px;
}

.card-header {
  font-size: 11px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--dark);
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gray-800);
  color: var(--white);
  border: 1px solid var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-700);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-400);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--white);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--orange);
}

.form-input::placeholder {
  color: var(--gray-600);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
}

/* Auth layout */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card .card-title {
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray-400);
}

.auth-footer a {
  color: var(--orange);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Alert messages */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-error {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--red);
}

.alert-success {
  background: rgba(0, 214, 143, 0.1);
  border: 1px solid rgba(0, 214, 143, 0.3);
  color: var(--green);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
  margin-bottom: 32px;
}

.stat-box {
  background: var(--gray-900);
  padding: 28px;
  text-align: center;
}

.stat-box:first-child { border-radius: 12px 0 0 12px; }
.stat-box:last-child { border-radius: 0 12px 12px 0; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.stat-value.orange { color: var(--orange); }
.stat-value.green { color: var(--green); }
.stat-value.white { color: var(--white); }

.stat-label {
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Terminal */
.terminal {
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-700);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green { background: #28C840; }

.terminal-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--gray-400);
}

.terminal-body {
  padding: 24px;
}

.terminal-line {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 2.2;
  color: var(--gray-400);
}

.terminal-line .val { color: var(--green); }
.terminal-line .btc { color: var(--orange); }
.terminal-line .label { color: var(--gray-400); }
.terminal-line .prompt { color: var(--orange); opacity: 0.6; }

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-800);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--green));
  border-radius: 4px;
  transition: width 1s linear;
}

/* Balance display */
.balance-hero {
  text-align: center;
  padding: 48px 24px;
  margin-bottom: 32px;
}

.balance-label {
  font-size: 13px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.balance-amount {
  font-family: 'DM Mono', monospace;
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
}

.balance-sub {
  font-size: 14px;
  color: var(--gray-400);
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 40px;
}

.price-card {
  background: var(--gray-900);
  padding: 36px 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.price-card:first-child { border-radius: 16px 0 0 16px; }
.price-card:last-child { border-radius: 0 16px 16px 0; }

.price-card:hover {
  background: var(--gray-800);
}

.price-card.featured {
  background: var(--gray-800);
  border-top: 3px solid var(--orange);
}

.price-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--dark);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.price-duration {
  font-size: 12px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.price-amount {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.price-per {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.price-detail {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.6;
  padding-top: 16px;
  border-top: 1px solid var(--gray-700);
}

/* Withdrawal form */
.withdraw-card {
  max-width: 560px;
  margin: 0 auto;
}

.fee-breakdown {
  background: var(--gray-800);
  border-radius: 10px;
  padding: 20px;
  margin: 24px 0;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.fee-row.total {
  border-top: 1px solid var(--gray-700);
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 16px;
}

.fee-row .label { color: var(--gray-400); }
.fee-row .value { color: var(--white); font-family: 'DM Mono', monospace; }
.fee-row .value.green { color: var(--green); }

/* Table */
.table-container {
  overflow-x: auto;
}

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

th {
  text-align: left;
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-700);
}

td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-800);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-pending {
  background: rgba(247, 147, 26, 0.15);
  color: var(--orange);
}

.status-completed {
  background: rgba(0, 214, 143, 0.15);
  color: var(--green);
}

.status-processing {
  background: rgba(100, 100, 255, 0.15);
  color: #8888ff;
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  margin-right: 8px;
}

/* Flash animation */
@keyframes flash-green {
  0% { background: transparent; }
  50% { background: rgba(0, 214, 143, 0.1); }
  100% { background: transparent; }
}

.flash {
  animation: flash-green 0.6s ease-in-out;
}

/* Footer */
.app-footer {
  padding: 24px 48px;
  text-align: center;
  border-top: 1px solid var(--gray-800);
  margin-top: auto;
}

.app-footer p {
  font-size: 13px;
  color: var(--gray-700);
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-700);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

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

/* Hidden */
.hidden { display: none \!important; }

/* Responsive */
@media (max-width: 900px) {
  .app-nav { padding: 16px 24px; }
  .content { padding: 24px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card { border-radius: 0 \!important; }
  .price-card:first-child { border-radius: 12px 12px 0 0 \!important; }
  .price-card:last-child { border-radius: 0 0 12px 12px \!important; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-box { border-radius: 0 \!important; }
  .stat-box:first-child { border-radius: 12px 12px 0 0 \!important; }
  .stat-box:last-child { border-radius: 0 0 12px 12px \!important; }
  .nav-links { gap: 16px; }
  .balance-amount { font-size: 42px; }
}

@media (max-width: 600px) {
  .nav-links { gap: 12px; }
  .nav-link { font-size: 13px; }
}
