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

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

:root {
  --primary-black: #000000;
  --secondary-black: #1a1a1a;
  --tertiary-black: #2d2d2d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #a1a1a1;
  --text-tertiary: #6b6b6b;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--primary-black);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.mobile-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Header */
header {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s;
}

.mobile-menu-toggle:hover {
  opacity: 0.7;
}

.mobile-menu-toggle i {
  width: 24px;
  height: 24px;
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link i {
  width: 16px;
  height: 16px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--glass-bg);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    gap: 0;
    padding: 16px;
    max-height: calc(100vh - 73px);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 12px;
  }

  .nav-link i {
    width: 20px;
    height: 20px;
  }
}

/* Cards */
.card {
  background: var(--secondary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

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

label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--tertiary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

input::placeholder {
  color: var(--text-tertiary);
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--primary-black);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--glass-border);
  border-color: var(--border-medium);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.btn-error {
  background: var(--error);
  color: white;
}

.btn-error:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.btn-full {
  width: 100%;
}

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

/* Balance Card */
.balance-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}

.balance-amount {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 8px;
}

.balance-currency {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Interest Lock Card */
.lock-card {
  background: var(--secondary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lock-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.lock-percentage {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -2px;
}

.lock-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.lock-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.lock-detail:last-child {
  border-bottom: none;
}

.lock-detail-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.lock-detail-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

/* Status Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-approved {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
}

th {
  text-align: left;
  padding: 16px;
  background: var(--tertiary-black);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border-subtle);
}

th:first-child {
  border-top-left-radius: 10px;
}

th:last-child {
  border-top-right-radius: 10px;
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
}

tr:hover td {
  background: var(--glass-bg);
  color: var(--text-primary);
}

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

/* Alert Messages */
.alert {
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--border-subtle);
  border-top: 3px solid var(--text-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--secondary-black);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 32px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

/* Wallet Display */
.wallet-display {
  background: var(--tertiary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  word-break: break-all;
  margin: 12px 0;
  color: var(--text-secondary);
}

/* Copy Button */
.copy-btn {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--text-primary);
  color: var(--primary-black);
  border-color: var(--text-primary);
}

/* Icons */
.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.icon-lg {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
}

.icon-xl {
  width: 64px;
  height: 64px;
  stroke-width: 1.5;
}

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

.text-center {
  text-align: center;
}

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

.text-success {
  color: var(--success);
}

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

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .balance-amount {
    font-size: 40px;
  }

  .card {
    padding: 20px;
  }

  table {
    font-size: 13px;
  }

  th, td {
    padding: 12px 8px;
  }

  .modal-content {
    padding: 24px;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-black);
}

::-webkit-scrollbar-thumb {
  background: var(--tertiary-black);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-medium);
}

/* Selection */
::selection {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

