:root {
      --header-bg: #5e3a8c;
      --header-text: #ffffff;
      --listing-bg: #f4f4f8;
      --promoted-bg: #e0d7f3;
      --promoted-border: #8a79af;
      --suggested-bg: #8a79af;
      --suggested-text: #ffffff;
    }
    body.dark-mode {
      --header-bg: #3a1f5c;
      --header-text: #e0e0e0;
      --listing-bg: #2e2e3a;
      --promoted-bg: #352f4b;
      --promoted-border: #4c3a60;
      --suggested-bg: #4c3a60;
      --suggested-text: #ffffff;
      background-color: #121212;
      color: #e0e0e0;
    }
    /* Layout */
    .container {
      display: flex;
      min-height: 100vh;
    }
    /* Left Sidebar */
    .sidebar {
      width: 250px;
      background: #f9f9f9;
      border-right: 1px solid #ddd;
      padding-bottom: 20px;
      flex-shrink: 0;
    }
    .sidebar-header {
      padding: 15px;
      border-bottom: 1px solid #ddd;
    }
    .sidebar .logo {
      font-size: 20px;
      font-weight: bold;
    }
    nav ul {
      list-style: none;
      padding-left: 0;
    }
    nav li {
      padding: 12px 15px;
      border-bottom: 1px solid #eee;
      cursor: pointer;
    }
    nav li.active,
    nav li:hover {
      background: rgba(0,0,0,0.05);
    }
    /* Extra links in sidebar */
    .sidebar-extra {
      margin-top: 30px;
      padding: 15px;
      border-top: 1px solid #ddd;
    }
    .sidebar-extra a {
      display: block;
      margin-bottom: 10px;
      color: var(--header-bg);
      font-weight: bold;
    }
    /* Main Content */
    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    header.main-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 15px 20px;
      background-color: var(--header-bg);
      color: var(--header-text);
    }
    .controls {
      display: flex;
      align-items: center;
      gap: 20px;
    }
    .controls select {
      padding: 5px;
    }
    .dark-mode-toggle {
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .switch {
      position: relative;
      display: inline-block;
      width: 50px;
      height: 24px;
    }
    .switch input { opacity: 0; width: 0; height: 0; }
    .slider {
      position: absolute;
      top: 0; left: 0;
      right: 0; bottom: 0;
      background-color: #ccc;
      border-radius: 24px;
      transition: 0.4s;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      border-radius: 50%;
      transition: 0.4s;
    }
    input:checked + .slider {
      background-color: #2196F3;
    }
    input:checked + .slider:before {
      transform: translateX(26px);
    }
    /* Search Bar */
    .search-container {
      padding: 15px 20px;
      border-bottom: 1px solid #ddd;
    }
    .search-container input {
      width: 100%;
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    /* Listings */
    .listings {
      padding: 20px;
      background: #f7f7f7;
    }
    .category-group {
      margin-bottom: 40px;
    }
    .category-group h2 {
      position: sticky;
      top: 0;
      background-color: var(--header-bg);
      color: var(--header-text);
      padding: 10px;
      margin: 0;
      z-index: 10;
    }
    .category-items {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 15px;
    }
    /* Listing Card */
    .listing {
      background-color: var(--listing-bg);
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 15px;
      display: flex;
      align-items: center;
      position: relative;
      transition: transform 0.3s ease, opacity 0.3s ease;
      opacity: 0;
      transform: translateY(20px);
    }
    .listing.fade-in {
      opacity: 1;
      transform: translateY(0);
    }
    .listing:hover {
      transform: scale(1.02);
    }
    .listing-logo {
      width: 50px;
      height: 50px;
      margin-right: 15px;
      flex-shrink: 0;
    }
    .listing-logo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 4px;
    }
    .suggested-label {
      position: absolute;
      top: 8px;
      right: 8px;
      background: var(--suggested-bg);
      color: var(--suggested-text);
      padding: 2px 6px;
      font-size: 12px;
      border-radius: 3px;
    }
    /* Right Sidebar (Ads) - hidden on mobile */
    .right-sidebar {
      width: 300px;
      padding: 20px;
      background: #f9f9f9;
      border-left: 1px solid #ddd;
    }
    /* Sticky Ads */
    .ad {
      border: 1px solid #ccc;
      padding: 10px;
      text-align: center;
      background: #fff;
      margin-bottom: 20px;
    }
    .ad.ad-300x250 {
      width: 300px;
      height: 250px;
    }
    .ad.ad-1 { position: sticky; top: 20px; }
    .ad.ad-2 { position: sticky; top: 290px; }
    /* Footer */
    footer.footer {
      padding: 15px 20px;
      text-align: center;
      border-top: 1px solid #ddd;
    }
    /* Back to Top Button */
    #back-to-top {
      position: fixed;
      bottom: 20px;
      right: 20px;
      padding: 10px 15px;
      background-color: var(--header-bg);
      color: var(--header-text);
      border: none;
      border-radius: 5px;
      cursor: pointer;
      display: none;
      z-index: 100;
    }
    /* Responsive: one column listings on mobile */
    @media (max-width: 768px) {
      .category-items {
        grid-template-columns: 1fr;
      }
      .right-sidebar {
        display: none;
      }
    }