    :root {
      --bg-color: #f7f3f0;
      --text-color: #2e2c2b;
      --text-muted: #5e5a57;
      --card-bg: #ffffff;
      --tab-active-bg: #ede7e3;
      --user-bubble: #f0ece9;
      --ai-bubble: transparent;
      --border-color: #e8e4e1;
      --github-blue: #0969da;
    }

    * {
      box-sizing: border-box;
    }

    ion-content {
      --background: radial-gradient(circle at top, #fdfbf9 0%, #f7f3f0 100%);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    }

    /* Top bar */
    .top-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 10px;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      z-index: 10;
      background: linear-gradient(to bottom, rgba(247, 243, 240, 1) 60%, rgba(247, 243, 240, 0) 100%);
    }

    .menu-btn {
      --background: #ffffff;
      --color: var(--text-color);
      --border-radius: 50%;
      --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .model-selector-wrap {
      background: #ffffff;
      border: 1px solid var(--border-color);
      border-radius: 999px;
      padding: 2px 10px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .model-selector-select {
      border: none;
      background: transparent;
      color: var(--text-color);
      font-size: 13px;
      font-weight: 600;
      appearance: none;
      outline: none;
      text-transform: uppercase;
      text-align: center;
      cursor: pointer;
    }

    .model-selector-wrap::after {
      content: "";
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      pointer-events: none;
      color: var(--text-muted);
      font-size: 12px;
    }

    .placeholder-right {
      width: 44px;
    }

    .topbar-profile {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .topbar-profile-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      border: none;
      --border-radius:25px;
      background: transparent;
      color: var(--text-color);
      font-weight: 700;
      cursor: pointer;
      padding: 10px 0;
    }

    .topbar-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, #d9d3cd, #f7f3f0);
      background-size: cover;
      background-position: center;
      border: 1px solid rgba(0, 0, 0, 0.08);
      flex-shrink: 0;
    }

    .topbar-username {
      display: none;
      font-size: 14px;
      color: var(--text-color);
    }

    @media (min-width: 640px) {
      .topbar-username {
        display: inline-block;
        margin-left: 10px; 
      }
    }

    .sidebar-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.35);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s ease, visibility 0.25s ease;
      z-index: 90;
    }

    .sidebar-backdrop.active {
      opacity: 1;
      visibility: visible;
    }

    .sidebar-panel {
      position: fixed;
      top: 0;
      right: 0;
      height: 100%;
      width: min(320px, 100%);
      background: #ffffff;
      box-shadow: -20px 0 60px rgba(0, 0, 0, 0.12);
      transform: translateX(100%);
      transition: transform 0.3s ease;
      z-index: 100;
      padding: 28px 20px;
      display: flex;
      flex-direction: column;
    }

    .sidebar-panel.active {
      transform: translateX(0);
    }

    .sidebar-close {
      align-self: flex-end;
      border: none;
      background: transparent;
      color: var(--text-color);
      font-size: 24px;
      cursor: pointer;
      padding: 8px;
      margin-bottom: 12px;
    }

    .sidebar-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 20px;
    }

    .sidebar-avatar {
      width: 64px;
      height: 64px;
      border-radius: 18px;
      background: linear-gradient(135deg, #d9d3cd, #f7f3f0);
      background-size: cover;
      background-position: center;
      flex-shrink: 0;
    }

    .sidebar-label {
      margin: 0;
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .sidebar-header h3 {
      margin: 0 0 6px;
      font-size: 18px;
      color: var(--text-color);
      line-height: 1.2;
    }

    .sidebar-body {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .sidebar-status {
      text-align: center;
      margin: 0;
      color: var(--text-muted);
      line-height: 1.5;
    }

    .sidebar-action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 12px 16px;
      border-radius: 16px;
      border: 1px solid var(--border-color);
      background: #13a53a;
      color: #d9d3cd;
      font-weight: 700;
      text-decoration: none;
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .sidebar-action-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
    }

    .sidebar-logout-btn {
      border-color: #f04438;
      background: #f04438;
      color: #d9d3cd;
    }

    .sidebar-action-btn.hidden {
      display: none;
    }

    .sidebar-neuron-card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      padding: 14px;
      margin: 16px;
      font-family: 'Plus Jakarta Sans', sans-serif;
      transition: all 0.3s ease;
    }
    .neuron-card-header {
      display: flex;
      align-items: center;
      gap: 6px;
      color: #8b949e;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 8px;
    }
    .neuron-card-header .neuron-icon {
      font-size: 14px;
      color: #58a6ff;
    }
    .neuron-card-stats {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 8px;
    }
    .neuron-count {
      font-size: 14px;
      font-weight: 700;
      color: #58a8fc;
      font-family: 'Fira Code', monospace;
    }
    .neuron-percent {
      font-size: 11px;
      color: #57d368;
      font-weight: 600;
    }
    .neuron-progress-bg {
      height: 6px;
      background: rgba(255, 255, 255, 0.07);
      border-radius: 3px;
      overflow: hidden;
    }
    .neuron-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, #58a6ff 0%, #56d364 100%);
      border-radius: 3px;
      transition: width 0.4s ease;
    }

    /* Tab content containers */
    .tab-content {
      max-width: 800px;
      margin: auto;
      display: none;
      padding: 80px 16px 140px 16px;
      /* Ruang untuk top bar & bottom nav */
      height: 100%;
      overflow-y: auto;
      -ms-overflow-style: none;  /* Untuk Internet Explorer dan Edge */
      scrollbar-width: none;     /* Untuk Firefox */
    }

    .tab-content::-webkit-scrollbar {
      display: none;             /* Untuk Chrome, Safari, dan Opera */
    }

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

    /* --- Welcome Header (Gaya Copilot) --- */
    .welcome-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      margin: 0;
      animation: fadeIn 0.6s ease;
    }

    .welcome-icon-box {
      width: 60px;
      height: 60px;
      background: #1f2328;
      color: white;
      border-radius: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 16px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    }

    .welcome-icon-box ion-icon {
      font-size: 34px;
    }

    .welcome-title {
      font-size: 24px;
      font-weight: 800;
      color: var(--text-color);
      margin: 0 0 8px 0;
      letter-spacing: -0.5px;
    }

    .welcome-subtitle {
      font-size: 14px;
      color: var(--text-muted);
      max-width: -webkit-fill-available;
      line-height: 1.4;
      margin: 0;
    }

    /* Starter Suggestion Grid (Copilot Cards) */
    .suggestions-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 24px;
      width: 100%;
      max-width: 480px;
      align-self: center;
    }

    .suggestion-card {
      background: var(--card-bg);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 14px;
      text-align: left;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    }

    .suggestion-card:active {
      transform: scale(0.97);
      background-color: var(--user-bubble);
    }

    .suggestion-card .card-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-color);
      margin-bottom: 6px;
    }

    .suggestion-card .card-desc {
      font-size: 11px;
      color: var(--text-muted);
      line-height: 1.3;
    }

    .suggestion-card .card-icon {
      font-size: 16px;
      margin-bottom: 8px;
    }

    /* --- Chat Messages Area --- */
    .chat-messages {
      display: flex;
      flex-direction: column;
      gap: 24px;
      margin-bottom: 50px;
    }

    .message-wrapper {
      display: flex;
      width: 100%;
      animation: messageSlideIn 0.3s ease-out;
    }

    .message-wrapper.user {
      justify-content: flex-end;
    }

    .message-wrapper.ai {
      justify-content: flex-start;
      gap: 12px;
    }

    .ai-avatar {
      width: 32px;
      height: 32px;
      background: var(--text-color);
      color: white;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 4px;
    }

    .ai-avatar ion-icon {
      font-size: 20px;
    }

    .message {
      display: flex;
      flex-direction: column;
      max-width: 85%;
    }

    .bubble {
      font-size: 15px;
      line-height: 1.6;
      word-wrap: break-word;
    }

    /* User Message */
    .user .bubble {
      background: var(--user-bubble);
      color: var(--text-color);
      padding: 12px 16px;
      border-radius: 20px;
      border-bottom-right-radius: 4px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    }

    /* AI Message (Markdown-Friendly Styling) */
    .ai .bubble {
      background: var(--ai-bubble);
      color: var(--text-color);
      padding: 6px 0;
    }

    .ai .message {
      max-width: calc(100% - 44px);
    }

    /* Markdown Styling in Bubble */
    .bubble p {
      margin: 0 0 10px 0;
    }

    .bubble p:last-child {
      margin-bottom: 0;
    }

    .bubble code {
      font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
      font-size: 85%;
      background: rgba(175, 184, 193, 0.2);
      padding: 0.2em 0.4em;
      border-radius: 6px;
    }

    .bubble pre {
      background: #1f2328;
      color: #f0f6fc;
      padding: 14px;
      border-radius: 12px;
      overflow-x: auto;
      margin: 12px 0;
    }

    .bubble pre code {
      background: transparent;
      padding: 0;
      font-size: 13px;
      color: inherit;
    }

    .login-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 8px;
      padding: 10px 14px;
      border-radius: 999px;
      background: #1f2328;
      color: #ffffff;
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .bubble ul,
    .bubble ol {
      margin: 0 0 10px 0;
      padding-left: 20px;
    }

    .bubble li {
      margin-bottom: 4px;
    }

    .bubble h1,
    .bubble h2,
    .bubble h3,
    .bubble h4 {
      font-weight: 700;
      margin: 16px 0 8px 0;
      line-height: 1.25;
    }

    .bubble h1 {
      font-size: 1.3em;
    }

    .bubble h2 {
      font-size: 1.15em;
    }

    .bubble h3 {
      font-size: 1.05em;
    }

    .bubble blockquote {
      border-left: 4px solid var(--border-color);
      color: var(--text-muted);
      margin: 8px 0;
      padding-left: 12px;
    }

    .bubble table {
      border-collapse: collapse;
      width: 100%;
      margin: 12px 0;
    }

    .bubble table th,
    .bubble table td {
      border: 1px solid var(--border-color);
      padding: 6px 13px;
    }

    .bubble table tr:nth-child(even) {
      background-color: #f6f8fa;
    }

    .timestamp {
      font-size: 11px;
      color: #999;
      margin-top: 6px;
    }

    .user .timestamp {
      text-align: right;
      margin-right: 4px;
    }

    /* Typing Indicator */
    .typing-indicator {
      display: flex;
      gap: 5px;
      padding: 12px 0;
      align-items: center;
    }

    .typing-indicator span {
      width: 6px;
      height: 6px;
      background: var(--text-muted);
      border-radius: 50%;
      animation: blink 1.4s infinite;
    }

    .typing-indicator span:nth-child(2) {
      animation-delay: 0.2s;
    }

    .typing-indicator span:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes blink {

      0%,
      60%,
      100% {
        opacity: 0.4;
        transform: translateY(0);
      }

      30% {
        opacity: 1;
        transform: translateY(-3px);
      }
    }

    .hidden {
      display: none !important;
      visibility: hidden;
    }
    
    /* Fixed Footer (Input + Bottom Nav) */
    .footer-container {
      max-width: 800px;
      margin: auto;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 0 16px 16px 16px;
      background: transparent;
      display: flex;
      flex-direction: column;
      gap: 12px;
      z-index: 20;
      transition: all 0.3s ease;
    }

    .chat-box {
      background: var(--card-bg);
      border-radius: 24px;
      display: flex;
      align-items: flex-end;
      padding: 4px 8px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
      border: 1px solid var(--border-color);
      transition: opacity 0.3s, transform 0.3s;
    }

    .chat-box.hidden {
      display: none !important;
    }

    .chat-textarea {
      flex: 1;
      border: none;
      outline: none;
      resize: none;
      background: transparent;
      font-size: 15px;
      color: var(--text-color);
      padding: 14px 12px;
      line-height: 1.4;
      font-family: inherit;
      max-height: 120px;
    }

    .chat-textarea::placeholder {
      color: #a39f9c;
    }

    .send-btn-container {
      padding-bottom: 4px;
    }

    #sendBtn {
      --color: #ffffff;
      --background: #1f2328;
      --background-hover: #24292e;
      --border-radius: 50%;
      width: 36px;
      height: 36px;
      margin: 0 4px;
    }

    /* Bottom Navigation */
    .bottom-nav-row {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .nav-pill-box {
      flex: 1;
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(10px);
      border-radius: 30px;
      padding: 6px;
      display: flex;
      justify-content: space-between;
      border: 1px solid var(--border-color);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      color: #8c8784;
      text-decoration: none;
      padding: 8px 0;
      font-size: 11px;
      font-weight: 600;
      border-radius: 24px;
      transition: all 0.25s;
      cursor: pointer;
    }

    .nav-item ion-icon {
      font-size: 20px;
      margin-bottom: 4px;
      transition: transform 0.2s;
    }

    .nav-item.active {
      background-color: var(--card-bg);
      color: var(--text-color);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .nav-item.active ion-icon {
      transform: scale(1.1);
      color: #0969da;
      /* Aksen biru khas GitHub */
    }

    .side-action-btn {
      --background: rgba(255, 255, 255, 0.8);
      --color: var(--text-color);
      --border-radius: 50%;
      --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
      width: 52px;
      height: 52px;
      margin: 0;
      border: 1px solid var(--border-color);
      backdrop-filter: blur(10px);
    }

    /* Headers */
    .section-title {
      font-size: 22px;
      font-weight: 700;
      margin: 8px 0 20px 0;
      color: var(--text-color);
      letter-spacing: -0.5px;
    }

    /* --- Discover Tab: Jekyll Blog Cards --- */
    #blogList {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    @media screen and (max-width: 600px) {
      #blogList {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .jekyll-card {
        margin-bottom: 20px;
      }

      #repoList.repo-list {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
      }

      .welcome-container {
        margin-top: 40px !important;
      }
    }

    .jekyll-card {
      background: var(--card-bg);
      border-radius: 20px;
      overflow: hidden;
      margin-bottom: 0px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
      border: 1px solid var(--border-color);
      transition: transform 0.2s;
      cursor: pointer;
    }

    .jekyll-card:active {
      transform: scale(0.98);
    }

    .jekyll-img {
      height: 120px;
      width: 100%;
      background: linear-gradient(135deg, #ff7e5f, #feb47b);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 24px;
      font-weight: 700;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .jekyll-img-image {
      width: 100%;
      height: 140px;
      object-fit: cover;
      display: block;
      background: #f0ece9;
    }

    .img-2 {
      background: linear-gradient(135deg, #6a11cb, #2575fc);
    }

    .img-3 {
      background: linear-gradient(135deg, #11998e, #38ef7d);
    }

    .jekyll-content {
      padding: 16px;
    }

    .jekyll-title {
      font-size: 17px;
      font-weight: 700;
      margin: 0 0 8px 0;
      line-height: 1.3;
    }

    .jekyll-excerpt {
      font-size: 13.5px;
      color: var(--text-muted);
      margin: 0 0 12px 0;
      line-height: 1.5;
    }

    .jekyll-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .jekyll-tags {
      display: flex;
      gap: 6px;
    }

    .tag {
      background: #f0ece9;
      color: #4a4644;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 600;
    }

    .read-time {
      font-size: 11px;
      color: #999;
      font-weight: 500;
    }

    .blog-post-modal {
      --width: min(100%, 840px);
      --height: 100%;
      --border-radius: 0;
    }

    .blog-post-modal-content {
      max-width: 720px;
      margin: 0 auto;
      padding: 8px 4px 40px;
      line-height: 1.75;
      color: var(--text-color);
    }

    .blog-post-modal-content h1,
    .blog-post-modal-content h2,
    .blog-post-modal-content h3 {
      line-height: 1.25;
      margin: 24px 0 12px;
      color: var(--text-color);
    }

    .blog-post-modal-content p {
      margin: 0 0 14px;
    }

    .blog-post-modal-content ul,
    .blog-post-modal-content ol {
      padding-left: 20px;
      margin: 0 0 14px;
    }

    .blog-post-modal-content pre {
      background: #1f2328;
      color: #f0f6fc;
      padding: 14px;
      border-radius: 12px;
      overflow-x: auto;
      margin: 14px 0;
    }

    .blog-post-modal-content img {
      width: 100%;
      border-radius: 12px;
      margin: 12px 0;
    }

    .blog-post-hero-image {
      width: 100%;
      height: 220px;
      object-fit: cover;
      border-radius: 16px;
      margin: 0 0 18px;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    }

    .blog-post-modal-content .loading,
    .blog-post-modal-content .error-msg {
      padding: 12px 24px;
      color: var(--text-muted);
      text-align: center;
    }

    #repoList.repo-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 10px;
    }

    /* --- Library Tab: Modern Repo Cards --- */
    .modern-repo-card {
      background: var(--card-bg);
      border-radius: 16px;
      padding: 18px;
      margin-bottom: 0px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
      border: 1px solid var(--border-color);
    }

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

    .repo-icon {
      color: #5e5a57;
      font-size: 18px;
    }

    .repo-name {
      font-weight: 600;
      font-size: 16px;
      color: #0969da;
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .repo-badge {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: 12px;
      border: 1px solid #d0d7de;
      color: #57606a;
      font-weight: 600;
    }

    .repo-desc {
      font-size: 13.5px;
      color: var(--text-muted);
      margin-bottom: 14px;
      line-height: 1.4;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .repo-meta-footer {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 12px;
      color: #57606a;
    }

    .meta-item {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .lang-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
    }

    .dot-js {
      background-color: #f1e05a;
    }

    .dot-html {
      background-color: #e34c26;
    }

    .dot-css {
      background-color: #563d7c;
    }

    .dot-ts {
      background-color: #3178c6;
    }

    .dot-default {
      background-color: #8b949e;
    }

    .loading,
    .error-msg {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      padding: 40px 20px;
      color: var(--text-muted);
      font-size: 14px;
    }

    .error-msg {
      color: #cf222e;
      background: #ffebe9;
      border-radius: 12px;
      border: 1px solid rgba(207, 34, 46, 0.2);
    }

    /* Keyframes */
    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

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

    @keyframes messageSlideIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

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

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