/* Theme Variables */
:root {
    /* Light Theme Colors */
    --bg-primary: #f8faff;
    --bg-secondary: #f0f4f8;
    --bg-tertiary: #e8ecf0;
    --text-primary: #1a1a1a;
    --text-secondary: #5f6368;
    --text-tertiary: #9aa0a6;
    --border-color: #e0e4e8;
    
    /* Rainbow Colors (ROYGBIV) */
    --rainbow-red: #ff0000;
    --rainbow-orange: #ff7f00;
    --rainbow-yellow: #ffff00;
    --rainbow-green: #00ff00;
    --rainbow-blue: #0000ff;
    --rainbow-indigo: #4b0082;
    --rainbow-violet: #9400d3;
    
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glow-primary: rgba(255, 0, 0, 0.3);
    --glow-secondary: rgba(0, 255, 0, 0.3);
    --glow-tertiary: rgba(0, 0, 255, 0.3);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --border-color: #404040;
    
    /* Rainbow Colors (ROYGBIV) - same for dark theme */
    --rainbow-red: #ff0000;
    --rainbow-orange: #ff7f00;
    --rainbow-yellow: #ffff00;
    --rainbow-green: #00ff00;
    --rainbow-blue: #0000ff;
    --rainbow-indigo: #4b0082;
    --rainbow-violet: #9400d3;
    
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(26, 26, 26, 0.3);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glow-primary: rgba(255, 0, 0, 0.4);
    --glow-secondary: rgba(0, 255, 0, 0.4);
    --glow-tertiary: rgba(0, 0, 255, 0.4);
}

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



[data-theme="dark"] body {
    background: 
        radial-gradient(circle at 20% 80%, rgba(135, 206, 250, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(173, 216, 230, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(100, 149, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Rainbow Bar */
.rainbow-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rainbow-red), var(--rainbow-orange), var(--rainbow-yellow), var(--rainbow-green), var(--rainbow-blue), var(--rainbow-indigo), var(--rainbow-violet));
    background-size: 200% 100%;
    animation: rainbow-flow 5s ease-in-out infinite;
    z-index: 1002;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}


main {
    display: flex;
    height: calc(100% - 75px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
  
    overflow-x: hidden;
    overflow-y: auto;
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

main::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

@keyframes rainbow-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Top Buttons Container */
.top-buttons {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 1rem;
    align-items: center;
}



/* Theme Toggle Button */
.theme-toggle {
    position: relative;
}

.theme-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: 
        0 4px 12px var(--shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px var(--shadow-medium),
        0 0 20px rgba(135, 206, 250, 0.3);
}

.theme-btn .moon-icon {
    display: block;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.theme-btn .sun-icon {
    display: none;
    font-size: 1.2rem;
    color: var(--text-primary);
}

[data-theme="dark"] .theme-btn .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-btn .moon-icon {
    display: none;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 6rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Google-like Search Section */
.search-section {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 25vh;
}

.search-container {
    max-width: 584px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.google-search-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.search-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.search-logo i {
    font-size: 2rem;
    color: var(--rainbow-blue);
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 584px;
}

.search-input-container:focus-within {
    border-color: var(--rainbow-blue);
    box-shadow: 0 4px 20px rgba(135, 206, 250, 0.3);
    transform: scale(1.02);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-right: 0.75rem;
    transition: color 0.3s ease;
}

.search-input-container:focus-within .search-icon {
    color: var(--rainbow-blue);
}

.google-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: inherit;
    min-width: 0;
}

.google-search-input::placeholder {
    color: var(--text-tertiary);
}

.google-search-button {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.google-search-button:hover {
    background: rgba(135, 206, 250, 0.1);
    color: var(--rainbow-blue);
}

.google-search-button i {
    font-size: 1rem;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 20px var(--shadow-medium);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.search-suggestions::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--glass-border);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(135, 206, 250, 0.1);
}

/* Sections */
section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.rainbow-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.rainbow-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rainbow-red), var(--rainbow-orange), var(--rainbow-yellow), var(--rainbow-green), var(--rainbow-blue), var(--rainbow-indigo), var(--rainbow-violet));
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.rainbow-section {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.chip {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: 25px;
    z-index: -1;
    opacity: 0.8;
}

.chip:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px var(--shadow-medium);
    border-color: var(--rainbow-blue);
    background: rgba(135, 206, 250, 0.1);
}

.chip:hover::after {
    opacity: 0.3;
}

.chip.selected {
    border-color: var(--rainbow-blue);
    box-shadow: 0 0 20px rgba(135, 206, 250, 0.4);
    background: rgba(135, 206, 250, 0.1);
}

/* Specific colors for different types */
.chip[data-type="videos"] {
    border-color: #ff4c4c;
}

.chip[data-type="videos"]:hover,
.chip[data-type="videos"].selected {
    border-color: #ff4c4c;
    box-shadow: 0 0 20px rgba(255, 76, 76, 0.4);
    background: rgba(255, 76, 76, 0.1);
}

.chip[data-type="images"] {
    border-color: #f4d03f;
}

.chip[data-type="images"]:hover,
.chip[data-type="images"].selected {
    border-color: #f4d03f;
    box-shadow: 0 0 20px rgba(244, 208, 63, 0.4);
    background: rgba(244, 208, 63, 0.1);
}

.chip[data-type="sounds"] {
    border-color: #4a90e2;
}

.chip[data-type="sounds"]:hover,
.chip[data-type="sounds"].selected {
    border-color: #4a90e2;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
    background: rgba(74, 144, 226, 0.1);
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rainbow-red), var(--rainbow-orange), var(--rainbow-yellow), var(--rainbow-green), var(--rainbow-blue), var(--rainbow-indigo), var(--rainbow-violet));
    border-radius: 13px 13px 0 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px var(--shadow-medium);
    border-color: var(--rainbow-blue);
    background: rgba(135, 206, 250, 0.1);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--glass-border);
}

.btn-secondary {
    background: rgba(128, 128, 128, 0.15);
    border-color: var(--glass-border);
}




.setup-head {
    text-align: center;
    margin-bottom: 1.5rem;
}

.setup-head h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.setup-head p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.types-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.compact-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#contentList li:not(.active) {
    opacity: 0.8;
  }

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-medium);
    border-color: rgba(255,255,255,0.5);
    color: var(--text-primary);
}

.tab-btn.active {
    border-color: white;
    background: rgba(135, 206, 250, 0.1);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(135, 206, 250, 0.3);
}

.tab-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

.tab-btn.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px var(--shadow-light);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}



.compact-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px var(--shadow-light);
    display: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.compact-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--bg-secondary);
    transform: translateX(-2px);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.back-btn i {
    font-size: 0.9rem;
}


.compact-chips {
    gap: 0.75rem;
}

.compact-chips .chip {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.compact-chips .chip.hidden {
    display: none !important;
}

.compact-chips .chip:not(.hidden) {
    display: inline-flex !important;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .compact-tabs {
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .compact-section {
        padding: 1rem;
    }
    
    .section-header h3 {
        font-size: 1.1rem;
    }
    
    .buttons {
        gap: 1rem;
        margin-top: 1.5rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-top: 5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.5rem;
    }

    .chips {
        gap: 0.5rem;
    }

    .chip {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .top-buttons {
        top: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }

 
    /* Google search bar responsive styles */
    .search-section {
        min-height: 30vh;
        padding: 0 1rem;
    }

    .search-container {
        max-width: 100%;
    }

    .search-logo {
        font-size: 2rem;
    }

    .search-logo i {
        font-size: 1.5rem;
    }

    .search-input-container {
        border-radius: 20px;
        padding: 0.5rem 0.75rem;
    }

    .google-search-input {
        padding: 0.25rem;
        font-size: 1rem;
    }

    .google-search-button {
        width: 36px;
        height: 36px;
    }

    .google-search-button i {
        font-size: 0.9rem;
    }
} 



.chip {
    display: flex;
    align-items: center;
    padding: 2px 12px;
    margin: 4px;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
  }

  .chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
    border-color: var(--rainbow-blue);
  }

  .chip.selected {
    background: rgba(135, 206, 250, 0.2);
    border-color: rgba(255,255,255,0.7);
    color: var(--text-primary);
  }

  .chip-icon {
    flex-shrink: 0;
    object-fit: contain;
  }

  /* Icon items - vertical layout with icon on top and text below */
  .icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    min-width: 85px;
    min-height: 90px;
  }

  .icon-item:hover {
    transform: translateY(-2px);
  }

  .icon-item-container {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }

  /* Wider container for language subcategories to accommodate glow effect */
  .language-subcategory-container {
    width: 64px;
    height: 64px;
    overflow: visible;
  }

  .icon-item-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: all 0.3s ease;
  }

  /* Glow image - hidden by default when not selected */
  .icon-item .glow-image {
    display: none;
  }

  /* Glow image - shown when selected, positioned behind main-image for glow effect */
  .icon-item.selected .glow-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    filter: blur(2px) brightness(1.5);
    opacity: 0.8;
  }

  /* Light mode - Blue glow effect for better visibility */
  :root:not([data-theme="dark"]) .icon-item.selected .glow-image {
    filter: blur(3px) brightness(1.2);
    opacity: 0.9;
  }

  /* Remove top/left positioning for language subcategories glow image */
  .icon-item.selected .language-subcategory-container .glow-image {
    top: auto;
    left: auto;
  }

  /* Light mode - also remove top/left for language subcategories */
  :root:not([data-theme="dark"]) .icon-item.selected .language-subcategory-container .glow-image {
    top: auto;
    left: auto;
  }

  /* Main image - glow effect when selected */
  .icon-item.selected .main-image {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 3px black) drop-shadow(0 0 1px white) drop-shadow(0 0 1px white)
      drop-shadow(0 0 3px white);
  }

  /* Light mode - Lighter blue glow on main image for better visibility */
  :root:not([data-theme="dark"]) .icon-item.selected .main-image {
    filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.7)) 
            drop-shadow(0 0 8px rgba(96, 165, 250, 0.5))
            drop-shadow(0 0 2px rgba(96, 165, 250, 0.8));
  }

  .icon-item-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    word-break: break-word;
    width: 80px;
    min-height: 2.4em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .compact-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    justify-items: center;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  .compact-chips::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
  }

  /* Source items styling - logo grid */
  .source-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin: 8px;
    /*! border-radius: 12px; */
    /*! background: var(--glass-bg); */
    /*! backdrop-filter: blur(20px); */
    /*! border: 1px solid var(--glass-border); */
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 80px;
    position: relative;
    z-index: 1;
  }

  .source-item:hover {
    z-index: 10000;
    overflow: visible !important;
  }



  /* Image container for glow effect */
  .source-item .main-image,
  .source-item .glow-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
  }

  .source-item .main-image {
    z-index: 1;
  }

  .source-item .glow-image {
    z-index: 0;
    opacity: 0;
    filter: blur(2px) brightness(1.5);
  }

  .source-item.selected .glow-image {
    opacity: 0.8;
  }

  /* Light mode - Lighter blue glow effect for sources (same as categories) */
  :root:not([data-theme="dark"]) .source-item.selected .glow-image {
    filter: blur(3px) brightness(1.2);
    opacity: 0.9;
  }

  /* Light mode - Lighter blue glow on source main image */
  :root:not([data-theme="dark"]) .source-item.selected .main-image {
    filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.7)) 
            drop-shadow(0 0 8px rgba(96, 165, 250, 0.5))
            drop-shadow(0 0 2px rgba(96, 165, 250, 0.8));
  }

  .source-item:hover .glow-image {
    opacity: 0.5;
  }

  /* Tooltip styles for source items (reused from filterMenu) */
  .source-tooltip {
    position: absolute !important;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 99999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
  }

  .source-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
  }

  .source-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
  }

  /* Ensure parent containers don't clip tooltips on hover */
  #source-container:hover {
    overflow: visible !important;
  }

  /* Source container grid layout */
  #source-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  #source-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .chip {
      padding: 1px 10px;
      font-size: 0.85rem;
    }
    
    .chip-icon {
      width: 30px !important;
      height: 30px !important;
    }

    .icon-item-container {
      width: 40px !important;
      height: 40px !important;
    }

    .icon-item-icon {
      width: 40px !important;
      height: 40px !important;
    }

    .icon-item {
      min-width: 70px;
      min-height: 80px;
      padding: 6px;
    }

    .icon-item-label {
      font-size: 0.75rem;
      width: 70px;
      min-height: 2.2em;
    }

    .compact-chips {
      grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
      gap: 4px;
      padding: 6px;
    }

    .source-item {
      min-width: 70px;
      min-height: 70px;
      padding: 8px;
    }

    .source-item .main-image,
    .source-item .glow-image {
      width: 32px;
      height: 32px;
    }

    .source-tooltip {
      font-size: 11px;
      padding: 5px 10px;
    }

    #source-container {
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 8px;
    }
  }

/* Explore Search Input Styling */
.search-container {
    width: 100%;
  display: flex;
  justify-content: center;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  padding: 0.75rem 1rem;
  max-width: 400px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.search-input-wrapper:focus-within {
  border-color: rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: scale(1.02);
}

[data-theme="dark"] .search-input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-icon {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-left: 0.5rem;
  transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
  color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .search-input-wrapper:focus-within .search-icon {
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive styles for explore search */
@media (max-width: 768px) {
  .search-container {
    margin: 1rem 0;
    padding: 0 1rem;
  }
  
  .search-input-wrapper {
    max-width: 100%;
    padding: 0.6rem 0.8rem;
  }
  
  .search-input {
    font-size: 0.9rem;
  }
  
  .search-icon {
    font-size: 1rem;
  }
}

/* Hide scrollbars for set pages but keep scrollable */
body.set-page {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar but keep scrollable */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body.set-page::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

html:has(body.set-page) {
  overflow-y: auto;
  overflow-x: hidden;
  /* Hide scrollbar but keep scrollable */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html:has(body.set-page)::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}