/* ========================================
   Wallet Connection Page Styles
   AILP Theme Compatible
   ======================================== */

.wallet-connection-page {
  min-height: 100vh;
  background: var(--bg-color);
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

/* Light theme gradient background */
body:not(.dark-theme) .wallet-connection-page {
  background: var(--gradient-hero);
}

/* Dark theme gradient background */
body.dark-theme .wallet-connection-page {
  background: linear-gradient(135deg, #0a0f1e 0%, #1a1f35 100%);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.circle-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.circle-2 {
  width: 300px;
  height: 300px;
  background: #3b82f6;
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

.circle-3 {
  width: 200px;
  height: 200px;
  background: #8b5cf6;
  top: 50%;
  right: 10%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(0, -100px) scale(1);
  }
  75% {
    transform: translate(-50px, -50px) scale(0.9);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  margin-bottom: 2rem;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.hero-logo {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 8px 16px rgba(198, 231, 87, 0.3));
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.2;
  font-family: var(--font-secondary);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
}

.btn-connect-hero {
  padding: 1.25rem 3rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
  color: #000;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-connect-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(255, 215, 0, 0.5);
}

.btn-connect-hero:active {
  transform: translateY(-1px);
}

.btn-connect-hero:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.wallet-connected-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--card-bg);
  border-radius: 50px;
  border: 2px solid var(--success-color);
  color: var(--success-color);
  font-weight: 600;
}

/* Connecting State */
.connecting-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: var(--card-bg);
  border-radius: 50px;
  border: 2px solid var(--primary-color);
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.1rem;
}

.connecting-state i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 4rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-body);
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: var(--border-color);
}

/* Features Section */
.features-section {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 3rem;
  font-family: var(--font-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  animation: fadeInScale 0.6s ease forwards;
  opacity: 0;
  box-shadow: var(--shadow);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #fff;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  font-family: var(--font-secondary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: var(--font-body);
}

/* Wallet Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.wallet-modal {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.4s ease;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  font-family: var(--font-secondary);
}

.close-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: var(--primary-color);
  color: #000;
  transform: rotate(90deg);
}

.modal-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.wallets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wallet-option {
  background: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  animation: slideInWallet 0.5s ease forwards;
  opacity: 0;
}

@keyframes slideInWallet {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wallet-option:hover {
  border-color: var(--primary-color);
  background: var(--card-bg);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.wallet-option:active {
  transform: translateY(-2px);
}

.wallet-option.connecting {
  border-color: var(--primary-color);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(198, 231, 87, 0.2);
}

.wallet-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 8px;
  background: white;
  padding: 4px;
}

.wallet-option:hover .wallet-icon {
  transform: scale(1.1);
}

.wallet-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.wallet-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  font-family: var(--font-primary);
}

.wallet-description {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
  font-family: var(--font-body);
}

.connecting-spinner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.modal-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
}

/* Register Container */
.register-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.register-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}

.register-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.register-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: #000;
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.register-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-family: var(--font-secondary);
}

.register-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
}

.badge-success-small {
  background: #10b981;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.form-input {
  padding: 1rem;
  border: 2px solid var(--input-border);
  border-radius: var(--border-radius-sm);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(198, 231, 87, 0.1);
}

.form-input.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group small {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-family: var(--font-body);
}

/* Sponsor Verified Box */
.sponsor-verified {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #10b981;
  font-weight: 600;
  font-size: 0.9rem;
}

.sponsor-verifying {
  color: #f59e0b;
}

.sponsor-invalid {
  color: #ef4444;
}

/* Registration Info Box */
.registration-info-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
  border-radius: 8px;
  color: white;
}

.registration-info-box .info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: bold;
}

.registration-info-box .info-content {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  opacity: 0.95;
  line-height: 1.5;
}

.registration-info-box .accept-terms {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.registration-info-box .accept-terms input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #10b981;
}

.btn-submit {
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #fbbf24 100%);
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.5);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-cancel {
  padding: 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.btn-cancel:hover {
  border-color: var(--primary-color);
  background: var(--input-bg);
  color: var(--text-color);
}

.btn-cancel:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .stats-bar {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stat-divider {
    width: 100px;
    height: 1px;
  }

  .wallets-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .wallet-modal {
    padding: 1.5rem;
  }

  .register-card {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn-connect-hero {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .wallets-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: 100px;
    height: 100px;
  }
}

/* USDT Authorization Section */
.authorization-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.auth-header i {
    color: var(--primary);
}

.auth-status {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.auth-checking {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.auth-checking i {
    color: var(--primary);
}

.auth-not-authorized {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-authorized {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-authorize {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-authorize:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-authorize:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-authorize.processing {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

