body {
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  margin: 0;
  padding: 0;
  background: #0a0c12;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 255, 231, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(213, 128, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(0, 191, 255, 0.02) 0%, transparent 50%);
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 {
  color: #fff;
  text-shadow: 
    0 0 10px #00ffe7, 
    0 0 20px #00ffe7, 
    0 0 30px #00ffe7;
  margin: 10px 15px;
  font-weight: 600;
}

h3 {
  text-align: center;
  margin: 15px 10px;
  font-size: 1.1em;
}

.app-desc {
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.5em;
  color: #b0b0b0;
  margin: 0 10px 15px 10px;
  text-align: center;
  text-shadow: 0 0 5px rgba(224, 224, 224, 0.3);
  display: block;
  line-height: 1.4;
}

.logo-container {
  text-align: center;
  margin: 10px 0;
  padding: 0 10px;
}

.logo-container img {
  width: 90%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 255, 231, 0.4));
}

.console-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 15px;
  padding: 0 5px;
}

/* Status Bar Styles */
.status-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 10px;
  background: linear-gradient(145deg, #151721, #1a1c28);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 231, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 231, 0.1);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.status-indicator.active {
  box-shadow: 0 0 10px rgba(0, 255, 231, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  animation: pulse 2s infinite;
}

.status-indicator.pqc-miner.active .status-dot {
  background: #00ffe7;
  box-shadow: 0 0 8px rgba(0, 255, 231, 0.6);
}

.status-indicator.pqc-validator.active .status-dot {
  background: #d580ff;
  box-shadow: 0 0 8px rgba(213, 128, 255, 0.6);
}

.status-indicator.pqc-network.active .status-dot {
  background: #00bfff;
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.6);
}

.status-indicator.pqc-miner.active {
  color: #00ffe7;
  border-color: rgba(0, 255, 231, 0.3);
  background: rgba(0, 255, 231, 0.05);
}

.status-indicator.pqc-validator.active {
  color: #d580ff;
  border-color: rgba(213, 128, 255, 0.3);
  background: rgba(213, 128, 255, 0.05);
}

.status-indicator.pqc-network.active {
  color: #00bfff;
  border-color: rgba(0, 191, 255, 0.3);
  background: rgba(0, 191, 255, 0.05);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Logger Bar Styles */
.logger-bar {
  background: linear-gradient(145deg, #181a23, #1a1c28);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid rgba(0, 255, 231, 0.15);
  box-shadow: 0 0 10px rgba(0, 255, 231, 0.1);
}

.logger-info {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  font-size: 0.7em;
}

.logger-item {
  text-align: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.logger-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.logger-item.last-block {
  border-left-color: #00ffe7;
}

.logger-item.last-miner-sig {
  border-left-color: #00bfff;
}

.logger-item.last-validator-sig {
  border-left-color: #d580ff;
}

.logger-label {
  display: block;
  color: #888;
  font-size: 0.85em;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logger-value {
  color: #fff;
  font-weight: bold;
  word-break: break-all;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.logger-value:hover {
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.logger-item.last-block .logger-value {
  color: #00ffe7;
  text-shadow: 0 0 5px rgba(0, 255, 231, 0.5);
}

.logger-item.last-miner-sig .logger-value {
  color: #00bfff;
  text-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
}

.logger-item.last-validator-sig .logger-value {
  color: #d580ff;
  text-shadow: 0 0 5px rgba(213, 128, 255, 0.5);
}

.console-box {
  background: linear-gradient(145deg, #181a23, #1a1c28);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 16px;
  box-shadow: 
    0 0 20px rgba(0, 255, 231, 0.3),
    0 0 40px rgba(0, 255, 231, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 15px;
  height: 200px;
  overflow-y: auto;
  font-family: inherit;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  position: relative;
}

.console-box::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00796d, #68407e, #005270, #00756c);
  border-radius: 16px;
  z-index: -1;
  opacity: 0.6;
}

.console-box:hover {
  box-shadow: 
    0 0 30px rgba(0, 255, 231, 0.5),
    0 0 60px rgba(0, 255, 231, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.console-title {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 10px;
  color: #00ffe7;
  letter-spacing: 1px;
  text-shadow: 
    0 0 10px #00ffe7,
    0 0 20px #00ffe7;
}

.console-title.block-toggle,
.console-title.tx-toggle {
  border: 2px solid transparent;
  background: linear-gradient(145deg, #1a1c28, #23263a) padding-box,
              linear-gradient(45deg, #00ffe7, #d580ff) border-box;
  color: #888;
  font-size: 0.9em;
  font-weight: bold;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 12px 15px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.console-title.block-toggle::before,
.console-title.tx-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.console-title.block-toggle:hover::before,
.console-title.tx-toggle:hover::before {
  left: 100%;
}

.console-title.tx-toggle {
  background: linear-gradient(145deg, #1a1c28, #23263a) padding-box,
              linear-gradient(45deg, #d580ff, #00ffe7) border-box;
}

.log-entry {
  margin: 3px 0;
  padding: 6px 8px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  word-break: break-all;
  font-size: 0.7em;
  line-height: 1.3;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}

.block {
  color: #00ffe7;
  text-shadow: 0 0 8px #00ffe7;
  border-left-color: #00ffe7;
  background: rgba(0, 255, 231, 0.05);
}

.proof {  
  color: #00bfff;
  text-shadow: 0 0 8px #00bfff;
  border-left-color: #00bfff;
  background: rgba(0, 191, 255, 0.05);
}

.error {
  color: #ff357a;
  text-shadow: 0 0 8px #ff357a;
  border-left-color: #ff357a;
  background: rgba(255, 53, 122, 0.05);
  animation: errorPulse 1s ease-in-out;
}

.tx-event {
  color: #d580ff;
  text-shadow: 0 0 8px #d580ff;
  border-left-color: #d580ff;
  background: rgba(213, 128, 255, 0.05);
}

.transaction {
  color: #b39ddb;
  text-shadow: 0 0 8px #b39ddb;
  border-left-color: #b39ddb;
  background: rgba(179, 157, 219, 0.05);
}

@keyframes errorPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

::selection {
  background: rgba(0, 255, 231, 0.3);
  color: #fff;
}

.console-container > div:last-child .console-title {
  color: #d580ff;
  text-shadow: 
    0 0 10px #d580ff,
    0 0 20px #d580ff;
}

#txLog.console-box::before {
  background: linear-gradient(45deg, #00796d, #68407e, #005270, #00756c);
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: linear-gradient(145deg, #1a1c28, #23263a);
  padding: 20px;
  border-radius: 15px;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  border: 2px solid #00ffe7;
  box-shadow: 0 0 30px rgba(0, 255, 231, 0.3);
}

.popup-content h3 {
  color: #00ffe7;
  margin-top: 0;
  text-align: center;
}

.popup-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.8em;
  overflow-x: auto;
  border: 1px solid #444;
}

.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.search-buttons-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 15px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85em;
}

.search-input::placeholder {
  color: #888;
}

.search-btn {
  padding: 8px 16px;
  background: linear-gradient(145deg, #00bcd4, #8000a7);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.3s ease;
}

.search-btn-icon {
  flex: 1;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: linear-gradient(145deg, #00bcd4, #8000a7);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover,
.search-btn-icon:hover {
  background: linear-gradient(145deg, #0097a7, #00acc1);
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
}

.search-btn-emoji {
  font-size: 24px;
  line-height: 1;
}

.search-btn-text {
  font-size: 11px;
  margin-top: 4px;
}

.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(145deg, #00bcd4, #006aa7);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 0.9em;
  margin-top: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary:hover {
  background: linear-gradient(145deg, #0097a7, #00acc1);
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
}

.network-button-container {
  text-align: center;
  margin-top: 15px;
}

.app-footer {
  text-align: center;
  margin-top: 60px;
  font-size: 0.75em;
  color: #888;
}

.app-footer .api-url {
  font-family: 'Fira Mono', monospace;
}

/* Custom scrollbar for webkit browsers */
.console-box::-webkit-scrollbar {
  width: 6px;
}

.console-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.console-box::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00ffe7, #d580ff);
  border-radius: 3px;
}

.console-box::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #d580ff, #00ffe7);
}

/* Mobile Responsive Design */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  h3 {
    font-size: 1em;
    margin: 10px 5px;
  }

  .app-desc {
    font-size: 0.75em;
    margin: 0 5px 10px 5px;
    padding: 0 10px;
  }

  .logo-container {
    margin: 5px 0;
  }

  .logo-container img {
    width: 95%;
    max-width: 300px;
  }

  .console-container {
    gap: 15px;
    margin: 10px;
    padding: 0 2px;
  }

  .search-buttons-container {
    gap: 8px;
  }

  .search-btn-icon {
    max-width: 120px;
    padding: 10px 6px;
  }

  .search-btn-emoji {
    font-size: 20px;
  }

  .search-btn-text {
    font-size: 10px;
    margin-top: 3px;
  }

  .status-bar {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  .status-indicator {
    justify-content: center;
    font-size: 0.7em;
    padding: 5px 8px;
  }

  .logger-info {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .logger-item {
    padding: 6px;
  }

  .logger-label {
    font-size: 0.8em;
  }

  .console-box {
    height: 180px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .console-box::before {
    border-radius: 12px;
  }

  .console-title.block-toggle,
  .console-title.tx-toggle {
    font-size: 0.85em;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .log-entry {
    font-size: 0.65em;
    padding: 4px 6px;
    margin: 2px 0;
    line-height: 1.2;
  }

  .console-box::-webkit-scrollbar {
    width: 4px;
  }

  .network-button-container {
    margin-top: 12px;
  }

  .app-footer {
    margin-top: 40px;
    font-size: 0.7em;
    padding: 0 10px;
  }
}

/* iPhone specific optimizations */
@media (max-width: 414px) {
  .console-container {
    margin: 8px;
  }

  .console-box {
    height: 160px;
    padding: 10px;
  }

  .log-entry {
    font-size: 0.6em;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
  h3 {
    font-size: 0.9em;
  }

  .app-desc {
    font-size: 0.7em;
  }

  .console-box {
    height: 140px;
    padding: 8px;
  }

  .console-title.block-toggle,
  .console-title.tx-toggle {
    font-size: 0.8em;
    padding: 8px 10px;
  }

  .log-entry {
    font-size: 0.55em;
    padding: 3px 5px;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 896px) and (orientation: landscape) {
  .console-box {
    height: 120px;
  }

  .logo-container img {
    width: 60%;
    max-width: 250px;
  }

  .console-container {
    gap: 12px;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  body {
    background: #050608;
  }

  .console-box {
    background: linear-gradient(145deg, #121318, #151721);
    box-shadow: 
      0 0 25px rgba(0, 255, 231, 0.4),
      0 0 50px rgba(0, 255, 231, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}
