/* =====================
   Reset & Base
   ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* =====================
   Phone Wrapper
   ===================== */
.phone-wrapper {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  position: relative;
  /* Added for absolute decorations */
  overflow: hidden;
  /* Keep decorations inside */
}

/* =====================
   Navbar
   ===================== */
.navbar {
  background-color: #703D92;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.nav-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.nav-pi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 2px solid #FBB13C;
  border-radius: 50%;
  background-color: transparent;
  overflow: hidden;
}

.nav-pi-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.nav-dropdown {
  font-size: 20px;
}

/* =====================
   Main Content
   ===================== */
.main-content {
  flex: 1;
  padding: 28px 20px 32px 20px;
  background-color: #ffffff;
}

/* =====================
   Welcome Section
   ===================== */
.welcome-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.welcome-icon {
  width: 56px;
  height: 56px;
  border: 2.5px solid #FBB13C;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}

.welcome-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.welcome-title {
  font-size: 21px;
  font-weight: 700;
  color: #FBB13C;
  line-height: 1.25;
}

/* =====================
   Apps Section
   ===================== */
.apps-section {
  width: 100%;
}

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

.apps-title {
  font-size: 20px;
  font-weight: 700;
  color: #111111;
}

.apps-toggle {
  background: none;
  border: none;
  font-size: 22px;
  color: #444444;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* =====================
   Apps Grid
   ===================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 12px;
}

/* =====================
   App Card
   ===================== */
.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.app-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-icon-wrapper {
  width: 90px;
  height: 90px;
  border: 1.8px solid #703D92;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  overflow: hidden;
  padding: 14px;
}

.app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-label {
  font-size: 13.5px;
  color: #888888;
  text-align: center;
  line-height: 1.3;
  font-weight: 400;
}

/* =====================
   Responsive Tweaks
   ===================== */
@media (max-width: 360px) {
  .app-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    padding: 12px;
  }

  .welcome-title {
    font-size: 18px;
  }

  .apps-grid {
    gap: 16px 10px;
  }
}

/* =====================
   Individual Card Settings
   ===================== */

/* 1. Fireside */
.fireside-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.fireside-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 2. Wallet */
.wallet-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.wallet-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 3. Brainstorm */
.brainstorm-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.brainstorm-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 4. Mine */
.mine-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.mine-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 5. Blockchain */
.blockchain-card .app-icon-wrapper {
  /* Isse icon box ki walls se chipak jayega */
  padding: 0;
  border-color: #703D92;
  box-shadow: none;
}

.blockchain-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 6. Develop */
.develop-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.develop-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 7. KYC */
.kyc-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.kyc-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 8. Chat */
.chat-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.chat-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 9. Profiles */
.profiles-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.profiles-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* translateY(-4px) se image thodi upar (middle mein) shift ho jayegi */
  transform: scale(1) translateY(-4px);
}

/* 10. Domains */
.domains-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.domains-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 11. App Studio */
.appstudio-card .app-icon-wrapper {
  padding: 14px;
  border-color: #703D92;
  box-shadow: none;
}

.appstudio-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}

/* 12. Launchpad */
.launchpad-card .app-icon-wrapper {
  padding: 0;
  border-color: #703D92;
  box-shadow: none;
}

.launchpad-card .app-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}


/* =====================
   Wallet Page Styles
   ===================== */

.wallet-nav-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-wallet-icon-img {
  width: 40px;
  height: 30px;
  object-fit: contain;
}

.wallet-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 22px 32px 22px;
  flex: 1;
}

.wallet-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -0.3px;
}

.passphrase-box {
  width: 100%;
  margin-bottom: 28px;
}

.passphrase-input {
  width: 100%;
  height: 250px;
  border: 1.5px solid #c8c8c8;
  border-radius: 14px;
  padding: 20px 18px;
  font-size: 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #444444;
  resize: none;
  outline: none;
  background-color: #ffffff;
  letter-spacing: 0.5px;
}

.passphrase-input:focus {
  border-color: #6b3fa0;
}

.passphrase-input::placeholder {
  color: #b5b5b5;
  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1.5;
}

.wallet-buttons {
  width: 100%;
  margin-bottom: 10px;
}

.wallet-btn {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 0.2px;
}

.wallet-btn-primary {
  background-color: #6b3fa0;
  color: #ffffff;
  border: none;
}

.wallet-btn-secondary {
  background-color: #ffffff;
  color: #a8a8a8;
  border: 1.5px solid #d0d0d0;
}

.wallet-disclaimer {
  margin-top: 16px;
  font-size: 17px;
  color: #2a2a2a;
  text-align: left;
  line-height: 1.55;
  width: 100%;
  letter-spacing: -0.1px;
}

.wallet-link {
  margin-top: 12px;
  font-size: 15px;
  color: #6b3fa0;
  text-decoration: underline;
  text-align: left;
  width: 100%;
}

/* =====================
   Third-Party & Bookmark Sections
   ===================== */
.section-title {
  font-size: 19px;
  font-weight: 700;
  color: #2b2b2b;
  text-align: center;
  margin: 36px 0 20px 0;
}

.third-party-section,
.bookmarked-section {
  width: 100%;
}

/* Third-Party Cards */
.third-party-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tp-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  border: 1px solid #eaeaea;
}

.tp-card-header {
  position: relative;
  width: 100%;
  aspect-ratio: 976 / 596;
  background-color: #0c1225;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-top-staked-app {
  background-image: url('assets/top_staked_app_bg.jpg');
}

.bg-top-staked-service {
  background-image: url('assets/top_staked_service_bg.jpg');
}

.bg-top-staked-studio {
  background-image: url('assets/top_staked_studio_bg.jpg');
}

.bg-earth {
  /* You will need the actual earth/network image */
  /* background-image: url('assets/network_bg.png'); */
}

.tp-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.badge-yellow {
  background-color: #fdf3d9;
  color: #a46d24;
}

.tp-logo-center {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.tp-logo-center .tp-pi-icon {
  width: 24px;
  height: 24px;
  border: 1.5px solid #FBB13C;
  border-radius: 50%;
  padding: 3px;
}

.tp-card-body {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
}

.tp-rank {
  font-size: 14px;
  font-weight: 600;
  color: #703D92;
  width: 16px;
}

.tp-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
}

.tp-app-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tp-app-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tp-m-badge {
  background-color: #703D92;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp-app-desc {
  font-size: 12px;
  color: #888888;
  margin-top: 2px;
}

.tp-stake-btn {
  font-size: 11px;
  font-weight: 600;
  color: #888888;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.tp-stake-btn.text-green {
  color: #4CAF50;
  border-color: #c8e6c9;
}

.tp-stake-btn.text-red {
  color: #E74C3C;
  border-color: #fadbd8;
}

.tp-stake-arrow {
  font-size: 12px;
}

/* Update Info */
.update-info {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #a0a0a0;
  line-height: 1.5;
}

.explore-more {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  color: #703D92;
  text-decoration: none;
}

/* Bookmark Box */
.bookmark-box {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 30px 24px;
  text-align: center;
  font-size: 15px;
  color: #111111;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.manage-account {
  display: block;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 20px;
  /* Leave space for bottom nav */
  font-size: 15px;
  font-weight: 600;
  color: #222222;
  text-decoration: none;
}

/* =====================
   Bottom Navigation
   ===================== */
.bottom-nav {
  position: sticky;
  bottom: 0;
  background-color: #ffffff;
  border-top: 1px solid #eaeaea;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 12px 0;
  z-index: 100;
  width: 100%;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #888888;
  font-size: 12px;
  font-weight: 500;
  gap: 4px;
  cursor: pointer;
}

.bottom-nav-item.active {
  color: #703D92;
}

.bottom-nav-icon {
  font-size: 20px;
}