/* --- Variables & Reset --- */
:root {
  --primary-gradient: linear-gradient(135deg, #ff4d97 0%, #37cfdc 50%, #4a56ff 100%);
  --bg-color: #f5f6f7;
  --sidebar-bg: #ffffff;
  --primary: #4285F4;
  --secondary: #ff4d97d6;
  --text-main: #2b3674;
  --text-sub: #a3aed0;
  --sidebar-width: 200px;
  --sidebar-collapsed: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* --- Login Overlay --- */
#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  background: white;
  padding: 0;
}

.login-visual {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-visual video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.visual-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  padding: 40px;
}

.visual-content h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -1px;
}

.login-side {
  width: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(254, 254, 255);
  position: relative;
  z-index: 10;
}

.login-card {
  width: 100%;
  max-width: 350px;
  padding: 40px;
  text-align: center;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

/* --- Dashboard Structure --- */
#dashboard {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

.sidebar {
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 25px 15px;
  background: var(--sidebar-bg);
  border-right: 1px solid #e1e4f0;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}
.material-symbols-rounded{
  font-size: 19px;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 0 10px;
}

.toggle-btn {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-sub);
  transition: transform 0.3s ease;
}

.sidebar.collapsed .toggle-btn {
  transform: rotate(180deg);
}

.nav-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 15px;
  color: var(--text-sub);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.nav-item:hover,
.nav-item.active {
  background: #f4f7fe;
  color: var(--primary);
}

.nav-item span.material-symbols-rounded {
  margin-right: 15px;
}
.nav-label{
    transition: all 0.3s;
    display: inline;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.sidebar.collapsed .nav-label {
  display: none;
  opacity: 0;
}

/* --- Main Content Area --- */
.main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 175px;
  padding: 10px 20px;
  background: white;
  border-radius: 30px;
  transition: width 0.3s;
}

.sidebar.collapsed .search-box {
  width: 50px;
  gap: 0;
  justify-content: center;
  cursor: pointer;
}

.sidebar.collapsed .search-box input {
  width: 0;
  padding: 0;
  opacity: 0;
}

.sidebar.collapsed .search-box:hover,
.sidebar.collapsed .search-box:focus-within {
  width: 230px;
  padding: 10px 20px;
  outline: 1px solid var(--primary);
  gap: 10px;
  justify-content: start;
}

.sidebar.collapsed .search-box:hover input,
.sidebar.collapsed .search-box:focus-within input {
  width: 100%;
  opacity: 1;
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  font-weight: 500;
  transition: width 0.3s;
}

/* Centered Links from Wireframe */
.toppest-bar {
  display: flex;
  justify-content: center;
  flex: 1;
}

.toppest-links {
  display: flex;
  gap: 25px;
  padding: 5px 30px;
  list-style: none;
  background: white;
  border-radius: 50px;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.toppest-links li {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: 0.3s;
}

.toppest-links li:hover,
.toppest-links li.active {
  color: var(--primary);
}

/* --- User Profile Dropdown --- */
.user-profile-wrapper {
  position: relative;
  z-index: 1000;
  padding: 5px;
}

.user-pill-img {
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
.user-profile-wrapper:hover .user-pill-img {
  transform: scale(1.05);
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid #e1e4f0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px;
  overflow: hidden;
}

.user-profile-wrapper:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 10px;
}
.user-dropdown-header img {
  width: 50px; height: 50px; border-radius: 50%; object-fit: cover;
}
.user-info-text {
  display: flex; flex-direction: column; overflow: hidden;
}
.user-name-display {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1rem;
}
.user-email-display {
  font-size: 0.85rem;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-divider {
  height: 1px; background: #f0f0f0; margin: 8px 0;
}

.content-area {
  flex: 1;
  padding: 0 30px 30px 30px;
  overflow-y: auto;
}

/* --- Home Section Layout --- */
@keyframes gradient-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-banner {
  margin-top: 1.2rem;
  margin-bottom: 35px;
  padding: 40px;
  background: linear-gradient(-45deg, var(--primary),  var(--secondary), var(--primary));
  background-size: 400% 400%;
  backdrop-filter: blur(10px);
  animation: gradient-animation 10s ease infinite;
  border: 2px solid #e1e4f0;
  border-radius: 40px;
  text-align: center;
}

.btn-get-started {
  margin-top: 25px;
  padding: 15px 40px;
  background: rgba(255, 255, 255, 0);
  color: var(--text-main);
  border: 2px solid var(--text-main);
  border-radius: 15px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-get-started:hover {
  background: var(--text-main);
  color: white;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  max-width: 700px;
  margin: 0 auto;
}

.sub-card {
  height: 150px;
  max-width: 300px;
  background-color: transparent;
  border: 2px solid #e1e4f0;
  border-radius: 35px;
  transition: 0.3s;
  display: grid;
  grid-template-columns: 100%;
  align-items: center;
  justify-content: center;
  padding: 15px;
  cursor: pointer;
  z-index: 1;
  position: relative;
}
.sub-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: white;
    border-radius: 33px;
    z-index: -1;
}
.sub-card:hover::after {
    content: '';
    position: absolute;
    z-index: -2;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    top: -5px;
    left: -5px;
    background: linear-gradient(45deg,  var(--primary), var(--secondary), var(--primary));
    background-size: 300% 300%;
    filter: blur(40px);
    opacity: 0.6;
    animation: moveGradient 10s ease infinite;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes wave-arrow {
  0%, 100% { d: path("M4 12c2 0 6 0 8 0s6 0 8 0l-4-4m4 4l-4 4"); }
  25% { d: path("M4 12c2-3 6-3 8 0s6 3 8 0l-4-4m4 4l-4 4"); }
  50% { d: path("M4 12c2 0 6 0 8 0s6 0 8 0l-4-4m4 4l-4 4"); }
  75% { d: path("M4 12c2 3 6 3 8 0s6-3 8 0l-4-4m4 4l-4 4"); }
}

.squiggle-arrow {
  margin-left: 8px;
  vertical-align: middle;
}
.sub-card:hover .squiggle-arrow path {
  animation: wave-arrow 1s linear infinite;
}
.sub-card p{
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
}
.sub-card span{
    font-size: 1rem;
    color: var(--text-sub);
}
.sub-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
}

/* --- Snippet Cards --- */
.snippet-card {
  margin-bottom: 20px;
  padding: 25px;
  background: white;
  border: 1px solid #e1e4f0;
  border-radius: 25px;
}

pre {
  margin-top: 15px;
  padding: 20px;
  background: #1a1f37;
  color: #8f9bba;
  font-family: monospace;
  font-size: 14px;
  border-radius: 15px;
  overflow-x: auto;
}

.copy-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}
.pal{
    display: inline-flex;
    padding: 6px 17px;
    color: black;
    align-items: center;
    box-shadow: 0 5px 15px rgba(6, 6, 6, 0);
    border-radius: 15px;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, var(--primary), #37cfdc, var(--secondary), var(--primary)) border-box;
    background-size: 100% 100%, 400% 400%;
    animation: gradient-animation 5s ease infinite;
}

/* --- Docs Section Layout --- */
.docs-container {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 25px;
    padding: 30px;
    border: 1px solid #e1e4f0;
    min-height: 60vh;
    align-items: flex-start;
}

.docs-sidebar {
    width: 200px;
    border-right: 1px solid #e1e4f0;
    padding-right: 20px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

.docs-sidebar h4 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.1rem;
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    padding: 8px 0;
    color: var(--text-sub);
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
}

.docs-sidebar li:hover {
    color: var(--text-main);
    transform: translateX(5px);
}

.docs-main {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* --- Theme Cards (Snippets Page) --- */
.theme-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e1e4f0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.theme-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
    border-color: var(--primary);
}
.theme-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.theme-card-name {
    padding: 20px;
    font-size: 1rem;
}

/* --- Snippet Details View --- */
.snippet-view-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}
.back-to-themes-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.back-to-themes-btn:hover {
    background: #f4f7fe;
    color: var(--primary);
    border-color: var(--primary);
}
.get-selected-btn {
    z-index: 90;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.get-selected-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.4);
}
.get-selected-btn:disabled {
    background: #a3aed0;
    cursor: not-allowed;
}

/* Snippet Card Wrapper & Animated Border */
@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes rotate-border {
    to {
        --angle: 360deg;
    }
}
.snippet-card-wrapper {
    position: relative;
    padding: 2px;
    border-radius: 27px;
    margin-bottom: 25px;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.snippet-card-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.snippet-card-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(66, 133, 244, 0.15);
}
.snippet-card-wrapper:hover::before {
    opacity: 1;
    background: conic-gradient(from var(--angle), #ff4d97, #37cfdc, #4a56ff, #ff4d97);
    animation: rotate-border 4s linear infinite;
}

/* Snippet Card Content */
.snippet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.snippet-desc {
    font-size: 0.9em;
    color: var(--text-sub);
    margin-bottom: 15px;
    line-height: 1.5;
    
}

pre code.hljs{
  border-radius: 17px;
box-shadow: 
  inset 0 -15px 10px -30px #585757, /* Top layer: sharp core */
  inset 0 -35px 20px -25px #585757, /* Middle layer: dense fill */
  inset 0 -60px 40px -50px #585757; /* Bottom layer: wide soft glow */

scrollbar-width: thin;
  scrollbar-color: rgb(154, 153, 153) transparent; /* Thumb color | Track color */
}

/* 4. WEBKIT BROWSER SCROLLBAR (Chrome, Safari, Edge) */
pre code.hljs::-webkit-scrollbar {
  width: 8px;   /* Vertical scrollbar width */
  height: 8px;  /* Horizontal scrollbar height (for code blocks) */
}

pre code.hljs::-webkit-scrollbar-track {
  background: transparent; /* Keep track invisible to show the shadow through it */
}

pre code.hljs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2); /* Subtle white thumb */
  border-radius: 10px;                  /* Rounded scrollbar */
  border: 2px solid transparent;        /* Adds "padding" around the thumb */
  background-clip: content-box;         /* Makes the thumb look centered */
}

pre code.hljs::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4); /* Brighter on hover */
}

/* --- Theme-Based Syntax Highlighting --- */
/* Overrides standard hljs colors to match dashboard theme */
.hljs-tag, .hljs-name, .hljs-attribute {
    color: var(--primary) !important; /* Blue */
}
.hljs-string, .hljs-number, .hljs-literal, .hljs-selector-class {
    color: var(--secondary) !important; /* Pink */
}
.hljs-comment, .hljs-quote {
    color: var(--text-sub) !important; /* Grey */
    font-style: italic;
}
.hljs-keyword, .hljs-selector-tag, .hljs-built_in {
    color: #37cfdc !important; /* Teal from gradient */
}
.hljs-attr {
    color: #a3aed0 !important; /* Light Grey */
}

.get-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f7fe;
    border: 1px solid transparent;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.get-btn:hover {
    background: #e9effd;
}
.get-btn.selected {
    background: #e2f5ea;
    color: #22c55e;
}
.get-btn .material-symbols-rounded {
    font-size: 18px;
}

/* Code Block Styling */
pre.collapsible {
    max-height: 200px;
    overflow: hidden;
    position: relative;
    /* Creates a fade-out effect at the bottom to indicate more content */
    box-shadow: inset 0 -40px 25px -20px #1a1f37;
    transition: max-height 0.4s ease-in-out, box-shadow 0.3s ease-in-out;
}
pre.collapsible.expanded {
    max-height: 1000px; /* Large enough for most code */
    box-shadow: none; /* Remove the fade-out shadow when expanded */
}
.code-expander {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 8px;
    border: 1px solid #e1e4f0;
    border-top: none;
    background-color: #ffffff;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    color: black;
    margin-top: -15px; /* Overlap with pre */
    position: relative;
    z-index: 5;
}

/* Custom Scrollbar for Code */
pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
pre::-webkit-scrollbar-track {
    background: #1a1f37;
}
pre::-webkit-scrollbar-thumb {
    background-color: #4a56ff;
    border-radius: 10px;
    border: 2px solid #1a1f37;
}

/* --- Code Modal --- */
#code-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#snippet-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#theme-tagger-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#theme-tagger-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 10002; /* Increased z-index to be on top of everything */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
}
.modal-code-container {
    position: relative;
}
.modal-code-container pre {
    max-height: 50vh;
}
.modal-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}
.modal-action-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-size: 0.85rem;
}
.modal-action-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Snippet Picker Styles */
.picker-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-sub);
    margin: 20px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 5px;
}
.picker-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}
.picker-item:hover {
    background: #f4f7fe;
    border-color: #e1e4f0;
}
.picker-item-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}
.picker-item-desc {
    font-size: 0.85rem;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .content-area {
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    padding-bottom: 5rem;
  }

  .top-bar h2 {
    margin-left: 2.7rem;
  }
  .toppest-bar {
    display: none;
  }
  .sidebar.collapsed .close-nav,
  .sidebar.collapsed .nav-item,
  .sidebar.collapsed .search-box {
    display: none;
  }
  .sidebar{
    position: fixed;
    height: 100vh;
    height: 100dvh;
  }
  .sidebar.collapsed {
    position: absolute;
    width: 70px;
    min-width: 70px;
    background: transparent;
    box-shadow: none;
    border: none;
    pointer-events: none;
  }
  .sidebar.collapsed .toggle-btn {
    pointer-events: auto;
  }
  .sub-card{
    height: 187px;
  }

  /* Docs Section Mobile Optimization */
  .docs-container {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .docs-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e1e4f0;
    padding-right: 0;
    padding-bottom: 15px;
    position: static;
  }

  .docs-sidebar ul {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
  }

  .docs-sidebar li {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-main);
    white-space: nowrap;
  }

  .docs-sidebar li:hover {
    transform: none;
    background: #e1e4f0;
  }
}

/* Settings Page */
#settings-section {
    padding: 20px;
}
.setting-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 800px;
    border: 1px solid #e1e4f0;
}
.setting-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.setting-item label {
    color: var(--text-main);
    font-weight: 600;
}
/* Toggle Switch CSS */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 20px; width: 20px;
    left: 4px; bottom: 4px; background-color: white;
    transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* Color Picker */
input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 28px;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
}
input[type="color"]::-webkit-color-swatch {
    border-radius: 6px;
    border: none;
}
input[type="color"]::-moz-color-swatch {
    border-radius: 6px;
    border: none;
}

/* Dark Mode Theme */
html.dark-mode {
    --bg-color: #121212; 
    --sidebar-bg: #1e1e1e;
    --text-main: #e0e0e0; 
    --text-sub: #a0a0a0; 
}
html.dark-mode .user-pill, html.dark-mode .sub-card, 
html.dark-mode .snippet-card, html.dark-mode .modal-content, 
html.dark-mode .login-card, html.dark-mode .theme-card,
html.dark-mode .docs-container, html.dark-mode .search-box,
html.dark-mode .toppest-links, html.dark-mode .setting-card { 
    background: #1e1e1e; 
    border-color: #333;
    color: #e0e0e0;
}
html.dark-mode .pal{
  color: #e0e0e0 ;
      background: linear-gradient(#1e1e1e, #1e1e1e) padding-box,
                linear-gradient(45deg, var(--primary), #37cfdc, var(--secondary), var(--primary)) border-box;
}
html.dark-mode .search-box input {
    background: transparent;
    color: #e0e0e0;
}
html.dark-mode .sub-card::before {
    background-color: #1e1e1e;
}
html.dark-mode input[type="color"] {
    border-color: #555;
}
html.dark-mode .code-expander {
    background-color: #333;
    color: white;
    border-color: #333;
}
html.dark-mode pre { 
    background-color: #282c34; 
   
}

html.dark-mode .get-btn{
    background-color: transparent;
}
html.dark-mode {
  background: transparent;
}
html.dark-mode code.hljs{
   box-shadow: none;
}


/* Section Fade Animation */
section:not(.hidden) {
    animation: fadeInSection 0.4s ease-out forwards;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Live Preview Section (Tabbed) --- */
.live-preview-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 75vh;
    background: white;
    border-radius: 25px;
    padding: 20px;
    border: 1px solid #e1e4f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.lp-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #e1e4f0;
    padding-bottom: 15px;
    overflow-x: auto; /* For mobile responsiveness */
}

.lp-tab {
    padding: 10px 20px;
    border: none;
    background: #f4f7fe;
    color: var(--text-sub);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.lp-tab:hover {
    background: #e9effd;
    color: var(--primary);
}

.lp-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

.lp-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.lp-pane {
    display: none;
    min-height: 70vh;
    flex-direction: column;
    animation: fadeInPane 0.3s ease-out;
}

.lp-pane.active {
    display: flex;
}

@keyframes fadeInPane {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.code-editor {
    flex: 1;
    width: 100%;
    padding: 20px;
    background: #1a1f37;
    color: #a3aed0;
    border-radius: 15px;
    border: none;
    resize: none;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: rgb(154, 153, 153) transparent;
}


 /* Thumb color | Track color */


/* 4. WEBKIT BROWSER SCROLLBAR (Chrome, Safari, Edge) */
.code-editor::-webkit-scrollbar {
    
  width: 8px;   /* Vertical scrollbar width */
  height: 8px;  /* Horizontal scrollbar height (for code blocks) */
}

.code-editor::-webkit-scrollbar-track {
  background: transparent; /* Keep track invisible to show the shadow through it */
}
.code-editor::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2); /* Subtle white thumb */
  border-radius: 10px;                  /* Rounded scrollbar */
  border: 2px solid transparent;        /* Adds "padding" around the thumb */
  background-clip: content-box;         /* Makes the thumb look centered */
}

.code-editor::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4); /* Brighter on hover */
}

.code-editor:focus {
    color: #e0e0e0;
}

#preview-frame {
    width: 100%;
    min-height: 70vh;
    border: 1px solid #e1e4f0;
    border-radius: 15px;
    background: white;
}

/* Dark Mode Support for Live Preview */
html.dark-mode .live-preview-container {
    background: #1e1e1e;
    border-color: #333;
}

html.dark-mode .lp-tabs {
    border-color: #333;
}

html.dark-mode .lp-tab {
    background: #2b2b2b;
    color: #a0a0a0;
}

html.dark-mode .lp-tab.active {
    background: var(--primary);
    color: white;
}

html.dark-mode #preview-frame {
    border-color: #333;
    background: #121212;
}

/* --- Pal AI Section --- */
.pal-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    background: white;
    border-radius: 25px;
    border: 1px solid #e1e4f0;
    overflow: hidden;
    position: relative;
}

.chat-history {
    flex: 1;
    padding: 40px 15%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: white;
}

.message {
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
    animation: fadeInMessage 0.3s ease;
    color: var(--text-main);
}

@keyframes fadeInMessage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    background: #f0f4f9;
    color: var(--text-main);
    padding: 15px 25px;
    border-radius: 25px;
    max-width: 70%;
}

.message.ai {
    align-self: flex-start;
    background: transparent;
    border: none;
    box-shadow: none;
    width: 100%;
}

.message.system-message {
    align-self: center;
    background: transparent;
    color: var(--text-sub);
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    margin-top: 10vh;
    margin-bottom: 20px;
    background: linear-gradient(to right, #4285f4, #d96570);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.chat-input-container {
    padding: 20px 15% 40px 15%;
    background: white;
    display: flex;
    justify-content: center;
}

.chat-input-wrapper {
    width: 100%;
    background: #f0f4f9;
    border-radius: 35px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.3s;
}

.chat-input-wrapper:focus-within {
    background: #e9eef6;
}

#chat-input {
    flex: 1;
    padding: 12px 0;
    border: none;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    max-height: 150px;
    background: transparent;
    color: var(--text-main);
}

#send-msg-btn, .attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#send-msg-btn:hover, .attach-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* Dark Mode Overrides for Pal */
html.dark-mode .pal-container {
    background: #1e1e1e;
    border-color: #333;
}
html.dark-mode .chat-history {
    background: #121212;
}
html.dark-mode .message.ai {
    color: #e0e0e0;
}
html.dark-mode .message.user {
    background: #2b2b2b;
    color: #e0e0e0;
}
html.dark-mode .chat-input-container {
    background: #1e1e1e;
}
html.dark-mode .chat-input-wrapper {
    background: #2b2b2b;
}
html.dark-mode .chat-input-wrapper:focus-within {
    background: #333;
}
html.dark-mode #chat-input {
    color: #e0e0e0;
}
html.dark-mode #send-msg-btn, html.dark-mode .attach-btn {
    color: #e0e0e0;
}
html.dark-mode #send-msg-btn:hover, html.dark-mode .attach-btn:hover {
    background: rgba(255,255,255,0.1);
}
html.dark-mode .picker-item:hover {
    background: #2b2b2b;
    border-color: #333;
}

/* --- Premium Card Styling --- */
.premium-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e1e4f0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.premium-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}
.premium-header .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
}
.premium-header .icon-box span {
    font-size: 32px;
}
.premium-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--text-main);
}
.premium-header p {
    margin: 0;
    color: var(--text-sub);
    font-size: 0.95rem;
}

/* Free State */
.plan-status {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1rem;
}
.upgrade-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}
.upgrade-btn:hover {
    background: #3367d6;
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.3);
}

/* Premium Active State */
.premium-active-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 20px;
}
.premium-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #16a34a;
    font-weight: 700;
    margin-bottom: 15px;
}
.token-display label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.token-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.token-row code {
    flex: 1;
    background: white;
    border: 1px solid #bbf7d0;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1rem;
    color: #166534;
    letter-spacing: 1px;
}
.copy-token-btn {
    background: white;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    width: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.copy-token-btn:hover {
    background: #dcfce7;
    border-color: #86efac;
}
.token-instruction {
    font-size: 0.85rem;
    color: #15803d;
    margin: 0;
    line-height: 1.4;
}
.token-instruction code {
    background: rgba(255,255,255,0.5);
    padding: 2px 4px;
    border-radius: 4px;
}
/* --- Community Section --- */
#community-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Onboarding */
#community-onboarding {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80vh;
}
.onboarding-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border: 1px solid #e1e4f0;
}
.onboarding-icon {
    width: 80px;
    height: 80px;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.onboarding-icon span { font-size: 40px; }
.comm-form-group { margin: 25px 0; text-align: left; }
.comm-form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.input-with-icon {
    display: flex;
    align-items: center;
    border: 1px solid #e1e4f0;
    border-radius: 12px;
    padding: 10px 15px;
    background: #f9fafb;
}
.input-with-icon input { border: none; background: transparent; outline: none; margin-left: 10px; width: 100%; font-size: 1rem; }
.comm-checkbox { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; margin-bottom: 25px; }
.comm-btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.comm-btn-primary:hover { opacity: 0.9; }
.comm-btn-primary.small { width: auto; padding: 8px 20px; }

/* Feed */
.feed-container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 40px;
}
.post-creator {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e1e4f0;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
#post-input {
    width: 100%;
    border: none;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
}
.post-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}
.post-action-icons {
    display: flex;
    gap: 8px;
}
.post-tag-previews, .post-image-previews { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tag-preview-item {
    display: flex;
    align-items: center;
    background: rgba(66, 133, 244, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
.tag-preview-item button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    margin-left: 5px;
    padding: 0;
    line-height: 1;
}
.post-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}
.post-image-previews { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.preview-thumb { position: relative; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; }
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-thumb button { position: absolute; top: 0; right: 0; background: rgba(0,0,0,0.5); color: white; border: none; cursor: pointer; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }

/* Post Card */
.post-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid #e1e4f0;
    margin-bottom: 20px;
    animation: fadeInMessage 0.3s ease;
}
.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.post-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.post-username { font-weight: 700; color: var(--text-main); }
.post-time { font-size: 0.8rem; color: var(--text-sub); }
.post-content { font-size: 1rem; line-height: 1.6; color: var(--text-main); margin-bottom: 15px; white-space: pre-wrap; }
.post-tags {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-tag {
    background: #f4f7fe;
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.post-tag:hover { background: #e9effd; }

/* Post Actions & Comments */
.post-footer {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.action-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-sub);
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
}
.action-btn:hover { background: #f4f7fe; color: var(--text-main); }
.action-btn.liked { color: #ef4444; }
.action-btn.liked span { font-variation-settings: 'FILL' 1; }

.comments-section {
    margin-top: 15px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}
.comment-item { display: flex; gap: 10px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comment-bubble {
    background: white;
    padding: 8px 12px;
    border-radius: 0 12px 12px 12px;
    border: 1px solid #e1e4f0;
    font-size: 0.9rem;
}
.comment-author { font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; color: var(--text-main); }
.comment-text { color: var(--text-main); line-height: 1.4; }

.comment-input-wrapper { display: flex; gap: 10px; }
.comment-input-wrapper input {
    flex: 1;
    border: 1px solid #e1e4f0;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
}
.comment-input-wrapper button {
    background: var(--primary); color: white; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Image Grid Logic */
.post-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.post-images img {
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    height: 340px;
    flex: 1;
    min-width: 0; /* Allows flex shrink */
}
@media (max-width: 600px) {
    .post-images{ 
       flex-direction: column;
    }
    .post-images img {
        height: 200px;
        width: auto;
}
}
/* Scrollbar logic for > 2 images */
.post-images.scrollable {
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
}
.post-images.scrollable img {
    flex: 0 0 200px; /* Fixed width for scrolling items */
    height: 310px;
}
.post-images.scrollable::-webkit-scrollbar {
  width: 8px;   /* Vertical scrollbar width */
  height: 8px;  /* Horizontal scrollbar height (for code blocks) */
}

.post-images.scrollable::-webkit-scrollbar-track {
  background: transparent; /* Keep track invisible to show the shadow through it */
}

.post-images.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2); /* Subtle white thumb */
  border-radius: 10px;                  /* Rounded scrollbar */
  border: 2px solid transparent;        /* Adds "padding" around the thumb */
  background-clip: content-box;         /* Makes the thumb look centered */
}

.post-images.scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4); /* Brighter on hover */
}

/* Premium Promo Button in Dropdown */
.premium-promo-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #fcd34d;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: transform 0.2s;
    text-align: left;
}
.premium-promo-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }
.premium-btn-title { font-weight: 700; color: #b45309; display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.premium-btn-sub { font-size: 0.8rem; color: #d97706; margin-top: 4px; }

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.dropdown-item:hover { background: #f4f7fe; }

/* Dark Mode Dropdown */
html.dark-mode .user-dropdown-menu { background: #1e1e1e; border-color: #333; }
html.dark-mode .user-dropdown-header { border-bottom-color: #333; }
html.dark-mode .dropdown-divider { background: #333; }
html.dark-mode .dropdown-item { color: #e0e0e0; }
html.dark-mode .dropdown-item:hover { background: #2b2b2b; }
html.dark-mode .premium-promo-btn { background: linear-gradient(135deg, #451a03 0%, #78350f 100%); border-color: #92400e; }
html.dark-mode .premium-btn-title { color: #fbbf24; }
html.dark-mode .premium-btn-sub { color: #fcd34d; }
/* Dark Mode */
html.dark-mode .onboarding-card, html.dark-mode .post-creator, html.dark-mode .post-card { background: #1e1e1e; border-color: #333; }
html.dark-mode #post-input { background: transparent; color: #e0e0e0; }
html.dark-mode .input-with-icon { background: #2b2b2b; border-color: #444; }
html.dark-mode .input-with-icon input { color: #e0e0e0; }
html.dark-mode .tag-preview-item {
    background: rgba(138, 180, 248, 0.15);
    color: #8ab4f8;
}
html.dark-mode .tag-preview-item button {
    color: #8ab4f8;
}
html.dark-mode .post-tags {
    border-top-color: #333;
}
html.dark-mode .post-tag {
    background: #2b2b2b;
    color: #8ab4f8;
}
html.dark-mode .post-tag:hover { background: #333; }
html.dark-mode .post-footer, html.dark-mode .post-tags { border-top-color: #333; }
html.dark-mode .comments-section { background: #121212; }
html.dark-mode .comment-bubble { background: #2b2b2b; border-color: #333; }
html.dark-mode .comment-author { color: #e0e0e0; }
html.dark-mode .comment-text { color: #ccc; }
html.dark-mode .comment-input-wrapper input { background: #2b2b2b; border-color: #333; color: white; }
html.dark-mode .action-btn:hover { background: rgba(255,255,255,0.05); color: #e0e0e0; }

/* Dark Mode Adjustments */
html.dark-mode .premium-card {
    background: #1e1e1e;
    border-color: #333;
}
html.dark-mode .premium-header .icon-box {
    background: linear-gradient(135deg, #3a2a0d 0%, #453210 100%);
    color: #fbbf24;
}
html.dark-mode .premium-active-box {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
}
html.dark-mode .premium-status {
    color: #4ade80;
}
html.dark-mode .token-display label {
    color: #86efac;
}
html.dark-mode .token-row code {
    background: #121212;
    border-color: rgba(22, 163, 74, 0.3);
    color: #86efac;
}
html.dark-mode .copy-token-btn {
    background: #121212;
    border-color: rgba(22, 163, 74, 0.3);
    color: #4ade80;
}
html.dark-mode .copy-token-btn:hover {
    background: rgba(22, 163, 74, 0.2);
}
html.dark-mode .token-instruction {
    color: #86efac;
}

/* --- Premium User UI Features --- */

/* 1. Gradient Outline for Profile Pic */
.user-pill-img.premium {
    border: 2px solid transparent;
    background: var(--primary-gradient);    background-size: 400% 400%;
    animation: gradient-animation 3s ease infinite;
    box-shadow: 0 0 6px rgba(255, 0, 200, 0.3);
}
html.dark-mode .user-pill-img.premium {
    background: var(--primary-gradient);
}
/* 2. Moving Gradient Diamond Badge */
.premium-diamond-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    display: none;
    background: linear-gradient(45deg, #FFD700, #FDB931, #fff, #FFD700);
    background-size: 300% 300%;
    animation: gradient-animation 3s ease infinite;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    z-index: 1002;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Community Post Badge Styles */
.post-avatar-wrapper {
    position: relative;
    display: inline-block;
}
.premium-diamond-badge.small {
    width: 14px;
    height: 14px;
    bottom: 0;
    right: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 3. Premium Status Display in Dropdown */
.premium-status-display {
    width: 100%;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(253, 185, 49, 0.05) 100%);
    background: var(--primary-gradient);
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b45309;
}
.premium-status-icon {
    font-size: 24px;
    background: var(--primary-gradient);
    filter: drop-shadow(0 2px 4px rgba(253, 185, 49, 0.3));
}
html.dark-mode .premium-status-display {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(253, 185, 49, 0.05) 100%);
    color: #fbbf24;
    border-color: #92400e;
}