:root {
  --bg-primary: #0c0c0e;
  --bg-secondary: #121214;
  --bg-tertiary: #1a1a1d;
  --bg-input: #0f0f11;
  
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a5;
  --text-muted: #5a5a60;
  
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.1);
  
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  
  --border: #2a2a2d;
  --border-subtle: #1f1f22;
  
  --radius: 8px;
  --radius-lg: 12px;
  
  --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

.tagline {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  background: none;
  border: none;
  padding: 12px 16px;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.wallet-section {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border);
}

.wallet-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.wallet-address {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.wallet-balance {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Main Content */
.main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.top-header-title {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-launch-cta {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 10px 24px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}

.btn-launch-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.tab-content {
  display: none;
  flex: 1;
  padding: 32px 40px;
  max-width: 720px;
}

.tab-content.active {
  display: block;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Form Elements */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* File Upload */
.file-upload {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-upload:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.file-upload-text {
  font-size: 14px;
  color: var(--text-muted);
}

.file-upload img {
  max-width: 100px;
  max-height: 100px;
  border-radius: var(--radius);
}

.file-upload.has-image .file-upload-text {
  display: none;
}

.file-upload.has-image img {
  display: block !important;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-input);
  border-color: var(--text-muted);
}

.btn-connect {
  width: 100%;
  background: linear-gradient(135deg, #ab9ff2, #7c3aed);
  color: white;
  padding: 12px;
}

.btn-connect:hover {
  filter: brightness(1.1);
}

.btn-disconnect {
  width: 100%;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px;
  font-size: 12px;
}

.btn-disconnect:hover {
  border-color: var(--error);
  color: var(--error);
}

.btn-large {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.btn-text:hover {
  color: var(--text-secondary);
}

.btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--bg-input);
}

.btn.loading {
  pointer-events: none;
  position: relative;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Action Row */
.action-row {
  display: flex;
  gap: 12px;
}

/* Info Box */
.info-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.info-row span {
  color: var(--text-secondary);
}

.info-row strong {
  color: var(--success);
  font-family: var(--font-mono);
}

/* Holders Box */
.holders-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.holders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}

.holders-count {
  background: var(--accent-muted);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.holders-list {
  max-height: 200px;
  overflow-y: auto;
}

.holder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.holder-item:last-child {
  border-bottom: none;
}

.holder-address {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.holder-amount {
  color: var(--text-primary);
}

.holder-percent {
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Result Box */
.result-box {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  padding: 20px;
}

.result-title {
  font-weight: 600;
  color: var(--success);
  margin-bottom: 16px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.result-row code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-links {
  display: flex;
  gap: 16px;
}

.result-links a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.result-links a:hover {
  text-decoration: underline;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* Section Description */
.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Feed */
.feed-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 14px;
}

.feed-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 16px;
}

.feed-item-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg-input);
  object-fit: cover;
}

.feed-item-content {
  flex: 1;
}

.feed-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.feed-item-name {
  font-weight: 600;
  font-size: 14px;
}

.feed-item-symbol {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.feed-item-address {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.feed-item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.feed-item-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.feed-item-link:hover {
  text-decoration: underline;
}

.feed-item-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.feed-stat {
  font-size: 12px;
  color: var(--success);
  font-family: var(--font-mono);
}

.feed-item:hover {
  border-color: var(--accent);
  background: var(--bg-input);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.modal-symbol {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius);
}

.modal-body {
  padding: 24px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.modal-address {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 10px 12px;
  border-radius: var(--radius);
  word-break: break-all;
}

.modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-stat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
  font-family: var(--font-mono);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-links .btn {
  flex: 1;
  text-decoration: none;
}

.modal-delete {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn-delete {
  width: 100%;
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
  padding: 10px;
  font-size: 13px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-delete:hover {
  background: var(--error);
  color: white;
}

/* Proof List */
.proof-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.proof-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.proof-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.proof-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
}

.proof-time {
  font-size: 11px;
  color: var(--text-muted);
}

.proof-details {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.proof-signatures {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proof-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-muted);
  padding: 4px 8px;
  border-radius: var(--radius);
}

.proof-link:hover {
  background: var(--accent);
  color: white;
}

.no-proofs {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

/* Console */
.console-section {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  margin-left: 260px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.console {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 20px;
  height: 140px;
  overflow-y: auto;
  background: var(--bg-primary);
}

.console-line {
  color: var(--text-muted);
  padding: 2px 0;
}

.console-line.success {
  color: var(--success);
}

.console-line.error {
  color: var(--error);
}

.console-line.info {
  color: var(--accent);
}

.console-line.warning {
  color: var(--warning);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .main {
    margin-left: 0;
  }
  
  .console-section {
    margin-left: 0;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .tab-content {
    padding: 24px 20px;
  }
}
