/* Sirius Lumens DeFi Platform Styles */

:root {
  --gold: #996515;
  --dark-gold: #7a5011;
  --light-gold: #b8781a;
  --checker-dark: #2c2c2c;
  --checker-light: #f5f5f5;
}

[data-theme="dark"] {
  --checker-dark: #1a1a1a;
  --checker-light: #333333;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--checker-light);
  color: var(--gold);
  min-height: 100vh;
}

/* Checkerboard Background */
.checkerboard-bg {
  background-image: 
    linear-gradient(45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(-45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, var(--checker-dark) 75%), 
    linear-gradient(-45deg, transparent 75%, var(--checker-dark) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: var(--checker-light);
}

/* Global checkerboard body */
body {
  background-image: 
    linear-gradient(45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(-45deg, var(--checker-dark) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, var(--checker-dark) 75%), 
    linear-gradient(-45deg, transparent 75%, var(--checker-dark) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: var(--checker-light);
}

/* Gold Theme Colors */
.text-gold {
  color: var(--gold) !important;
  font-weight: 700;
}

.bg-gold {
  background-color: var(--gold) !important;
}

.border-gold {
  border-color: var(--gold) !important;
}

/* Header Styles */
header {
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.3);
}

/* Tab Buttons */
.tab-button {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background-color: var(--gold);
  color: black;
}

.tab-button.active {
  background-color: var(--gold);
  color: black;
}

/* Card Styles */
.defi-card {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}

/* Form Styles */
.defi-input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 12px;
  color: var(--gold);
  width: 100%;
  font-size: 16px;
}

.defi-input:focus {
  outline: none;
  border-color: var(--light-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.defi-button {
  background: var(--gold);
  color: black;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.defi-button:hover {
  background: var(--light-gold);
  transform: translateY(-1px);
}

.defi-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Swap Interface Styles */
.swap-container {
  max-width: 480px;
  margin: 0 auto;
}

.token-input-container {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.token-selector {
  background: var(--gold);
  color: black;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  min-width: 100px;
}

.swap-arrow {
  display: flex;
  justify-content: center;
  margin: -8px 0;
  position: relative;
  z-index: 10;
}

.swap-arrow button {
  background: var(--gold);
  color: black;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.swap-arrow button:hover {
  transform: rotate(180deg);
}

/* Farm Grid */
.farm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.farm-category-card {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
}

.farm-category-title {
  color: var(--gold);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.farm-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
  font-size: 14px;
}

.farm-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.farm-button {
  flex: 1;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.farm-button:hover {
  background: var(--gold);
  color: black;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  
  .farm-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  header .flex {
    flex-direction: column;
    gap: 16px;
  }
  
  .tab-button {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .farm-grid {
    grid-template-columns: 1fr;
  }
  
  .swap-container {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .token-input-container {
    padding: 16px;
  }
  
  .defi-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  header .container {
    padding: 16px 12px;
  }
  
  .tab-button {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .defi-card {
    padding: 12px;
  }
  
  .token-input-container {
    padding: 12px;
  }
  
  h1 {
    font-size: 18px !important;
  }
  
  h2 {
    font-size: 20px !important;
  }
}

/* Loading and Animation */
.loading-spinner {
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  border-top: 2px solid var(--gold);
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hidden by default */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Wallet Connection Styles */
.connect-wallet-enhanced {
  position: relative;
  overflow: hidden;
}

.connect-wallet-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
  transition: left 0.5s;
}

.connect-wallet-enhanced:hover::before {
  left: 100%;
}

/* Connect Wallet Button Enhanced Styling */
#connectWallet {
  position: relative;
  background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
  box-shadow: 0 4px 15px rgba(153, 101, 21, 0.3);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

#connectWallet:hover {
  background: linear-gradient(135deg, var(--light-gold) 0%, var(--gold) 100%);
  box-shadow: 0 6px 20px rgba(153, 101, 21, 0.5);
  transform: translateY(-2px);
  border-color: var(--light-gold);
}

#connectWallet:active {
  transform: translateY(0);
}

/* Connected state styling */
#connectWallet.connected {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: #22c55e;
}

#connectWallet.connected:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

/* Thirdweb Modal Custom Styling Override */
[data-theme="dark"] {
  --tw-modal-bg: #000000 !important;
  --tw-modal-border: #996515 !important;
}

/* Override Thirdweb default styles */
.thirdweb-modal {
  --background: #000000 !important;
  --border: #996515 !important;
  --accent: #996515 !important;
  --primary: #996515 !important;
  --secondary: #cccccc !important;
}

/* Social Login Button Enhancements */
.social-login-button {
  background: rgba(0, 0, 0, 0.8) !important;
  border: 2px solid var(--gold) !important;
  color: var(--gold) !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.social-login-button:hover {
  background: var(--gold) !important;
  color: #000000 !important;
  box-shadow: 0 4px 15px rgba(153, 101, 21, 0.3) !important;
}

/* Wallet Option Styling */
.wallet-option {
  background: rgba(0, 0, 0, 0.9) !important;
  border: 1px solid var(--gold) !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  transition: all 0.3s ease !important;
}

.wallet-option:hover {
  background: rgba(153, 101, 21, 0.1) !important;
  border-color: var(--light-gold) !important;
  box-shadow: 0 4px 15px rgba(153, 101, 21, 0.2) !important;
}