/* =======================================================
   GLOBALIE UN PAMATA STILI (TUMŠĀ TĒMA)
   ======================================================= */
body { 
  font-family: 'Inter', Arial, sans-serif; 
  background: #000; 
  color: #fff; 
  margin: 0; 
  padding: 20px; 
  position: relative; 
}

.container { 
  max-width: 1400px; 
  margin: auto; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 12px; 
}

h1 { 
  font-size: 24px; 
  margin: 0; 
  line-height: 1; 
  background: linear-gradient(90deg, #ffffff, #aaaaaa); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  text-align: center; 
}

.subtitle { 
  margin-top: 4px; 
  color: #9fb0c3; 
  font-size: 18px; 
  text-align: center; 
}

/* =======================================================
   TĒMU UN BLOKĶEZU SELEKTORI
   ======================================================= */
.theme-selector {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 10px 0;
  flex-wrap: wrap;
}

.theme-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.theme-btn:hover { transform: translateY(-2px) scale(1.05); }
.theme-btn.active { background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 15px currentColor; transform: scale(1.02); }
.theme-btn.active::before { content: '✓ '; font-weight: bold; }
.theme-classic { border-color: #0ff; color: #0ff; }
.theme-forest { border-color: #0f0; color: #0f0; }
.theme-ocean { border-color: #00f; color: #00f; }
.theme-sunset { border-color: #ff6600; color: #ff6600; }
.theme-galaxy { border-color: #c026ff; color: #c026ff; }
.theme-rainbow { border-color: #ff00ff; color: #ff00ff; }
.theme-fire { border-color: #ff4400; color: #ff4400; }

.chain-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.8), rgba(20, 20, 30, 0.9));
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 60px;
  border: 1px solid rgba(100, 100, 200, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin: 10px 0;
}

.chain-selector:hover {
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.chain-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.chain-label svg { color: #0ff; }

.chain-dropdown {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 40px;
  padding: 8px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  font-family: 'Inter', monospace;
}

.chain-dropdown:hover {
  border-color: #0ff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.chain-dropdown option { background: #1a1a2e; color: #fff; padding: 10px; }
.chain-dropdown optgroup { background: #0f0f1a; color: #0ff; font-weight: 600; padding: 8px; }

.chain-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.chain-status.connected {
  background: #44ff44;
  box-shadow: 0 0 10px #44ff44;
  animation: chainPulse 2s infinite;
}

.chain-status.disconnected {
  background: #ff4444;
  box-shadow: 0 0 5px #ff4444;
}

@keyframes chainPulse {
  0% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.5; transform: scale(0.8); }
}

.active-style-indicator {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  border-left: 4px solid #0ff;
  pointer-events: none;
  font-family: monospace;
}

/* =======================================================
   POGAS UN KONTROLES
   ======================================================= */
.controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

button { 
  padding: 12px 20px; 
  border-radius: 12px; 
  border: none; 
  cursor: pointer; 
  background: linear-gradient(90deg, #4a90e2, #9013fe); 
  color: #fff; 
  font-weight: 700; 
  font-size: 16px; 
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); 
  transition: transform 0.2s, box-shadow 0.2s; 
}

button:disabled { background: #444; cursor: not-allowed; opacity: 0.5; }
button:hover:not(:disabled) { transform: translateY(-4px) scale(1.03); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65); }
button.loading { opacity: 0.7; cursor: wait; transform: none !important; }

button.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.generate-nft-btn { background: linear-gradient(135deg, #ffffff, #e8f4f0); color: #000; }
.generate-nft-btn:hover:not(:disabled) { background: linear-gradient(135deg, #d4fcec, #b8f5e0); color: #000; box-shadow: 0 8px 22px rgba(0, 255, 204, 0.2); }

/* Tooltip for Generate NFT button */
.generate-nft-btn { position: relative; }

.generate-nft-btn[data-price]:hover::before {
  content: attr(data-price);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #000000;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 10px;
  border: 1px solid #cccccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 1000;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.generate-nft-btn[data-price]:hover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
  margin-top: 4px;
  pointer-events: none;
  z-index: 1000;
  filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.1));
}

#renderBtn { display: none; }

/* =======================================================
   VIZUALIZĀCIJAS KONTEINERS, CANVASES UN STATUSS
   ======================================================= */
.snapshot-container { width: 100%; background: #000; border-radius: 14px; padding: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); position: relative; }
#snapshotCanvas { width: 100%; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.03); display: block; margin-bottom: 12px; }
#recordTimer { margin-top: 6px; color: #0ff; font-weight: 600; font-size: 16px; text-align: center; }

#statusMsg {
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-align: center;
  margin-top: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

#progressBarContainer {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  display: none;
}

#progressBar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #0ff, #4a90e2);
  border-radius: 6px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s ease;
}

#fullscreenIcon { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; cursor: pointer; color: #0ff; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 6px 10px; transition: background 0.2s, transform 0.2s; z-index: 10; }
#fullscreenIcon:hover { background: rgba(0, 255, 255, 0.2); transform: scale(1.05); }
#toggleInfoIcon { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; cursor: pointer; color: #0ff; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 6px 10px; transition: background 0.2s, transform 0.2s; z-index: 10; }
#toggleInfoIcon:hover { background: rgba(0, 255, 255, 0.2); transform: scale(1.05); }
#accountDisplay { width: 100%; word-break: break-word; margin-top: 8px; font-size: 16px; text-align: center; font-family: monospace; }

/* =======================================================
   TOKENU SARAKSTS UN PAPILDUS INFO
   ======================================================= */
#tokenListContainer {
  display: none;
  position: absolute;
  top: 80px;
  left: 10px;
  max-height: 150px;
  width: 90%;
  max-width: 576px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 9px;
  overflow-y: auto;
  padding: 10px;
  font-size: 14px;
  z-index: 15;
}

#tokenListContainer table { width: 100%; border-collapse: collapse; }
#tokenListContainer th, #tokenListContainer td { padding: 6px 8px; text-align: left; font-size: 13px; }
#tokenListContainer th { color: #0ff; font-weight: 600; }
#tokenListContainer tr:nth-child(even) td { background: rgba(255, 255, 255, 0.05); }
#tokenListContainer tr:nth-child(odd) td { background: rgba(255, 255, 255, 0.02); }
#tokenListContainer::-webkit-scrollbar { width: 6px; }
#tokenListContainer::-webkit-scrollbar-thumb { background: #0ff; border-radius: 3px; }

.warning-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f59e0b;
  color: #000;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  z-index: 200;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.warning-banner.show { transform: translateY(0); }

.site-header { position: relative; width: 100%; min-height: 80px; }
.logo { position: absolute; top: 0px; left: 10px; width: 280px; height: auto; }
.header-text { text-align: center; padding-top: 5px; }

.ipfs-preview {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #0ff;
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  max-width: 300px;
  z-index: 100;
  display: none; 
}
.ipfs-preview a { color: #0ff; word-break: break-all; }

/* =======================================================
   BALANCE DISPLAY STILI (TĪRS, BEZ RĀMĪŠA, BEZ ZAĻĀS)
   ======================================================= */
.balance-display {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  font-family: monospace;
  transition: all 0.3s ease;
  background: none;
  border: none;
  border-radius: 0;
}

.balance-display.checking {
  color: #aaa;
}

.balance-display.sufficient {
  color: #ffffff;
}

.balance-display.insufficient {
  color: #ff8844;
}

/* =======================================================
   ABOUT POGA UN MODAL (IZLECOŠAIS LOGS) - MODERN CHAT REŽĪMS
   ======================================================= */
.about-button {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.1); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 17px;
  z-index: 150;
  letter-spacing: 0.3px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
}

.about-button:hover {
  background: #ffffff;                                
  color: #000000;                                     
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.55);
  transform: scale(1.10) translateY(-2px);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 17, 23, 0.6); 
  backdrop-filter: blur(8px); 
  animation: fadeInModal 0.2s ease-out;
}

.modal-content {
  background: #f8fafc;       
  color: #334155;            
  margin: 10vh auto;
  padding: 35px;             
  border: 1px solid #e2e8f0; 
  border-radius: 16px;
  width: 85%;
  max-width: 720px;          
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  font-family: 'Inter', sans-serif; 
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-content h2 {
  font-size: 25px;           
  margin-top: 0;
  text-align: center;
  color: #0f172a;            
  background: none;
  font-weight: 700;
  letter-spacing: -0.5px;
  border-bottom: 1px solid #e2e8f0; 
  padding-bottom: 16px;
}

.modal-content h3 {
  color: #1e293b;            
  margin-top: 26px;
  font-weight: 600;
  font-size: 19px;           
}

.modal-content p, .modal-content li {
  line-height: 1.65;        
  font-size: 17px;           
  color: #334155;            
}

.modal-content strong {
  color: #0f172a;            
  font-weight: 600;
}

.close-modal {
  color: #94a3b8;            
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 28px;           
  font-weight: 400;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1;
}

.close-modal:hover {
  color: #0f172a;            
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* =======================================================
   MODAL STYLES (CSP DROŠAS KLASES - NO INLINE UZ KLASĒM)
   ======================================================= */
.modal-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 20px 0;
}

.modal-list {
  padding-left: 0;
}

.modal-list-no-bullets {
  list-style: none;
}

.modal-list-bullets {
  list-style: square;
  padding-left: 20px;
}

.modal-list-ol {
  padding-left: 20px;
}

.modal-list-mb-20 {
  margin-bottom: 20px;
}

.modal-list-item {
  margin-bottom: 8px;
}

.modal-list-item-sm {
  margin-bottom: 6px;
}

/* =======================================================
   MINT SUCCESS MODAL
   ======================================================= */
#mintSuccessModal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001;
  justify-content: center;
  align-items: center;
}

.mint-success-dialog {
  background: #f0f0f0;
  border-radius: 8px;
  padding: 20px 25px;
  max-width: 650px;
  width: 90%;
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 15px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.mint-success-body {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #000;
}

.mint-success-row {
  margin-bottom: 4px;
  color: #000;
}

.mint-success-divider {
  margin: 10px 0;
  border-top: 1px solid #ccc;
}

.mint-success-label {
  color: #000;
}

.mint-success-value {
  color: #000;
}

.mint-success-btn {
  display: block;
  margin: 15px auto 0;
  padding: 10px 45px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  cursor: pointer;
}

/* =======================================================
   RESPONSĪVAIS DIZAINS (MOBILĀS IERĪCES)
   ======================================================= */
@media (max-width: 768px) {
  .logo { position: static; display: block; margin: 0 auto 20px auto; width: 140px; }
  .header-text { padding-top: 0; }
  .site-header { min-height: auto; }
  .chain-selector { flex-wrap: wrap; justify-content: center; gap: 10px; }
  #tokenListContainer { max-width: calc(100% - 40px); left: 20px; right: 20px; top: 100px; }
  #progressBarContainer { width: 90%; }
  #accountDisplay { font-size: 12px; word-break: break-all; }
  
  .about-button {
    position: static;
    margin: 10px auto;
    display: block;
    width: fit-content;
    padding: 10px 24px;
    font-size: 15px;
  }
  .modal-content {
    margin: 5vh auto;
    width: 90%;
    padding: 24px;
  }
}
