/* ========================================
   BITTENSOR WALLET PAGE - STYLES
   ======================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #faf0f0;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ TOP NAV ============ */

.top-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(250, 240, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover {
  color: #1a1a1a;
}

.nav-link.active {
  color: #1a1a1a;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-cta {
  text-decoration: none;
  background: #1a1a1a;
  color: #fff;
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}

.nav-cta:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ============ HERO SECTION ============ */

.hero {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 20px 30px;
  background: #faf0f0;
}

.hero-diagram {
  position: relative;
  width: 580px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badges (Google & OpenAI) */
.badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2a2a2a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
  white-space: nowrap;
  animation: badgeFadeIn 0.8s ease both;
}

.badge-google {
  bottom: 0;
  left: 0;
  animation-delay: 0.3s;
}

.badge-openai {
  top: 0;
  right: 0;
  animation-delay: 0.5s;
}

.badge-logo {
  flex-shrink: 0;
}

/* SVG Cables */
.cable {
  position: absolute;
  z-index: 1;
}

.cable-google {
  width: 200px;
  height: 160px;
  left: 60px;
  bottom: 20px;
}

.cable-openai {
  width: 200px;
  height: 160px;
  right: 60px;
  top: 10px;
}

.cable-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawCable 1.5s ease forwards 0.2s;
}

@keyframes drawCable {
  to {
    stroke-dashoffset: 0;
  }
}

/* Central Bittensor Box */
.center-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #3a3a3a;
  padding: 20px 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 3;
  position: relative;
  animation: boxPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes boxPop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Pulse ring around center box */
.pulse-ring {
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(74, 144, 217, 0.3);
  border-radius: 22px;
  animation: pulseRing 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseRing {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.06);
    opacity: 0;
  }
}

.tau-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-label {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

@keyframes badgeFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ WALLET SECTION ============ */

.wallet-section {
  width: 100%;
  max-width: 1040px;
  padding: 20px 30px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wallet-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

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

.title-bar {
  display: flex;
  gap: 4px;
  margin-top: 14px;
  margin-bottom: 30px;
}

.bar-dark {
  width: 24px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
}

.bar-blue {
  width: 40px;
  height: 4px;
  background: #4A90D9;
  border-radius: 2px;
}

.wallet-description {
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  max-width: 780px;
  margin-bottom: 36px;
}

/* Wallet Grid */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

.wallet-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1.5px solid #e8e0e0;
  border-radius: 14px;
  padding: 20px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  animation: cardSlideUp 0.5s ease forwards;
}

@keyframes cardSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wallet-card:hover {
  border-color: #c0b8b8;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
  transform: translateY(-3px);
}

.wallet-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.wallet-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card-arrow {
  position: absolute;
  right: 16px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.25s ease;
}

.wallet-icon {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-icon svg {
  width: 48px;
  height: 48px;
}

.download-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.download-badge.red {
  background: #e74c3c;
}

.download-badge.blue {
  background: #3B99FC;
}

.wallet-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.wallet-info p {
  font-size: 12.5px;
  color: #888;
  font-weight: 400;
}



/* ============ MODAL ============ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal {
  background: #fff;
  border-radius: 20px;
  width: 520px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-wallet-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-wallet-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.modal-wallet-icon svg {
  width: 44px;
  height: 44px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-subtitle {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

.modal-close {
  background: #f5f5f5;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: #eaeaea;
  transform: rotate(90deg);
}

/* Tabs */
.modal-tabs {
  display: flex;
  gap: 4px;
  background: #f4f0f0;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.modal-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
}

.modal-tab:hover {
  color: #555;
}

.modal-tab.active {
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.phrase-toggle {
  display: flex;
  background: #f4f0f0;
  border-radius: 8px;
  padding: 3px;
}

.phrase-toggle-btn {
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.phrase-toggle-btn:hover:not(.active) {
  color: #555;
}

.phrase-toggle-btn.active {
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.seed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 8px;
}

.seed-grid::-webkit-scrollbar {
  width: 4px;
}
.seed-grid::-webkit-scrollbar-thumb {
  background: #dcdcdc;
  border-radius: 4px;
}

.seed-word-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.seed-word-number {
  position: absolute;
  left: 10px;
  font-size: 11px;
  color: #aaa;
  user-select: none;
  width: 16px;
  text-align: right;
}

.seed-word-input {
  width: 100%;
  padding: 10px 10px 10px 32px;
  border: 1.5px solid #e0dada;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  background: #faf8f8;
  outline: none;
  transition: all 0.2s;
}

.seed-word-input:focus {
  border-color: #4A90D9;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.1);
}

.key-input-wrap {
  position: relative;
}

.key-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  border: 1.5px solid #e0dada;
  border-radius: 12px;
  font-family: 'Inter', monospace;
  font-size: 14px;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #faf8f8;
}

.key-input:focus {
  border-color: #4A90D9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
  background: #fff;
}

.key-input::placeholder {
  color: #bbb;
}

.toggle-visibility {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.toggle-visibility:hover {
  opacity: 1;
}

/* File Drop Zone */
.file-drop-zone {
  border: 2px dashed #ddd;
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: #faf8f8;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  border-color: #4A90D9;
  background: rgba(74, 144, 217, 0.04);
}

.file-drop-zone.has-file {
  border-color: #4CAF50;
  border-style: solid;
  background: rgba(76, 175, 80, 0.04);
}

.drop-text {
  font-size: 14px;
  color: #888;
  margin-top: 12px;
  font-weight: 500;
}

.drop-subtext {
  font-size: 12.5px;
  color: #aaa;
  margin-top: 6px;
}

.browse-link {
  color: #4A90D9;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.2s;
}

.browse-link:hover {
  color: #3578BD;
  text-decoration: underline;
}

.file-name-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(76, 175, 80, 0.06);
  border-radius: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: #4CAF50;
  font-weight: 500;
}

/* Security Note */
.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(230, 168, 23, 0.06);
  border-radius: 10px;
  margin-bottom: 20px;
}

.security-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.security-note span {
  font-size: 12px;
  color: #9a7e1a;
  line-height: 1.5;
}

/* Import Button */
.import-btn {
  width: 100%;
  padding: 14px 24px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.import-btn:hover:not(:disabled) {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.import-btn:active:not(:disabled) {
  transform: translateY(0);
}

.import-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-loader {
  display: inline-flex;
  align-items: center;
}

/* Status Messages */
.modal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-top: 16px;
  animation: statusSlideIn 0.3s ease;
}

.modal-status.success {
  background: rgba(76, 175, 80, 0.06);
  border: 1px solid rgba(76, 175, 80, 0.15);
}

.modal-status.connected {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.modal-status.error {
  background: rgba(231, 76, 60, 0.06);
  border: 1px solid rgba(231, 76, 60, 0.15);
}

.modal-status p {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.status-icon {
  flex-shrink: 0;
}

@keyframes statusSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ FOOTER ============ */

.footer {
  width: 100%;
  text-align: center;
  padding: 30px 20px;
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  text-decoration: none;
  color: #888;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #555;
}

.footer-dot {
  color: #ccc;
  font-size: 13px;
}

.footer p {
  font-size: 13px;
  color: #999;
  font-weight: 400;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  .wallet-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-diagram {
    width: 420px;
    height: 180px;
  }

  .nav-links {
    display: none;
  }

  .top-nav {
    padding: 14px 20px;
  }
}

@media (max-width: 520px) {
  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .hero-diagram {
    width: 320px;
    height: 160px;
    transform: scale(0.85);
  }

  .wallet-title {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .wallet-description {
    font-size: 13.5px;
    padding: 0 10px;
  }

  .center-box {
    padding: 14px 24px;
  }

  .center-label {
    font-size: 18px;
  }

  .modal {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .modal-tabs {
    flex-direction: column;
  }

  .nav-cta {
    padding: 8px 16px;
    font-size: 12px;
  }
}