* {
  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;
}

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

header {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

h1 {
  font-size: 2.5em;
  color: #2d3748;
  margin-bottom: 20px;
}

.wallet-info {
  display: flex;
  gap: 30px;
  font-size: 1.1em;
}

.balance, .health-factor {
  display: flex;
  gap: 10px;
  padding: 15px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-weight: 600;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

section {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: 1.8em;
  color: #2d3748;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 25px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 15px;
  color: white;
}

.stat-label {
  font-size: 0.9em;
  opacity: 0.9;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2em;
  font-weight: bold;
}

.assets-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.tab-btn {
  padding: 12px 30px;
  border: none;
  background: #e2e8f0;
  color: #4a5568;
  font-size: 1em;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.assets-table {
  width: 100%;
}

.table-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  padding: 15px 20px;
  background: #f7fafc;
  border-radius: 10px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 10px;
}

.asset-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  padding: 20px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  align-items: center;
  transition: all 0.3s;
}

.asset-row:hover {
  border-color: #667eea;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.asset-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.asset-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
}

.asset-name {
  font-weight: 600;
  font-size: 1.1em;
}

.apy-positive {
  color: #48bb78;
  font-weight: 600;
}

.apy-negative {
  color: #f56565;
  font-weight: 600;
}

.asset-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95em;
}

.supply-btn {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.withdraw-btn {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  color: white;
}

.borrow-btn {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
}

.repay-btn {
  background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
  color: white;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
}

.position-card {
  background: #f7fafc;
  padding: 25px;
  border-radius: 15px;
}

.position-card h3 {
  color: #2d3748;
  margin-bottom: 20px;
  font-size: 1.3em;
}

.position-item {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border-left: 4px solid #667eea;
}

.position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.position-asset {
  font-weight: 600;
  font-size: 1.1em;
}

.position-amount {
  font-size: 1.3em;
  font-weight: bold;
  color: #667eea;
}

.position-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.9em;
  color: #718096;
}

.liquidation-list {
  display: grid;
  gap: 15px;
}

.liquidation-item {
  background: #fff5f5;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #f56565;
}

.liquidation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.liquidation-user {
  font-weight: 600;
  color: #2d3748;
}

.liquidation-health {
  color: #f56565;
  font-weight: bold;
}

.liquidation-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.liquidate-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.liquidate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 101, 101, 0.3);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #000;
}

.input-group {
  margin: 30px 0;
}

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

.input-wrapper {
  display: flex;
  gap: 10px;
}

.input-wrapper input {
  flex: 1;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1.1em;
  transition: border-color 0.3s;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #667eea;
}

.max-btn {
  padding: 15px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.max-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.input-info {
  margin-top: 10px;
  color: #718096;
  font-size: 0.9em;
}

.transaction-overview {
  background: #f7fafc;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

.overview-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.overview-row:last-child {
  border-bottom: none;
  font-weight: bold;
  font-size: 1.1em;
}

.confirm-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.empty-state {
  text-align: center;
  padding: 40px;
  color: #a0aec0;
  font-size: 1.1em;
}

@media (max-width: 768px) {
  .table-header, .asset-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .positions-grid {
    grid-template-columns: 1fr;
  }
  
  .wallet-info {
    flex-direction: column;
    gap: 15px;
  }
}
