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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

h1 {
  text-align: center;
  color: #2d3748;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  text-align: center;
  color: #718096;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.chain-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.chain-btn {
  padding: 12px 24px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chain-btn.active {
  border-color: #667eea;
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.chain-btn:hover:not(.active) {
  border-color: #667eea;
  transform: translateY(-1px);
}

.status-section {
  background: #f7fafc;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid #e2e8f0;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.status-label {
  font-weight: 600;
  color: #4a5568;
}

.status-connected {
  color: #38a169;
  font-weight: 700;
  background: #c6f6d5;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.status-disconnected {
  color: #e53e3e;
  font-weight: 600;
  background: #fed7d7;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.connection-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.method-card {
  background: linear-gradient(135deg, #f7fafc, #edf2f7);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.method-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.method-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: block;
}

.method-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 10px;
}

.method-description {
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.4;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #718096;
  background: none;
  border: none;
}

.modal-close:hover {
  color: #e53e3e;
}

.modal h3 {
  margin-bottom: 20px;
  color: #2d3748;
}

.qr-container {
  text-align: center;
  padding: 20px;
  background: #f7fafc;
  border-radius: 10px;
  margin: 20px 0;
}

.qr-placeholder {
  width: 200px;
  height: 200px;
  background: white;
  border: 2px dashed #cbd5e0;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #718096;
  border-radius: 10px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #edf2f7;
}

.btn-danger {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.wallet-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.wallet-card:hover {
  transform: translateY(-3px);
  border-color: #667eea;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wallet-card.installed {
  border-color: #48bb78;
  background: #f0fff4;
}

.wallet-card.not-installed {
  opacity: 0.6;
  cursor: not-allowed;
}

.wallet-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.wallet-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2d3748;
}

.wallet-status {
  font-size: 0.7rem;
  margin-top: 5px;
  font-weight: 600;
  text-transform: uppercase;
}

.wallet-status.installed { 
  color: #38a169; 
}

.wallet-status.not-installed { 
  color: #e53e3e; 
}

.transaction-section {
  background: #ebf4ff;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid #bee3f8;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
}

.input-group input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.log-section {
  background: #2d3748;
  border-radius: 15px;
  padding: 25px;
  color: #e2e8f0;
  margin-top: 25px;
}

.log-content {
  background: #1a202c;
  padding: 20px;
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

#wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.hidden {
  display: none !important;
}

.seed-warning {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
}

.seed-warning-title {
  font-weight: 700;
  color: #856404;
  margin-bottom: 8px;
}

.seed-warning-text {
  color: #856404;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
  }
  
  .connection-methods {
    grid-template-columns: 1fr;
  }
  
  .chain-selector {
    flex-direction: column;
    align-items: center;
  }
  
  h1 {
    font-size: 2rem;
  }
}
