@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #0f172a; /* Slate 900 */
  --bg-card: rgba(30, 41, 59, 0.6); /* Slate 800 with opacity */
  --bg-card-hover: rgba(51, 65, 85, 0.8); /* Slate 700 with opacity */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-primary: #00E676; /* Vibrant Green for Bitcoin */
  --accent-secondary: #3B82F6; /* Blue for trust/security */
  --accent-glow: rgba(0, 230, 118, 0.15);
  
  /* Glassmorphism */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

main {
  min-height: calc(100vh - 350px); /* Keeps footer at bottom */
  margin-bottom: 5rem;
}

/* Background Gradients */
body::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  z-index: -1;
  border-radius: 50%;
  animation: pulse 8s infinite alternate;
}

body::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  z-index: -1;
  border-radius: 50%;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Container */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 4rem;
}

/* Navigation */
nav {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), #00b35c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
}

.btn-primary:hover {
  background: #00c263;
  transform: translateY(-2px);
  box-shadow: 0 4px 25px rgba(0, 230, 118, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 230, 118, 0.2);
  display: inline-block;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  max-width: 800px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Glass Cards (Features/Stats) */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 4rem 0;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all var(--transition-smooth);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  font-size: 1.5rem;
}

.glass-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.glass-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Offers Table/List */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.offers-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 4rem;
}

.offers-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.offer-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  align-items: center;
  transition: background var(--transition-fast);
}

.offer-row:last-child {
  border-bottom: none;
}

.offer-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.offer-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.offer-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.payment-method {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 0.85rem;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--transition-smooth) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .offers-header { display: none; }
  .offer-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }
  .offer-action { margin-top: 1rem; }
}

/* Footer */
.footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  background: rgba(11, 14, 20, 0.8);
  backdrop-filter: var(--glass-blur);
  padding: 4rem 0 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
}

/* ==========================================================================
   Admin Console (Dashboard) Styles
   ========================================================================== */

.admin-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.admin-sidebar {
  width: 280px;
  background: rgba(11, 14, 20, 0.9);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 10;
}

.admin-sidebar .logo {
  margin-bottom: 3rem;
  font-size: 1.25rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.sidebar-icon {
  font-size: 1.25rem;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header {
  height: 80px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  background: rgba(11, 14, 20, 0.5);
  backdrop-filter: var(--glass-blur);
  z-index: 5;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.admin-content::before {
  content: '';
  position: fixed;
  top: 10%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: transform var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.green { background: rgba(0, 230, 118, 0.1); color: var(--accent-primary); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-secondary); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.stat-icon.pink { background: rgba(236, 72, 153, 0.1); color: #EC4899; }

.stat-info h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.stat-info h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
}

/* Admin Data Table */
.admin-table-wrapper {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
}

.admin-table-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.admin-table th {
  text-align: left;
  padding: 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--glass-border);
}

.admin-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
}

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

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.success { background: rgba(0, 230, 118, 0.1); color: var(--accent-primary); }
.status-badge.pending { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.status-badge.danger { background: rgba(239, 68, 68, 0.1); color: #EF4444; }

@media (max-width: 992px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--glass-border); padding: 1rem; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 1rem; }
  .admin-sidebar .logo { margin-bottom: 1rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-table-wrapper { overflow-x: auto; }
}

/* Glass Form Elements */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.15);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Fix for browser autocomplete yellow/white background */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #1a202c inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 3rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 3rem;
}

.auth-title {
  margin-bottom: 2rem;
  text-align: center;
  font-size: 2.25rem;
  color: var(--text-primary);
  font-weight: 700;
}

.auth-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  justify-content: center;
  margin-top: 1rem;
}

