/* ... (SEMUA KODE CSS ANDA DI SINI) ... */

:root {
  /* === Palet Warna dari Gambar (Deep Neutral & Peach) === */
  --primary: #8c7c73; /* Deep Taupe - Aksi Utama (Calm) */
  --primary-hover: #736761;
  --secondary: #3a3848; /* Deep Navy/Plum - Sidebar, Kontras Utama */
  --accent: #e67e22; /* Copper/Burnt Orange - Highlight & CTA (Eksternal) */
  --complementary: #cfa88b; /* Soft Tan/Camel - Untuk elemen pelengkap */
  --success: #10b981; /* Emerald Green (Tetap untuk validasi) */
  --warning: #f1c40f; /* Yellow/Amber */
  --danger: #ef4444; /* Red */

  /* === Backgrounds & Text (Warm Neutral Mode) === */
  --bg-body: #f7e2d0; /* Light Peach/Cream - Latar belakang sangat lembut */
  --bg-card: #ffffff;
  --text-main: #3a3848; /* Deep Navy/Plum - Teks utama (dari Secondary) */
  --text-muted: #8c7c73; /* Muted Text (dari Primary) */
  --border: #e8d0c0; /* Light Peach/Tan Border */

  --sidebar-width: 260px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

/* === LAYOUT UTAMA === */
.app-container {
  display: flex;
  height: 100vh;
}

/* === SIDEBAR (Menggunakan Secondary Color - Deep Navy/Plum) === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--secondary); /* Deep Navy/Plum */
  color: white;
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
}

.brand {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f7e2d0; /* Light Peach/Cream untuk Logo */
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.nav-links button {
  background: transparent;
  border: none;
  color: #e8d0c0; /* Teks menu Light Peach/Tan */
  padding: 12px 15px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links button:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.nav-links button.active {
  background: var(--primary); /* PRIMARY: Deep Taupe */
  color: white;
  box-shadow: 0 4px 12px rgba(140, 124, 115, 0.4);
}

.footer-nav {
  font-size: 12px;
  color: #e8d0c0;
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* === CONTENT AREA === */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.page {
  display: none;
  animation: fadeIn 0.4s ease-out;
  max-width: 1100px;
  margin: 0 auto;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === TYPOGRAPHY & ELEMENTS === */
h1, h2, h3 {
  color: var(--text-main);
  margin-bottom: 10px;
}

.header-section {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.header-section p {
  color: var(--text-muted);
}

.panel {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

/* === FORMS === */
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 15px;
  transition: border 0.2s;
  background: #ffffff;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary); /* Fokus border Deep Taupe */
  background: white;
  box-shadow: 0 0 0 3px rgba(140, 124, 115, 0.15);
}

.readonly-input, .output {
  background: #fcf6f8; /* Sangat Light Peach/Off-white */
  color: var(--text-main);
  cursor: not-allowed;
  border-color: var(--complementary); /* Soft Tan Border */
}

.code-font, .hash-display, .output {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  word-break: break-all;
}

/* === BUTTONS === */
button {
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  transition: transform 0.1s, opacity 0.2s;
}

button:active {
  transform: scale(0.98);
}

.btn-primary { background: var(--primary); color: white; padding: 12px 24px; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--complementary); /* COMPLEMENTARY: Soft Tan */
  color: var(--text-main); padding: 10px 20px;
}
.btn-secondary:hover { opacity: 0.9; }

.btn-accent { background: var(--accent); color: white; padding: 10px 20px; }
.btn-success { background: var(--success); color: white; padding: 10px 20px; }
.btn-warning { background: var(--warning); color: var(--text-main); padding: 10px 20px; }

/* === MINING PANEL LAYOUT === */
.mining-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.form-group { flex: 1; min-width: 200px; }
.full-width { flex: 100%; }

.hash-result {
  background: #fbf0f5; /* Sangat Light Peach/Cream background */
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed var(--complementary); /* Soft Tan Border */
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 15px;
}

.speed-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.speed-box select { width: auto; margin-bottom: 0; }

.status-text {
  font-weight: bold;
  color: var(--primary);
  margin-top: 10px;
  min-height: 20px;
}
.mining-panel .mine {
  width: 150px;
}


/* === BLOCKCHAIN SCROLL === */
.blockchain-scroll {
  display: flex;
  overflow-x: auto;
  padding: 20px 5px;
  gap: 20px;
  padding-bottom: 40px;
}

/* Scrollbar styling */
.blockchain-scroll::-webkit-scrollbar { height: 10px; }
.blockchain-scroll::-webkit-scrollbar-track { background: #f1f5f9; }
.blockchain-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }

.blockchain-block {
  min-width: 320px;
  max-width: 320px;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.3s;
}

.blockchain-block:hover {
  transform: translateY(-5px);
}

/* Connecting line effect */
.blockchain-block::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  width: 20px;
  height: 4px;
  background: var(--border);
  z-index: -1;
}
.blockchain-block:last-child::after { display: none; }

.blockchain-block h3 {
  background: var(--primary); /* Deep Taupe untuk judul block */
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 15px;
}

/* Block Invalid Feedback */
.blockchain-block.invalid {
  border-color: var(--danger);
  background: #fee2e2;
  animation: pulse-danger 1s infinite alternate;
}

.blockchain-block.invalid h3 {
  background: var(--danger);
}

@keyframes pulse-danger {
  from { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  to { box-shadow: 0 0 10px 5px rgba(239, 68, 68, 0.4); }
}

.blockchain-block.valid {
  border-color: var(--success);
  animation: flash-success 0.5s ease-out;
}

@keyframes flash-success {
  0% { background: #dcfce7; }
  100% { background: white; }
}

/* === WALLETS & CONSENSUS === */
.wallets-container {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.wallet-card {
  flex: 1;
  min-width: 200px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent); /* Border Top Aksen Copper */
}

.wallet-header { font-weight: 700; color: var(--text-main); margin-bottom: 5px; }
.balance { font-size: 14px; color: var(--success); font-weight: 600; margin-bottom: 15px; }

.tx-form { display: flex; gap: 5px; }
.tx-form select { flex: 2; margin-bottom: 0; padding: 8px; }
.tx-form input { flex: 1; margin-bottom: 0; padding: 8px; }
.tx-form button { background: var(--primary); color: white; width: 40px; border-radius: 6px; }

.consensus-controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chains-display { margin-top: 30px; }

.chain-row-wrapper {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.chain-row {
  display: flex;
  gap: 10px;
  min-width: max-content;
}

.chain-block {
  width: 220px;
  font-size: 11px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 10px;
  border-radius: 6px;
}

.chain-block.invalid {
  background: #fecaca;
  border-color: #ef4444;
}

/* === ABOUT PAGE === */
.about-grid {
  display: flex;
  gap: 30px;
  align-items: start;
}

.profile-card {
  flex: 1;
  background: white;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.photo-wrapper img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--complementary); /* Border Soft Tan */
  margin-bottom: 20px;
}

.badge {
  background: #fbf0f5; /* Light Peach Badge */
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.bio { margin: 20px 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

.social-stats {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 13px;
}

.details-section { flex: 1.5; display: flex; flex-direction: column; gap: 20px; }
.map-box, .contact-form { background: white; padding: 20px; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* TOMBOL CV */
.btn-cv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* TOMBOL CV menggunakan Copper yang kontras */
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  margin-top: 25px;
  width: 100%;
  box-shadow: 0 4px 10px rgba(230, 126, 34, 0.4);
  transition: all 0.3s ease;
}

.btn-cv:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(230, 126, 34, 0.5);
  opacity: 0.95;
}

.btn-cv i {
  font-size: 18px;
}

/* === HERO (HOME) - Centered Style === */
.hero-section {
  text-align: center;
  padding: 80px 20px; /* Padding vertikal yang lebih besar untuk tampilan centered */
  min-height: 80vh; /* Agar konten tidak terlalu naik ke atas */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-section h1 { font-size: 2.5rem; margin-bottom: 15px; }
.highlight { color: var(--primary); }
.subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 50px; }

.hero-cards {
  display: flex;
  justify-content: center;
  gap: 30px; /* Jarak antar kartu lebih besar */
  flex-wrap: wrap;
}

.card-info {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 200px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.card-info:hover {
  transform: translateY(-10px);
  border-color: var(--primary); /* Hover border Deep Taupe */
}

.card-info i { font-size: 40px; color: var(--primary); margin-bottom: 15px; }

/* ECC STYLING */
.key-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.divider {
  margin: 25px 0;
  border: 0;
  border-top: 1px dashed var(--border);
}

.result-box {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
}

.result-box.success {
  background: #dcfce7;
  color: var(--success);
  border: 1px solid var(--success);
}
.result-box.error {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Responsive Mobile */
@media (max-width: 768px) {
  .app-container { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; padding: 15px; flex-direction: row; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
  .brand { margin-bottom: 0; font-size: 18px; }
  
  .nav-links { 
    display: flex; 
    flex-direction: row; 
    overflow-x: auto; 
    position: static; 
    padding: 0; 
    background: transparent; 
    margin-top: 15px;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links button { padding: 8px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
  .footer-nav { display: none; }
  
  .content-area { padding: 15px; overflow-y: auto; height: calc(100vh - 50px); }
  
  .hero-section { padding: 40px 10px; min-height: 60vh; }
  .hero-section h1 { font-size: 1.8rem; }
  .subtitle { font-size: 1rem; margin-bottom: 30px; }
  .hero-cards { gap: 15px; }
  .card-info { width: 150px; padding: 20px; }
  .card-info i { font-size: 30px; }

  .mining-panel, .wallets-container, .about-grid { flex-direction: column; }
  .form-group { min-width: 100%; }
  .controls { flex-direction: column; align-items: stretch; }
  .speed-box { justify-content: space-between; margin-bottom: 10px; }
  .mining-panel .mine { width: 100%; }

  .about-grid { gap: 20px; }
  .profile-card { padding: 20px; }
  .key-group { grid-template-columns: 1fr; gap: 10px; }
  .tx-form { flex-direction: row; }
  
  .consensus-controls { flex-direction: column; }
  .chain-row-wrapper { overflow-x: auto; }
}