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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #868b8e 0%, #e8eaf6 100%);
  min-height: 100vh;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition: all 0.2s;
}

.modal-content {
  background: white;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  transform: scale(1);
  transition: transform 0.2s;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-view {
  display: block;
}

.modal-view.hidden {
  display: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: #6b7280;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: #f3f4f6;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Input Styles */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.email-input {
  width: 100%;
  background: #f3f4f6;
  border: none;
  border-radius: 16px;
  padding: 16px 16px 16px 48px;
  font-size: 1rem;
  color: #374151;
  outline: none;
  transition: all 0.2s;
}

.email-input:focus {
  box-shadow: 0 0 0 2px #3b82f6;
}

.email-input::placeholder {
  color: #9ca3af;
}

.divider {
  text-align: center;
  color: #9ca3af;
  font-weight: 500;
  margin: 1.5rem 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e5e7eb;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

/* Wallet Options */
.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.wallet-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem;
  background: #f9fafb;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.wallet-btn:hover {
  background: #f3f4f6;
}

.wallet-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.gradient-blue {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.gradient-orange {
  background: linear-gradient(135deg, #fb923c, #ea580c);
}

.gradient-blue-dark {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.gray {
  background: #d1d5db;
}

.wallet-inner-icon {
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #3b82f6;
  border-radius: 50%;
}

.dots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 16px;
  height: 16px;
}

.dot {
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
}

.wallet-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wallet-badge.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.wallet-badge.green {
  background: #dcfce7;
  color: #16a34a;
}

.wallet-badge.gray {
  background: #e5e7eb;
  color: #6b7280;
}

/* Google Button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 1rem;
  background: #f9fafb;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 1.5rem;
}

.google-btn:hover {
  background: #f3f4f6;
}

.google-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
}

/* Footer */
.modal-footer {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.link-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.link-btn:hover {
  color: #1d4ed8;
}

/* Search Styles */
.search-container {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  background: #f3f4f6;
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 1rem;
  color: #374151;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  box-shadow: 0 0 0 2px #3b82f6;
}

.search-input::placeholder {
  color: #9ca3af;
}

/* Upload Section */
.upload-section {
  margin-bottom: 1.5rem;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #f0f9ff;
  border: 2px dashed #3b82f6;
  border-radius: 12px;
  cursor: pointer;
  color: #3b82f6;
  font-weight: 500;
  transition: all 0.2s;
}

.upload-btn:hover {
  background: #e0f2fe;
  border-color: #1d4ed8;
}

/* Wallet List */
.wallet-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 1rem;
  background: #f9fafb;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: left;
}

.wallet-list-item:hover {
  background: #f3f4f6;
}

.wallet-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.wallet-list-item img {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  object-fit: cover;
}

.wallet-list-item span {
  font-weight: 500;
  color: #1f2937;
}

/* Scrollbar Styles */
.wallet-list::-webkit-scrollbar {
  width: 6px;
}

.wallet-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.wallet-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.wallet-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mobile Responsive Design */
@media (max-width: 480px) {
  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-content {
    margin: 0.5rem;
    max-width: none;
    border-radius: 20px;
    max-height: 95vh;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h2 {
    font-size: 1.125rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .wallet-btn {
    padding: 0.875rem;
  }

  .wallet-info {
    gap: 10px;
  }

  .wallet-icon {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

  .wallet-badge {
    padding: 3px 8px;
    font-size: 0.6875rem;
  }

  .google-btn {
    padding: 0.875rem;
  }

  .email-input {
    padding: 14px 14px 14px 44px;
  }

  .search-input {
    padding: 10px 14px;
  }

  .wallet-list {
    max-height: 250px;
  }

  .wallet-list-item {
    padding: 0.875rem;
  }

  .wallet-list-icon {
    width: 36px;
    height: 36px;
  }

  .wallet-list-item img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 360px) {
  .modal-header {
    padding: 0.75rem;
  }

  .modal-body {
    padding: 0.75rem;
  }

  .wallet-btn {
    padding: 0.75rem;
  }

  .wallet-icon {
    width: 32px;
    height: 32px;
    font-size: 1.125rem;
  }

  .wallet-list-icon {
    width: 32px;
    height: 32px;
  }

  .wallet-list-item img {
    width: 32px;
    height: 32px;
  }
}
