body {
  background: linear-gradient(135deg, #0D2524 0%, #1A3C3A 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: #E0F2F1;
  font-size: 1rem;
  line-height: 1.6;
}

.canvas-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
}

.card {
  backdrop-filter: blur(10px);
  background: rgba(38, 166, 154, 0.1);
  border: 1px solid rgba(38, 166, 154, 0.2);
  padding: 1.5rem;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.glow {
  text-shadow: 0 0 10px rgba(38, 166, 154, 0.6);
}

.animate-pulse-slow {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

h1,
h2,
h3 {
  color: #B2DFDB;
}

a {
  color: #80CBC4;
  text-decoration: underline;
}

a:hover {
  color: #26A69A;
}

button {
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.375rem;
}

button:focus {
  outline: 3px solid #80CBC4;
  outline-offset: 2px;
}

input,
textarea {
  background: #0D2524;
  border: 1px solid #26A69A;
  border-radius: 0.375rem;
  padding: 0.75rem;
  color: #E0F2F1;
}

input:focus,
textarea:focus {
  outline: 3px solid #80CBC4;
  border-color: #26A69A;
}

.container {
  max-width: 100%;
  padding: 1rem;
}

.grid {
  gap: 1rem;
}

.ledger-hash {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
  font-family: monospace;
  font-size: 0.95em;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .ledger-hash {
    font-size: 0.85em;
    word-break: break-all;
    max-width: 90vw;
  }
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }

  .grid {
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }

  #walletInfo {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }

  #mission .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  #services .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blockchain Section Styling */
.blockchain-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .blockchain-card {
    flex-direction: row;
    align-items: center;
  }

  .blockchain-card img {
    margin-right: 1.5rem;
  }
}

@media (max-width: 639px) {
.template-action-buttons {
opacity: 1 !important;
pointer-events: auto !important;
}
}

/* Devnet Portal Specific Styles */
.network-btn {
  background: rgba(75, 85, 99, 0.3);
  color: #E5E7EB;
  border: 1px solid rgba(75, 85, 99, 0.5);
}

.network-btn.active {
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: white;
  border: 1px solid #14B8A6;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

.network-btn:hover:not(.active):not([disabled]) {
  background: rgba(20, 184, 166, 0.2);
  border-color: #14B8A6;
}

.template-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.15);
}

.account-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(75, 85, 99, 0.5);
  transition: all 0.3s ease;
}

.account-card:hover {
  border-color: #14B8A6;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}

.feed-item {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #14B8A6;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  opacity: 0;
  animation: feedSlideIn 0.3s ease forwards;
}

@keyframes feedSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.result-success {
  background: rgba(34, 197, 94, 0.1);
  border-left: 4px solid #22C55E;
}

.result-error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #EF4444;
}

.result-pending {
  background: rgba(251, 191, 36, 0.1);
  border-left: 4px solid #FBBF24;
}

.json-editor {
  font-family: 'Courier New', monospace;
  line-height: 1.5;
}

/* Scrollbar Styling */
#feedContainer::-webkit-scrollbar,
#resultsContainer::-webkit-scrollbar {
  width: 6px;
}

#feedContainer::-webkit-scrollbar-track,
#resultsContainer::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

#feedContainer::-webkit-scrollbar-thumb,
#resultsContainer::-webkit-scrollbar-thumb {
  background: #14B8A6;
  border-radius: 3px;
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
  .xl\:col-span-1 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .network-btn {
    font-size: 14px;
    padding: 12px 16px;
  }

  .network-btn span.text-xs {
    display: none;
  }

  #jsonEditor {
    height: 200px;
  }

  #feedContainer {
    height: 200px;
  }
}

/* Responsive button group for credentials section */
@media (max-width: 768px) {
  

  #credentialsSection .flex-1 {
    min-width: 0 !important;
  }

 

  #downloadDropdown {
    min-width: 100% !important;
    left: 0 !important;
    right: auto !important;
  }
}

#credentialsSection .flex {
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

@media (max-width: 1023px) {
  #credentialsSection .credentials-btn-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  #credentialsSection .credentials-btn-group .flex-1 {
    min-width: 0;
    width: 100%;
  }

  #credentialsSection .credentials-btn-group button,
  #credentialsSection .credentials-btn-group .relative>button {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive Connection Status */
@media (max-width: 640px) {
  .connection-status-box {
    padding: 1rem !important;
    border-radius: 1rem !important;
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem !important;
  }

  .connection-status-box p {
    font-size: 1rem !important;
  }

  .connection-status-box p.text-sm {
    font-size: 0.85rem !important;
  }
}

/* Responsive account tiles for mobile */
@media (max-width: 768px) {
  #accountsList .grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  } 

  #accountsList>div[class*="bg-gray-800"] {
    min-height: 200px !important;
    padding: 1rem !important;
  }

  #accountsList .flex.justify-between {
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
  }

  #accountsList .flex.gap-1 {
    flex-direction: row !important;
    gap: 0.25rem !important;
  }

  #accountsList .font-mono,
  #accountsList .break-all {
    word-break: break-all;
    white-space: pre-wrap;
    min-width: 0;
    font-size: 0.95em;
  }

  #accountsList .space-y-1 {
    gap: 0.5rem !important;
  }

  #accountsList .text-xs,
  #accountsList .text-sm {
    font-size: 0.98em !important;
  }

  /* New: Ensure MPT issuance details wrap and fit on mobile */
  #accountsList .text-gray-400.text-xs {
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 0.9em !important;  /* Slightly smaller for MPT details */
    line-height: 1.4;  /* Tighter line height for multi-line */
  }

  /* New: Increase trust lines max-height on mobile for MPT details */
  #accountsList .max-h-32 {
    max-height: 10rem;  /* Increased from 8rem to accommodate multi-line MPT info */
  }
} 

/* Extra: Make trust lines scrollable and readable on mobile */
#accountsList .max-h-32 {
  max-height: 8rem;
  overflow-y: auto;
}

#accountsList .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  #accountsList .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  #accountsList .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Account tile action buttons: row on desktop, column on mobile */
.account-actions {
  display: flex;
  gap: 0.25rem;
}

@media (max-width: 768px) {
  .account-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }

  /* Ensure the tile header stacks nicely */
  #accountsList .flex.justify-between.items-start {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  /* Reduce padding for account tiles */
  #accountsList .bg-gray-800\/50 {
    padding: 0.75rem !important;
    min-height: 200px !important;
  }
}