/**
 * Brain.dk - Custom Styles
 * Supplement to Tailwind CSS
 */

/* ================================
   CSS Custom Properties
   ================================ */
:root {
    --brain-primary: #d946ef;
    --brain-secondary: #14b8a6;
    --brain-dark: #1e1b4b;
    --gradient-primary: linear-gradient(135deg, #d946ef 0%, #a21caf 50%, #14b8a6 100%);
    --gradient-glow: radial-gradient(circle, rgba(217, 70, 239, 0.3) 0%, transparent 70%);
    --shadow-glow: 0 0 40px rgba(217, 70, 239, 0.3);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   Base Styles
   ================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background: var(--brain-primary);
    color: white;
}

/* ================================
   Custom Animations
   ================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    from {
        opacity: 0.5;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

/* ================================
   Logo & Branding
   ================================ */
.logo-glow {
    filter: drop-shadow(0 0 20px rgba(217, 70, 239, 0.5));
}

/* ================================
   Search Container Styling
   ================================ */
.search-container {
    position: relative;
    transition: all 0.3s var(--transition-smooth);
}

.search-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.search-container:focus-within {
    border-color: var(--brain-primary);
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.2), var(--shadow-glow);
}

/* ================================
   Google CSE Custom Styling
   ================================ */
/* Search box input */
.gsc-input-box {
    border-radius: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
}

.gsc-input-box:hover,
.gsc-input-box:focus-within {
    border-color: var(--brain-primary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.gsc-input {
    background: transparent !important;
    color: white !important;
    font-size: 16px !important;
}

.gsc-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Search button */
.gsc-search-button-v2 {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.gsc-search-button-v2:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 20px rgba(217, 70, 239, 0.4) !important;
}

.gsc-search-button-v2 svg {
    fill: white !important;
}

/* Results styling */
.gsc-control-cse {
    background: transparent !important;
    border: none !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

.gsc-result {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

.gsc-result:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--brain-primary) !important;
    transform: translateX(4px) !important;
}

.gs-title,
.gs-title * {
    color: var(--brain-primary) !important;
    text-decoration: none !important;
}

.gs-title:hover,
.gs-title:hover * {
    color: var(--brain-secondary) !important;
}

.gs-snippet {
    color: rgba(255, 255, 255, 0.8) !important;
}

.gs-visibleUrl {
    color: var(--brain-secondary) !important;
}

/* Pagination */
.gsc-cursor-page {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.gsc-cursor-page:hover,
.gsc-cursor-current-page {
    background: var(--brain-primary) !important;
    color: white !important;
}

/* Remove Google branding background */
.gcsc-branding {
    display: none !important;
}

/* Autocomplete dropdown - Dark theme */
.gsc-completion-container,
.gsc-completion-selected,
.gsc-completion-selected .gsc-completion-promotion-table,
.gsc-completion-container table,
.gsc-completion-container tbody,
.gsc-completion-container tr,
.gsc-completion-container td {
    background: rgba(30, 27, 75, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    color: white !important;
}

.gsc-completion-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin-top: 8px !important;
    padding: 8px 0 !important;
    position: absolute !important;
    z-index: 1000 !important;
    left: 0 !important;
    right: 0 !important;
}

.gsc-completion-container table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: transparent !important;
}

.gsc-completion-container tbody {
    background: transparent !important;
}

.gsc-completion-container tr {
    background: transparent !important;
    border: none !important;
}

.gsc-completion-container td {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.gsc-completion-selected {
    background: rgba(217, 70, 239, 0.2) !important;
    border-left: 3px solid var(--brain-primary) !important;
}

.gsc-completion-container .gsc-completion-selected {
    background: rgba(217, 70, 239, 0.2) !important;
}

.gsc-completion-container .gsc-completion-selected:hover {
    background: rgba(217, 70, 239, 0.3) !important;
}

.gsc-completion-container .gsc-completion {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 12px 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    background: transparent !important;
    border: none !important;
}

.gsc-completion-container .gsc-completion:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.gsc-completion-container .gsc-completion-selected .gsc-completion {
    color: white !important;
    background: rgba(217, 70, 239, 0.2) !important;
}

/* Fix for autocomplete wrapper */
.gsc-completion-container-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}

/* Ensure input box container allows autocomplete to expand */
.gsc-input-box {
    position: relative !important;
}

/* Fix autocomplete positioning */
.gsc-completion-container {
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
}

/* More aggressive autocomplete styling - target all possible selectors */
div[class*="completion"],
div[class*="Completion"],
.gsc-completion-container *,
.gsc-completion-selected *,
.gsc-completion * {
    background-color: rgba(30, 27, 75, 0.98) !important;
    color: white !important;
}

/* Specific table cell styling */
.gsc-completion-container td.gsc-completion {
    background: transparent !important;
    padding: 12px 20px !important;
}

.gsc-completion-container td.gsc-completion:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.gsc-completion-container tr.gsc-completion-selected td.gsc-completion {
    background: rgba(217, 70, 239, 0.2) !important;
    border-left: 3px solid var(--brain-primary) !important;
}

/* Override any inline styles */
.gsc-completion-container[style],
.gsc-completion-container table[style],
.gsc-completion-container td[style] {
    background: rgba(30, 27, 75, 0.98) !important;
    color: white !important;
    width: 100% !important;
}

/* Fix for the wrapper that might be constraining width */
.gsc-input-box,
.gsc-input-box table,
.gsc-input-box tbody {
    width: 100% !important;
    position: relative !important;
}

/* Search results container - Make it full width and larger */
.gsc-results-wrapper-overlay,
.gsc-results-wrapper-visible {
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    border: none !important;
    margin-top: 20px !important;
    position: relative !important;
    display: block !important;
    overflow: visible !important;
}

/* Remove overlay styling - make it inline */
.gsc-results-wrapper-overlay {
    position: relative !important;
    display: block !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    overflow: visible !important;
    z-index: auto !important;
}

/* Remove any overlay backdrop/background */
.gsc-results-wrapper-overlay::before,
.gsc-results-wrapper-overlay::after {
    display: none !important;
}

/* Fix body/html scrolling */
body, html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
}

/* Remove any fixed overlays that block scrolling */
body > div[style*="position: fixed"],
body > div[style*="position:fixed"] {
    display: none !important;
}

/* Ensure main content is scrollable */
main {
    overflow: visible !important;
    height: auto !important;
}

/* Hide searchbox on search.php page - only show results */
.results-container .gsc-search-box,
.results-container .gsc-input-box {
    display: none !important;
}

.results-container .gsc-control-cse {
    padding-top: 0 !important;
}

/* Make sure results are visible and properly styled */
.results-container .gsc-results-wrapper-overlay,
.results-container .gsc-results-wrapper-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    background: transparent !important;
    overflow: visible !important;
    z-index: auto !important;
}

/* Remove any overlay backgrounds or backdrops */
.gsc-results-wrapper-overlay[style*="background"],
.gsc-results-wrapper-overlay[style*="backdrop"] {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Fix any fixed position overlays */
div[class*="overlay"][style*="position: fixed"],
div[class*="overlay"][style*="position:fixed"],
div[style*="position: fixed"][style*="background"],
div[style*="position:fixed"][style*="background"] {
    display: none !important;
    pointer-events: none !important;
}

/* Remove Google CSE overlay backdrop */
.gsc-results-wrapper-overlay[style*="background-color"],
.gsc-results-wrapper-overlay[style*="background"],
div[class*="gsc"][style*="background"][style*="position: fixed"],
div[class*="gsc"][style*="background"][style*="position:fixed"] {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    position: relative !important;
    pointer-events: auto !important;
}

/* Ensure body and html can scroll */
html, body {
    overflow: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
}

/* Remove any blocking overlays - be very aggressive */
body > div[style*="position: fixed"],
body > div[style*="position:fixed"],
div[style*="position: fixed"][style*="background"],
div[style*="position:fixed"][style*="background"],
div[style*="position: fixed"][style*="z-index"],
div[style*="position:fixed"][style*="z-index"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Remove Google CSE overlay specifically */
div[class*="gsc"][style*="position: fixed"],
div[class*="gsc"][style*="position:fixed"],
.gsc-results-wrapper-overlay[style*="position: fixed"],
.gsc-results-wrapper-overlay[style*="position:fixed"],
div[style*="position: fixed"][style*="inset"],
div[style*="position:fixed"][style*="inset"] {
    position: relative !important;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: auto !important;
    pointer-events: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
}

/* Remove any backdrop/overlay divs */
div[style*="background"][style*="position: fixed"]:not([class*="fixed"]):not([id*="fixed"]),
div[style*="background"][style*="position:fixed"]:not([class*="fixed"]):not([id*="fixed"]),
div[style*="position: fixed"]:not([class*="fixed"]):not([id*="fixed"]):not([class*="header"]):not([class*="nav"]),
div[style*="position:fixed"]:not([class*="fixed"]):not([id*="fixed"]):not([class*="header"]):not([class*="nav"]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Specifically target any gray/transparent overlays */
div[style*="rgba"][style*="position: fixed"],
div[style*="rgba"][style*="position:fixed"],
div[style*="background-color"][style*="position: fixed"],
div[style*="background-color"][style*="position:fixed"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Make sure main content is scrollable */
main, .main, #main {
    overflow: visible !important;
    height: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

.gsc-results {
    width: 100% !important;
    max-width: 100% !important;
}

.gsc-resultsbox-visible {
    width: 100% !important;
    max-width: 100% !important;
}

/* Search results wrapper */
.gsc-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

.gsc-control-cse {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* Results box */
.gsc-resultsbox-visible {
    background: transparent !important;
}

/* Make search results area larger */
.gsc-results-wrapper-overlay {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 400px !important;
}

/* Search box container - ensure full width */
.gsc-search-box,
.gsc-search-box-tools {
    width: 100% !important;
    max-width: 100% !important;
}

/* Table layout fix */
.gsc-search-box table {
    width: 100% !important;
}

/* Result info styling */
.gsc-result-info {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 12px 0 !important;
    font-size: 14px !important;
}

/* Remove border/line from above wrapper area */
.gsc-above-wrapper-area,
.gsc-above-wrapper-area-container,
.gsc-above-wrapper-area table,
.gsc-above-wrapper-area tbody,
.gsc-above-wrapper-area tr,
.gsc-above-wrapper-area td,
.gsc-above-wrapper-area * {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Remove any horizontal lines/separators */
.gsc-above-wrapper-area::before,
.gsc-above-wrapper-area::after,
.gsc-above-wrapper-area hr,
.gsc-above-wrapper-area .gsc-separator,
.gsc-above-wrapper-area-container::before,
.gsc-above-wrapper-area-container::after {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    border: none !important;
    content: none !important;
}

/* Remove borders from table cells specifically */
.gsc-above-wrapper-area-container td,
.gsc-above-wrapper-area-container th {
    border: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
}

/* Remove any border from the wrapper itself */
.gsc-results-wrapper-overlay,
.gsc-results-wrapper-visible {
    border-top: none !important;
}

/* Remove separator line between results info and results */
.gsc-above-wrapper-area + *,
.gsc-above-wrapper-area-container + * {
    border-top: none !important;
}

/* Remove any borders from inline styles */
.gsc-above-wrapper-area[style*="border"],
.gsc-above-wrapper-area-container[style*="border"],
.gsc-above-wrapper-area table[style*="border"],
.gsc-above-wrapper-area td[style*="border"] {
    border: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
}

/* Remove any hr or separator elements */
.gsc-above-wrapper-area hr,
.gsc-above-wrapper-area-container hr,
.gsc-separator,
.gsc-above-wrapper-area .gsc-separator {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Also check for any divs acting as separators */
.gsc-above-wrapper-area > div[style*="height: 1px"],
.gsc-above-wrapper-area > div[style*="height:1px"],
.gsc-above-wrapper-area > div[style*="border"],
.gsc-above-wrapper-area-container > div[style*="height: 1px"],
.gsc-above-wrapper-area-container > div[style*="height:1px"] {
    display: none !important;
    height: 0 !important;
    border: none !important;
}

/* Remove border from the results wrapper that creates the line */
.gsc-results-wrapper-overlay,
.gsc-results-wrapper-visible {
    border-top: none !important;
}

/* Remove border from element after above-wrapper-area */
.gsc-above-wrapper-area ~ div,
.gsc-above-wrapper-area-container ~ div,
.gsc-above-wrapper-area + .gsc-results,
.gsc-above-wrapper-area-container + .gsc-results {
    border-top: none !important;
    border: none !important;
}

/* Target the specific table structure */
.gsc-above-wrapper-area-container table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.gsc-above-wrapper-area-container table td {
    border: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* Remove any border from the wrapper that contains everything */
.gsc-control-wrapper-cse {
    border-top: none !important;
}

/* Remove border from results box */
.gsc-resultsbox-visible {
    border-top: none !important;
}

/* Remove all borders from Google CSE elements that might create lines */
.gsc-control-cse,
.gsc-control-wrapper-cse,
.gsc-results-wrapper-overlay,
.gsc-results-wrapper-visible,
.gsc-results,
.gsc-resultsbox-visible,
.gsc-above-wrapper-area,
.gsc-above-wrapper-area-container,
.gsc-above-wrapper-area ~ *,
.gsc-above-wrapper-area-container ~ * {
    border-top: 0 !important;
    border-top-width: 0 !important;
    border-top-style: none !important;
    border-top-color: transparent !important;
}

/* Specifically target any element that comes after above-wrapper-area */
.gsc-above-wrapper-area + div,
.gsc-above-wrapper-area-container + div,
.gsc-above-wrapper-area + table,
.gsc-above-wrapper-area-container + table {
    border-top: none !important;
    border-top-width: 0 !important;
}

/* Remove border from the first result */
.gsc-result:first-child {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 16px !important;
}

/* Remove all borders from table structure in above-wrapper-area */
.gsc-above-wrapper-area-container table,
.gsc-above-wrapper-area-container tbody,
.gsc-above-wrapper-area-container tr,
.gsc-above-wrapper-area-container td,
.gsc-above-wrapper-area-container th {
    border: none !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

/* Remove border from the results area that comes after */
.gsc-above-wrapper-area ~ .gsc-results,
.gsc-above-wrapper-area-container ~ .gsc-results,
.gsc-above-wrapper-area ~ div.gsc-results,
.gsc-above-wrapper-area-container ~ div.gsc-results {
    border-top: none !important;
    border: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Target the specific wrapper that contains the line */
.gsc-control-wrapper-cse > div:first-child,
.gsc-control-wrapper-cse > div:first-child > div {
    border-top: none !important;
}

/* Remove any border from results wrapper overlay */
.gsc-results-wrapper-overlay > div:first-child,
.gsc-results-wrapper-visible > div:first-child {
    border-top: none !important;
}

/* Remove border from .gsc-results specifically */
.gsc-results {
    border-top: none !important;
    border: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove border from any element that follows above-wrapper-area */
.gsc-above-wrapper-area ~ *,
.gsc-above-wrapper-area-container ~ * {
    border-top: 0 !important;
    border-top-width: 0 !important;
    border-top-style: none !important;
    border-top-color: transparent !important;
}

/* Target the specific div that contains results */
.gsc-results-wrapper-overlay > .gsc-results,
.gsc-results-wrapper-visible > .gsc-results {
    border-top: none !important;
}

/* Remove border from resultsbox */
.gsc-resultsbox-visible {
    border-top: 0 !important;
    border: none !important;
}

/* Remove any border from the wrapper div */
.gsc-control-wrapper-cse > div {
    border-top: none !important;
}

/* Very specific - remove border from element right after above-wrapper */
div.gsc-above-wrapper-area + div.gsc-results,
div.gsc-above-wrapper-area-container + div.gsc-results,
div.gsc-above-wrapper-area + table + div,
div.gsc-above-wrapper-area-container + table + div {
    border-top: none !important;
    border: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Sort options - HIDE COMPLETELY */
.gsc-orderby-label,
.gsc-orderby,
.gsc-orderby-container,
.gsc-orderby-label-container,
.gsc-selected-option-container,
div[class*="orderby"],
div[class*="OrderBy"],
td.gsc-orderby-container,
td[class*="orderby"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* Hide the table cell containing orderby */
.gsc-above-wrapper-area-container td.gsc-orderby-container,
.gsc-above-wrapper-area-container td.gsc-orderby-container {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Remove box styling from sort dropdown but keep text visible */
.gsc-orderby {
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 6px 28px 6px 10px !important;
    margin: 0 !important;
    color: white !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-align: right !important;
    min-width: 120px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
}

.gsc-orderby:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(217, 70, 239, 0.3) !important;
    outline: none !important;
    border-radius: 4px !important;
}

.gsc-orderby:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 0 0 2px rgba(217, 70, 239, 0.5) !important;
    outline: none !important;
    border-radius: 4px !important;
}

.gsc-orderby:active {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(0.98) !important;
}

/* Remove container/box around sort options */
.gsc-orderby-container,
.gsc-orderby-label-container,
.gsc-selected-option-container,
.gsc-result-info-container,
div[class*="orderby"],
div[class*="OrderBy"] {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Hide the "Sort by" label */
.gsc-orderby-label {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any wrapper divs with backgrounds */
.gsc-result-info,
.gsc-result-info * {
    background: transparent !important;
}

/* Style dropdown options - make them visible and styled */
.gsc-orderby option {
    background: rgba(30, 27, 75, 0.98) !important;
    color: white !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.gsc-orderby option:hover,
.gsc-orderby option:focus,
.gsc-orderby option:checked {
    background: rgba(217, 70, 239, 0.4) !important;
    color: white !important;
}

/* Style the dropdown when it's open */
.gsc-orderby:focus option:checked {
    background: rgba(217, 70, 239, 0.6) !important;
}

/* Ensure dropdown is visible and styled properly */
select.gsc-orderby {
    color: white !important;
    background-color: transparent !important;
}

select.gsc-orderby::-ms-expand {
    display: none !important;
}

/* Custom arrow indicator */
.gsc-orderby-container {
    position: relative !important;
    display: inline-block !important;
}

.gsc-orderby-container::after {
    content: '▼' !important;
    color: rgba(255, 255, 255, 0.9) !important;
    pointer-events: none !important;
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 10px !important;
    z-index: 1 !important;
    transition: color 0.2s ease !important;
}

.gsc-orderby-container:hover::after {
    color: white !important;
}

/* Style the dropdown list when open (for better visibility) */
.gsc-orderby:focus {
    background: rgba(30, 27, 75, 0.95) !important;
    border: 1px solid rgba(217, 70, 239, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

/* Additional styling to ensure dropdown is visible and styled */
.gsc-orderby,
select.gsc-orderby {
    color: white !important;
    background-color: transparent !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Ensure the select element itself is visible */
.gsc-orderby option {
    background-color: rgba(30, 27, 75, 0.98) !important;
    color: white !important;
    padding: 10px !important;
}

/* Style for when dropdown is active/open */
.gsc-orderby:active,
.gsc-orderby:focus {
    color: white !important;
    background-color: rgba(30, 27, 75, 0.95) !important;
}

/* Make sure the text inside is always white */
.gsc-orderby * {
    color: white !important;
    background-color: rgba(30, 27, 75, 0.98) !important;
}

/* Tab styling */
.gsc-tabHeader {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px 8px 0 0 !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.gsc-tabHeader.gsc-tabhActive {
    background: rgba(217, 70, 239, 0.2) !important;
    border-color: var(--brain-primary) !important;
    color: white !important;
}

/* Image results */
.gsc-imageResult {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
}

.gsc-imageResult:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--brain-primary) !important;
}

/* Web result box */
.gsc-webResult {
    width: 100% !important;
}

/* Ensure search container takes full width */
.search-container .gsc-control-cse {
    width: 100% !important;
}

.search-container .gsc-results-wrapper-overlay {
    width: 100% !important;
    max-width: 100% !important;
}

/* Results container spacing */
.results-container {
    min-height: 400px;
    padding-bottom: 6rem !important;
    margin-bottom: 6rem !important;
}

/* Ensure results don't overlap footer */
.gsc-results-wrapper-overlay,
.gsc-results-wrapper-visible,
.gsc-results,
.gsc-control-cse {
    margin-bottom: 6rem !important;
    padding-bottom: 4rem !important;
}

/* Fix footer positioning */
footer {
    clear: both;
    position: relative;
    z-index: 10;
    margin-top: 4rem !important;
}

/* Ensure last result has spacing */
.gsc-result:last-child {
    margin-bottom: 4rem !important;
}

/* ================================
   Feature Cards
   ================================ */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

/* ================================
   FAQ Accordion
   ================================ */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    background: rgba(255, 255, 255, 0.05);
}

details[open] > div {
    animation: fadeIn 0.3s ease-out;
}

/* ================================
   Scrollbar Styling
   ================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--brain-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a21caf;
}

/* ================================
   Focus States (Accessibility)
   ================================ */
a:focus,
button:focus,
input:focus,
summary:focus {
    outline: 2px solid var(--brain-primary);
    outline-offset: 2px;
}

/* ================================
   Responsive Adjustments
   ================================ */
@media (max-width: 640px) {
    .search-container {
        padding: 16px;
    }
    
    .gsc-input-box {
        padding: 6px 12px !important;
    }
    
    .gsc-search-button-v2 {
        padding: 10px 16px !important;
    }
}

/* ================================
   Print Styles
   ================================ */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .search-container,
    footer,
    .feature-card {
        display: none !important;
    }
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   Dark Mode Enhancements
   ================================ */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but ensure consistency */
    body {
        color-scheme: dark;
    }
}

/* ================================
   Loading State
   ================================ */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ================================
   Utility Classes
   ================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    box-shadow: var(--shadow-glow);
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
