:root {
  --primary-color: #00ffcc;
  --secondary-color: #0f3460;
  --text-color: #e0e0e0;
  --accent-color: #a9a9e9;
  --error-color: #ff4444;
  --success-color: #00c853;
  --border-radius: 8px;
  --transition-speed: 0.3s;
  --link-color: #00ffcc;
  --link-hover-color: #00e6b8;
}

/* Base styles */
* {
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--secondary-color);
  color: var(--text-color);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Link Styles */
a {
  color: var(--link-color);
  text-decoration: none;
  position: relative;
  transition: all var(--transition-speed) ease;
  padding-bottom: 2px;
}

a:hover {
  color: var(--link-hover-color);
}

a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--link-hover-color);
  transition: width var(--transition-speed) ease;
}

a:hover::after {
  width: 100%;
}

a:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 4px;
  border-radius: 2px;
}

a:active {
  transform: translateY(1px);
}

/* Email links special styling */
a[href^="mailto:"] {
  padding-left: 1.5em;
  position: relative;
}

a[href^="mailto:"]::before {
  content: '✉';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1em;
}

/* Typography */
h1, h2, h3 {
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* File Input Styles */
.file-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.file-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition-speed);
}

.file-group:hover {
  background: rgba(255, 255, 255, 0.1);
}

.input-wrapper {
  flex: 1;
  display: flex;
  gap: 1rem;
}

.file-input,
.password-input {
  padding: 0.75rem;
  border: 1px solid var(--accent-color);
  border-radius: var(--border-radius);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-color);
  transition: var(--transition-speed);
}

.file-input:hover,
.password-input:hover {
  border-color: var(--primary-color);
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-speed);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.primary-btn {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.primary-btn:hover {
  background: #00e6b8;
}

.remove-file-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 0, 0, 0.2);
}

.remove-file-btn:hover {
  background: rgba(255, 0, 0, 0.3);
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

/* Debug Section */

.debug-output {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;       /* Preserves whitespace and wraps text */
    word-wrap: break-word;       /* Breaks long words to prevent overflow */
    max-width: 100%;            /* Ensures content doesn't overflow container */
    overflow-x: auto;           /* Adds horizontal scroll if needed */
    color: var(--accent-color);
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.debug-output.active {
    display: block;
}

/* Debug header with controls */
.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.debug-config-content {
    background-color: rgba(169, 169, 233, 0.05);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.debug-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.debug-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.5rem;
    background-color: rgba(0, 255, 204, 0.05);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.debug-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.debug-option label {
    color: var(--text-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.debug-option select {
    background-color: var(--secondary-color);
    border: 1px solid rgba(169, 169, 233, 0.3);
    border-radius: 4px;
    color: var(--text-color);
    padding: 0.4rem;
    font-size: 0.85rem;
    min-width: 100px;
}

.debug-option select[multiple] {
    min-height: 60px;
    min-width: 150px;
}

.debug-option select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 255, 204, 0.2);
}

.debug-option select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.debug-checkbox,
.sensitive-checkbox,
.verbose-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.debug-checkbox input[type="checkbox"],
.sensitive-checkbox input[type="checkbox"],
.verbose-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.sensitive-checkbox {
    color: var(--error-color);
    font-weight: 500;
}

.verbose-checkbox {
    color: var(--accent-color);
    border-top: 1px solid rgba(169, 169, 233, 0.2);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Debug tabs */
.debug-tabs-container {
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: var(--border-radius);
    background-color: rgba(0, 0, 0, 0.2);
}

.debug-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 255, 204, 0.2);
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.debug-tab {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    border-bottom: 3px solid transparent;
}

.debug-tab:hover {
    background-color: rgba(0, 255, 204, 0.1);
    color: var(--primary-color);
}

.debug-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(0, 255, 204, 0.05);
}

.debug-content {
    position: relative;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.debug-section .toggle-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.debug-section .toggle-header:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding-left: 10px;
    padding-right: 10px;
}

.debug-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Styles */
.footer {
  background: rgba(0, 0, 0, 0.2);
  padding: 2rem;
  margin-top: 3rem;
}

.footer-section {
  margin-bottom: 2rem;
}

.toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-speed);
}

.toggle-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toggle-arrow {
  transition: var(--transition-speed);
}

.content {
  display: none;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Legal Grid */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.legal-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

/* Donation Section */
.donate-section {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
}

.donation-addresses {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.address-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--border-radius);
}

.currency {
  color: var(--primary-color);
  font-weight: bold;
  min-width: 60px;
}

.address {
  word-break: break-all;
  font-family: monospace;
}

/* Loader */
.loader-container {
    position: fixed;
    inset: 0;
    background: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
.loader-message {
    color: var(--text-color);
    margin-bottom: 1rem;
}
.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--accent-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results Section Styles */
.results-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  padding: 0;
  overflow: hidden;
}

.results-section h2 {
  background: rgba(0, 0, 0, 0.3);
  margin: 0;
  padding: 1.5rem;
  color: var(--primary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-section {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-section:last-child {
  border-bottom: none;
}

.result-section h3 {
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.result-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--primary-color);
  margin-right: 0.75rem;
  border-radius: 2px;
}

.result-section pre {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  word-break: break-all;
  white-space: pre-wrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-section pre:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

.check-balance-btn {
  margin: 1rem 0;
  background: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 500;
}

#balanceDisplay {
  display: none;
}

.check-balance-btn:hover {
  background: var(--link-hover-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Raw Output Section */
#rawOutput {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#rawOutput pre {
  margin: 0;
  padding: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--accent-color);
}

/* Key Groups */
.key-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.key-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.key-item:hover {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.3);
  transition: all var(--transition-speed) ease;
}

.key-label {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.key-value {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.copy-icon {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding-left: 0.5rem;
}

.copy-icon:hover {
    opacity: 1;
}

.copy-icon:active {
    transform: scale(0.95);
}

pre {
    position: relative;
    padding: 0.5rem;
    margin: 0.25rem 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Scheme Selection Styles */
.scheme-selection {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition-speed);
}

.scheme-selection:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.scheme-selection > label {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.75rem;
    display: block;
}

.scheme-options {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.scheme-options input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.scheme-options label {
    color: var(--text-color);
    font-weight: normal;
    margin-bottom: 0;
    display: inline;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.scheme-options label:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .input-wrapper {
    flex-direction: column;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .result-section {
      padding: 1rem;
    }

    .key-group {
      grid-template-columns: 1fr;
    }

    .result-section pre {
      font-size: 0.8rem;
      padding: 0.75rem;
    }
  }

/* Utility Classes */
.hidden {
  display: none;
}

/* Structured Results Display */
.result-section {
    margin: 16px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-section h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    font-size: 18px;
}

/* Share Details Styling */
.share-detail-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-detail-card h4 {
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.detail-item {
    display: flex;
    margin: 8px 0;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: var(--accent-color);
    min-width: 120px;
    margin-right: 10px;
}

.detail-value {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
    color: var(--text-color);
}

/* Key Display Styling */
.key-item {
    margin: 12px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.key-item.sensitive {
    border-left-color: var(--error-color);
    background: rgba(255, 68, 68, 0.1);
}

.key-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    font-size: 12px;
}

.key-value {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 4px;
    word-break: break-all;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 11px;
    line-height: 1.4;
}

.key-value.copyable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.key-value.copyable:hover {
    background: rgba(0, 255, 204, 0.1);
}

.copy-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.key-value.copyable:hover .copy-icon {
    opacity: 1;
}

/* Coin Cards Styling */
.coin-card {
    background: rgba(255, 255, 255, 0.05);
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.coin-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.coin-header:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.coin-name-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.coin-icon {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
}

.crypto-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.crypto-icon-fallback {
    font-size: 20px;
    display: inline-block;
}

.coin-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.coin-address {
    font-size: 12px;
    opacity: 0.9;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coin-details {
    padding: 16px;
}

.toggle-arrow {
    font-size: 18px;
    transition: transform 0.3s;
}

.toggle-arrow.rotated {
    transform: rotate(180deg);
}

/* Security Warning */
.security-warning {
    background: var(--error-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 10px;
}

.sensitive-data {
    color: var(--error-color) !important;
}

.sensitive-content {
    background: rgba(255, 68, 68, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

/* Action Buttons */
.action-buttons {
    margin: 20px 0;
    text-align: center;
}

.check-balance-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.check-balance-btn:hover {
    background: #00a043;
    transform: translateY(-1px);
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .coin-header {
        padding: 10px 12px;
    }
    
    .coin-name {
        font-size: 14px;
    }
    
    .coin-address {
        max-width: 200px;
    }
    
    .coin-icon .crypto-icon {
        width: 20px;
        height: 20px;
    }
    
    .coin-icon .crypto-icon-fallback {
        font-size: 16px;
    }
    
    .key-value {
        font-size: 10px;
        padding: 6px;
    }
    
    .result-section {
        margin: 12px 0;
        padding: 12px;
    }
    
    .result-section h3 {
        font-size: 16px;
    }
}