/* Modern CSS Reset */
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: #222;
}
.container {
  max-width: 1200px;
  width: 90vw;
  margin: 2rem auto;
  padding: 0 2vw;
}
.app-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.5rem 0 1rem 0;
  margin-bottom: 1.5rem;
}
.app-title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: #2563eb;
  text-align: center;
}
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(37,99,235,0.07), 0 1.5px 4px rgba(0,0,0,0.03);
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  margin-bottom: 2.5rem;
}
.tabs-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
}
.tab-btn {
  background: #f1f5fa;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 2.2rem;
  font-size: 1.1rem;
  color: #2563eb;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
}
.tab-btn.active, .tab-btn:focus {
  background: #2563eb;
  color: #fff;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.4s;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.wallet-section {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem;
  border-radius: 12px;
  background: #f7fafd;
  box-shadow: 0 1px 4px rgba(37,99,235,0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}
.wallet-section h2, .wallet-section h3 {
  margin-top: 0;
  color: #2563eb;
}
.actions-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.5rem 0;
  align-items: center;
}
.primary-btn, .secondary-btn {
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
}
.primary-btn {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.primary-btn:hover, .primary-btn:focus {
  background: #1746a2;
}
.secondary-btn {
  background: #f1f5fa;
  color: #2563eb;
}
.secondary-btn:hover, .secondary-btn:focus {
  background: #e0e7ef;
  color: #1746a2;
}
.modern-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #c3cfe2;
  border-radius: 8px;
  font-size: 1.05rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  transition: border 0.2s;
  outline: none;
  background: #f7fafd;
}
.modern-input:focus {
  border-color: #2563eb;
  background: #fff;
}
.qr-container {
  margin: 1rem 0 0.5rem 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(37,99,235,0.08);
  padding: 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
#utxoTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.98rem;
}
#utxoTable th, #utxoTable td {
  border: 1px solid #e0e7ef;
  padding: 0.5rem 0.7rem;
  text-align: left;
  word-break: break-all;
}
#utxoTable th {
  background: #f1f5fa;
  color: #2563eb;
  font-weight: 600;
}
#utxoTable tr:nth-child(even) {
  background: #f7fafd;
}
pre {
  background: #f7fafd;
  border-radius: 8px;
  font-size: 0.98rem;
  color: #222;
}
.error-msg {
  color: #e53e3e;
  margin-top: 0.5rem;
  font-size: 1rem;
}
#securityTips {
  background: #f7fafd;
  border: 1.5px solid #c3cfe2;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(37,99,235,0.04);
  margin-top: 2rem;
}
#securityTips h3 {
  color: #1746a2;
}
#securityTips ul {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
  font-size: 1.05rem;
}
#copiedMsg {
  color: #2563eb !important;
  font-weight: 500;
}
.wallet-print {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.wallet-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}
.wallet-col {
  flex: 1;
  text-align: center;
  margin: 0 0.5rem;
}
.wallet-col .label {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}
.wallet-col.share .label { color: #22b573; }
.wallet-col.secret .label { color: #e53e3e; }
.qr-container {
  margin: 0.5rem auto;
  width: 120px;
  height: 120px;
  border: 1px solid #eee;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.key-text {
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 1rem;
  margin-top: 0.5rem;
  word-break: break-all;
}
.wallet-info {
  margin-top: 1.2rem;
  font-size: 0.98rem;
  background: #f7fafd;
  border: 1px solid #c3cfe2;
  border-radius: 8px;
  padding: 0.8rem;
}
/* SPV Tab styles */
#beefValidationError {
  color: #b91c1c;
  font-weight: 500;
}
#beefValidationResult {
  font-size: 1.05em;
  margin-top: 0.5rem;
}
#beefValidationResult ul {
  margin: 0.5em 0 0 1.2em;
  padding: 0;
}
#beefValidationResult span {
  color: green;
  font-weight: 500;
}
/* BEEF validation table styles */
.beef-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  margin-top: 0.5em;
  background: #fff;
  font-size: 0.98rem;
  font-family: 'Fira Mono', 'Consolas', monospace;
  table-layout: auto;
}
.beef-table th, .beef-table td {
  border: 1px solid #e0e7ef;
  padding: 0.5rem 0.7rem;
  text-align: left;
  word-break: break-all;
}
.beef-table th {
  background: #f1f5fa;
  color: #2563eb;
  font-weight: 600;
}
.beef-table tr:nth-child(even) {
  background: #f7fafd;
}
.beef-table-container {
  width: 100%;
  max-width: 100%;
  margin: 1.2em 0 1em 0;
  overflow-x: auto;
  padding: 0;
}
.beef-upload-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}
.beef-upload-form input[type="file"] {
  border: 1.5px solid #c3cfe2;
  border-radius: 8px;
  background: #f7fafd;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #2563eb;
  transition: border 0.2s, background 0.2s;
  outline: none;
}
.beef-upload-form input[type="file"]:focus {
  border-color: #2563eb;
  background: #fff;
}
.beef-upload-form .primary-btn {
  font-size: 1.08rem;
  padding: 0.8rem 2.2rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.address-flex-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin: 1.2rem 0 1.5rem 0;
  flex-wrap: wrap;
}
.address-flex-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.2rem 0 1.5rem 0;
}
#importAddressDiv {
  font-size: 1.25rem;
  font-weight: 500;
  word-break: break-all;
  text-align: center;
  max-width: 420px;
}
#importAddressQR {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 160px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 0.5rem;
}
@media (max-width: 600px) {
  .container {
    padding: 0 0.2rem;
  }
  .card {
    padding: 1rem 0.5rem 1rem 0.5rem;
  }
  .wallet-section {
    padding: 0.7rem 0.3rem;
  }
  .app-title {
    font-size: 1.3rem;
  }
}
@media (max-width: 700px) {
  .beef-upload-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }
}
@media print {
  /* Wallet printing: hide non-wallet sections */
  body.print-wallets header,
  body.print-wallets nav,
  body.print-wallets .tabs-nav,
  body.print-wallets .tab-content:not(#generateTab),
  body.print-wallets #securityTips,
  body.print-wallets footer {
    display: none !important;
  }
  body.print-wallets #walletsPrint {
    display: block !important;
    position: static !important;
    width: 100vw !important;
    background: white !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0.5in !important;
    z-index: 9999 !important;
  }

  /* UTXO printing: hide non-import sections */
  body.print-import header,
  body.print-import nav,
  body.print-import .tabs-nav,
  body.print-import .tab-content:not(#importTab),
  body.print-import #securityTips,
  body.print-import footer {
    display: none !important;
  }
  body.print-import #importResult {
    display: block !important;
    position: static !important;
    width: 100vw !important;
    background: white !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0.5in !important;
    z-index: 9999 !important;
  }

  /* Center wallet rows and columns in print */
  #walletsPrint .wallet-row {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 4rem !important;
    max-width: 700px !important;
    margin: 0 auto 2.2rem auto !important;
    width: auto !important;
  }
  #walletsPrint .wallet-col {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    font-size: 1em !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide the security tip and wallet controls in print */
  #securityTipBox,
  #generateTab > div:first-child {
    display: none !important;
  }
} 