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

:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --secondary: #6366f1;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border: #334155;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--text-primary);
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s ease;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
}

.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.6s ease;
}

.card h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.card h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
  justify-content: center;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
  background: #64748b;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

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

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

.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-icon {
  font-size: 1.2rem;
}

/* Wallet Buttons */
.wallet-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 30px 0;
}

/* User Header */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.account-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid var(--success);
  color: var(--success);
}

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

.badge-icon {
  font-size: 1.5rem;
}

/* NFT List */
.nft-list {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.nft-card {
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.nft-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.nft-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.nft-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
}

.nft-image, .nft-icon video {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  padding: 4px;
}

.nft-info {
  flex: 1;
}

.reward-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.reward-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--success);
  padding: 4px;
}

.reward-label {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nft-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quantity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.3);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid var(--primary);
}

.nft-template {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.nft-status {
  margin: 15px 0;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
}

.nft-status.ready {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.nft-status.cooldown {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.countdown {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Info Box */
.info-box {
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  margin-top: 30px;
}

.info-box h3 {
  color: var(--primary);
  margin-bottom: 15px;
}

.info-box ol {
  padding-left: 20px;
  line-height: 1.8;
}

/* Whitelist */
.whitelist-list {
  background: var(--bg-dark);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.whitelist-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.whitelist-item:last-child {
  border-bottom: none;
}

/* History */
.history-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid var(--border);
}

.history-list {
  background: var(--bg-dark);
  border-radius: 8px;
  padding: 15px;
}

.history-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item:last-child {
  border-bottom: none;
}

.history-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

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

.alert-success {
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid var(--success);
  color: var(--success);
}

/* Loader */
.loader {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stat-item {
  background: var(--bg-dark);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Table */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-dark);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-card-hover);
  font-weight: 600;
  color: var(--text-secondary);
}

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

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

/* Footer */
footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

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

.back-link {
  margin-top: 30px;
  text-align: center;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .card {
    padding: 20px;
  }

  .user-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .nft-header {
    flex-wrap: wrap;
  }

  .reward-preview {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }

  .reward-image {
    width: 60px;
    height: 60px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 10px;
  }
}
