/* =================================
   CSS VARIABLES - EASY THEMING
   ================================= */
:root {
    /* Primary Colors */
    --primary-color: #ff4500;
    --secondary-color: #0079d3;

    /* Background Colors */
    --background-color: #f6f6fbf8;
    --card-color: #f9fafe;
    --card-color-b: #f5f5fa;
    --input-bg: #eeedf3;
    --comments-bg: #f1f1f6;
    --suggestions-bg: #f2f1f7;

    /* Text Colors */
    --text-color: #1a1a1b;
    --text-primary: #15121c;
    --text-secondary: #29213b;
    --light-text: #787c7e;
    --meta-text: #606065;
    --placeholder-bg: #f1f1f6;

    /* footie */
    --footie-color: #a1a1a1;

    /* Border & Shadow */
    --border-color: rgba(221, 221, 229, 1);
    --border-dark: #6b6b6b;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-card: rgba(0, 0, 0, 0.25);
    --inset-shadow: #a0a5a7;

    /* Interactive Elements */
    --hover-bg: #dfdfe9;
    --hover-bg-lite: rgb(231, 233, 238);
    --button-bg: #ececf5;
    --disabled-opacity: 0.5;

    /* Dimensions */
    --card-radius: 9px;
    --input-radius: 6px;
    --container-max-width: 1200px;
    --image-width: 160px;
    --image-height: 130px;
}

/* Dark Mode Variables */
body.dark-mode {
    --background-color: #151416;
    --card-color: #202022;
    --input-bg: #1c1c1f;
    --comments-bg: #2e2e32;
    --suggestions-bg: #232326;

    --text-color: #f5f5f5;
    --text-primary: #ffffff;
    --text-secondary: #dadada;
    --light-text: #787c7e;
    --meta-text: #8a8a91;
    --placeholder-bg: #2e2e32;
    --darkborder: #3a3a44;

    /* footie */
    --footie-color: #636363;

    --border-color: #333337;
    --border-dark: #787b82;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --hover-bg: #36363a;
    --button-bg: #29292d;

/* Dark mode options-group styles*/
    --form-bg: #2e2e32;
    --form-text: white;
    --form-border: #444;
        
}

/* =================================
   BASE STYLES
   ================================= */
html {
    font-size: 90%;
    overflow-y: scroll;
}

body.bluebird-theme html {
    background: linear-gradient(to bottom, #000000, #000000);
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    opacity: 0;
}

body.is-loaded {
    opacity: 1;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 70px;
}

/* =================================
   HEADER & LOGO
   ================================= */
header {
    text-align: center;
    margin-bottom: 22px;
    position: relative;
    line-height: 1;
}

.logo {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo:focus-visible{
    border-color: var(--secondary-color);
}

.logo a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
}

header a,
.logo a {
    outline: none !important;
    text-decoration: none !important;
    border: none !important;
}

.logo h1 {
    margin: 25px 0 11px;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.tagline {
    font-size: 1.1rem;
    color: var(--light-text);
    text-align: center;
    margin: 20px 0 10px;
}

body.forest-theme .tagline {
    color: rgb(202, 248, 241);
}

.hermes-cat {
    position: absolute;
    transform: translate(110px, -135px);
    width: 105px;
    height: 105px;
    cursor: pointer;
}

/* =================================
   SEARCH CONTAINER & COMPONENTS
   ================================= */
.search-container {
    position: relative;
    display: flex;
    height: 150px;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 21px;
    background-color: var(--card-color);
    padding: 25px;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease-in-out;
    border-style: solid;
    border-width: 1.5px;
    border-color: var(--inset-shadow);
    box-shadow: inset 0 0 1px var(--inset-shadow);
}

body.dark-mode .search-container {
    box-shadow: inset 0 0 1px var(--darkborder);
    border-color: var(--border-color);
}

.search-top-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0 auto 16px auto;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto 16px;
}

.search-input-container {
    display: flex;
    width: 70%;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 18px 0 0 18px;
    background-color: var(--input-bg);
    display: flex;
    align-items: center;
}

body.dark-mode .search-input {
    color: var(--text-color);
}

body.dark-mode .search-input-container {
    border: 1px solid #424242;
    background-color: #1c1c1f;
}

.search-input {
    flex-grow: 0.89;
    font-size: 1.1rem;
    font-weight: 400;
    font-family: Segoe UI;
    outline: none;
    background: transparent !important;
    border: none !important;
    padding: 0;
    color: var(--text-color);
}

.search-input-container {
    cursor: text;
}

/* Keep the normal cursor for buttons/icons inside */
.search-button,
#filter-icon,
#comfy-toggle,
#compact-toggle {
    cursor: pointer;
}

.search-input:focus {
    border-color: var(--secondary-color);
}

.search-button {
    position: absolute;
    background: url('../assets/search-default.png');
    height: 75px;
    width: 150px;
    transform: translateY(-14px) translateX(342px);
    border: none;
    z-index: 1001;
    background-size: cover;
    cursor: pointer;
    transition: background-color 0.2s;
    filter: brightness(1.1) hue-rotate(-6deg) saturate(1.6);
}

body.forest-theme .search-button {
    filter: brightness(1) hue-rotate(-13deg) saturate(1.2);
}
body.forest-theme .search-button:hover {
    filter: brightness(1.1) hue-rotate(-15deg) saturate(1.2);
}
body.forest-theme .search-button.pressed {
    filter: brightness(1.1) hue-rotate(-15deg) saturate(1.2);
}
body.forest-theme #comfy-toggle {
    filter: brightness(1) hue-rotate(-13deg) saturate(1.2);
}
body.forest-theme #comfy-toggle:hover {
    filter: brightness(1.1) hue-rotate(-15deg) saturate(1.2);
}
body.forest-theme #comfy-toggle.pressed {
    filter: brightness(1.1) hue-rotate(-15deg) saturate(1.2);
}
body.forest-theme #compact-toggle {
    filter: brightness(1) hue-rotate(-13deg) saturate(1.2);
}

body.forest-theme #compact-toggle:hover {
    filter: brightness(1.1) hue-rotate(-15deg) saturate(1.2);
}

body.forest-theme #compact-toggle.pressed {
    filter: brightness(1.1) hue-rotate(-15deg) saturate(1.2);
}

.search-button.pressed {
    background-image: url('../assets/search-pressed.png');
    filter: brightness(1.1) hue-rotate(-6deg) saturate(1.6);
}

.search-button:hover {
    filter: brightness(1.3);
}

body.dark-mode .search-button,
body.dark-mode #comfy-toggle,
body.dark-mode #compact-toggle,
body.dark-mode .search-button.pressed {
    filter: brightness(1.05) contrast(1.05);
}

body.dark-mode .search-button:hover {
    filter: brightness(1.1) contrast(1.1);
}

body.dark-mode #comfy-toggle:hover,
body.dark-mode #compact-toggle:hover {
    filter: brightness(1.05) contrast(1.05);

}

/* =================================
   ADVANCED OPTIONS & TOGGLES
   ================================= */
.advanced-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    transition: all 0.15s ease-in-out;
    line-height: 1;
}

.option-group {
    flex: 0 0 auto;
    min-width: 150px;
    margin-right: 10px;
    background-color: var(--card-color);
    color: var(--text-color);
    transition: all 0.15s ease-in-out;
}

.option-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.option-group select {
    background-color: var(--input-bg);
    color: var(--text-color);
    width: 196px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    transition: all 0.15s ease-in-out;
}

.dark-mode .option-group select {
    background-color: var(--form-bg);
    color: var(--form-text);
    border: 1px solid var(--form-border);
}

#subreddit-input {
    width: 200px;
    font-family: 'Segoe UI';
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 14px;
    padding: 0.5rem;
    transition: all 0.15s ease-in-out;
}

body.dark-mode #subreddit-input {
    color: var(--text-color);
    border-color: var(--border-dark);
}

#time-select,
#sort-select,
#safesearch-select {
    max-width: 165px;
}

/* Toggle Switches */
.toggle-group {
    position: absolute;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}

.toggle-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
}

.toggle-wrapper:nth-child(2) .toggle-label {
    margin-left: 22px;
}

.switch {
    position: relative;
    display: inline-block;
    margin-left: 18px;
    top: 5px;
    width: 66px;
    height: 34px;
    scale: 75%;
}

.switch input {
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #eff1f6;
    border-radius: 34px;
}
.slider:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px !important;
}

.slider:before {
    position: absolute;
    content: "";
    height: 28px;
    width: 28px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:checked+.slider {
    background: linear-gradient(to right, rgb(255, 166, 0), var(--primary-color));
}

input:checked+.slider:before {
    transform: translateX(29px);
}

.toggle-label {
    position: absolute;
    left: calc(50% + 40px);
    color: var(--text-color);
    font-weight: 600;
    margin-top: 8px;
    font-size: 13px;
    white-space: nowrap;
}

/* =================================
   SUGGESTIONS & DROPDOWNS
   ================================= */
.suggestion-item {
    display: flex;
    align-items: center;
}

#suggestions {
    position: absolute;
    font-size: 1.1rem;
    font-weight: 400;
    font-family: Segoe UI;
    width: 770px;
    top: 70px;
    left: 230px;
    right: 0;
    color: var(--text-color);
    background-color: var(--suggestions-bg);
    border: 1px solid #999;
    border-radius: 8px;
    max-height: 340px;
    overflow-y: auto;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: none;
}

#suggestions div {
    padding: 10px;
    cursor: pointer;
    box-shadow: inset 0 0 1px var(--border-color);
    width: 750px;
    height: 33px;
}

body.forest-theme #suggestions div {
    color: white;
}

#suggestions div:hover,
#suggestions div.highlighted {
    background-color: var(--hover-bg-lite);
}

#suggestions div:last-child {
    border-bottom: none;
}

body.dark-mode #suggestions div:hover,
body.dark-mode #suggestions div.highlighted {
    background: #36363a;
}

body.dark-mode #suggestions div {
    box-shadow: inset 0 0 1px #35353e;
}

body.dark-mode #suggestions {
    background-color: #232326;
    color: #ffffff;
    box-shadow: inset 0 0 1px #35353e;
    border-color: #2c2c34;
    border: 1px solid #59595d;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-favicon {
    width: 40px;
    height: 40px;
    margin-right: 8px;
    cursor: pointer;
}

#suggestions .suggestion-icon .subreddit-icon-img {
    width: 30px !important;
    height: 30px !important;
}

span.suggestion-icon.subreddit-icon {
    width: 30px !important;
    height: 30px !important;
    margin-right: 13px;
    margin-left: 4px;
}

.search-trends-btn {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin-left: 19px;
}

.search-trends-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Subreddit Suggestions */
.subreddit-suggestions {
    position: absolute;
    width: 216px;
    background-color: var(--card-color);
    border: 1px solid #999;
    border-radius: var(--input-radius);
    box-shadow: 0 2px 8px var(--shadow-light);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    scrollbar-width: none;
    transition: all 0.15s ease-in-out;
}

.subreddit-suggestions.active {
    display: block;
}

.subreddit-suggestion {
    padding: 8px 12px;
    background-color: var(--suggestions-bg);
    box-shadow: inset 0 0 1px var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

body.forest-theme .subreddit-suggestion {
    color: white;    
}

.subreddit-suggestions .custom-spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    background-color: var(--suggestions-bg);
}

body.dark-mode .subreddit-suggestion {
    box-shadow: inset 0 0 1px var(--darkborder);  
    background-color: var(--card-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .subreddit-suggestion:hover {
    background-color: var(--hover-bg);
}

body.dark-mode .subreddit-suggestion.highlighted {
    background: var(--hover-bg);
}

.subreddit-suggestion.highlighted {
    background: var(--hover-bg-lite);
}
.subreddit-suggestion:hover {
    background-color: var(--hover-bg-lite);
}

body {
    background-image: var(--bg-image, none);
    background-size: var(--bg-size, initial);
    background-position: var(--bg-position, initial);
    background-repeat: var(--bg-repeat, initial);
    background-attachment: var(--bg-attachment, initial);
}

/* =================================
   SUBREDDIT ICONS & NAVIGATION
   ================================= */
.subreddit-bar {
    padding: 3px 5px;
    font: 10px 'Segoe UI';
    white-space: nowrap;
    overflow-x: auto;
    text-align: center;
}

.subreddit-bar a {
    color: #74737d;
    text-decoration: none;
    margin-right: 8px;
    padding: 2px 4px;
    border-radius: 2px;
}

.subreddit-bar a:hover {
    filter: brightness(0.4);
}

.subreddit-bar a.home {
    color: var(--primary-color);
    font-weight: bold;
}

.subreddit-bar a.home:hover {
    color: #da3a00;
    filter: none;
}

body.dark-mode .subreddit-bar a {
    color: #707077;
}

body.dark-mode .subreddit-bar a.home {
    color: var(--primary-color);
}

body.dark-mode .subreddit-bar a:hover {
    filter: brightness(0.9);
}

.subreddit-icon {
    width: 20px;
    height: 20px;
    position: relative;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    min-height: 20px;
}

.subreddit-icon.icon-loaded {
    background-color: transparent;
}

.subreddit-icon img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.subreddit-icon-img {
    opacity: 0;
}

.subreddit-icon-img.fade-in {
    opacity: 1;
}

/* =================================
   RESULT CARDS & LAYOUT
   ================================= */
.results-container {
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 5px;
}

.result-card {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    padding: 9px 10px 11px;
    border-radius: var(--card-radius);
    background-color: var(--card-color);
    min-height: 145px;
    max-height: 145px;
    border: 1.5px solid var(--inset-shadow);
    box-shadow: inset 0 0 1px var(--inset-shadow);
    transform: translateY(6px);
    opacity: 0;
    transition: all 0.15s ease-in-out;
    z-index: 1;
}

body.bluebird-theme .result-card {
    background: var(--card-color);
}

body.dark-mode .result-card {
    box-shadow: inset 0 0 1px var(--darkborder);
    border-color: var(--border-color);
}

.result-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-card:hover {
    box-shadow: 0 3px 3px rgba(100, 100, 100, 0.1);
}

body.dark-mode .result-card:hover {
    box-shadow: 0 3px 5px #080808, inset 0 0 1px rgba(86, 86, 86, 0.4);
}

/* =================================
   RESULT CONTENT
   ================================= */
.content-section {
    flex-grow: 1;
    overflow: hidden;
    margin-left: 15px;
    margin-right: 0;
    color: var(--text-secondary);
    max-height: 135px;
    margin-bottom: 15px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.result-subreddit {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
}

body.forest-theme .result-subreddit {
    color: white;
}

.result-subreddit:hover {
    text-decoration: underline;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.result-author {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
    color: inherit;
    text-decoration: none;
}

.result-author:hover {
    text-decoration: underline;
}

.result-time {
    margin-left: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.result-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-title a {
    color: var(--text-color);
    text-decoration: none;
}

.result-title a:hover {
    color: var(--secondary-color);
    transition: color 0.12s;
}

.result-content {
    margin-bottom: 0;
    line-height: 1.5;
    max-height: 35px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    transform: translateY(-25%);
}

.result-content a {
    color: var(--secondary-color);
    word-break: break-word;
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-content a:hover {
    text-decoration: underline;
}

/* =================================
   IMAGES & MEDIA
   ================================= */
.img-container {
    margin-left: auto;
    position: relative;
    width: var(--image-width);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transform: translateY(-2px);
}

.img-container img {
    width: 100%;
    position: relative;
    border-radius: 4px;
    object-fit: cover;
}

.image-wrapper {
    position: relative;
    width: var(--image-width);
    height: var(--image-height);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    transform: translateY(1px);
}

.result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0;
    display: block;
    transition: opacity 0.3s ease;
}

.image-wrapper:focus-visible {
    outline: 4px solid var(--secondary-color);
    outline-offset: 0px;
}

.result-image.show {
    border-radius: var(--card-radius);
    cursor: pointer;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--comments-bg);
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease-out;
}

.image-placeholder.hide {
    opacity: 0;
}

.news-icon-fallback {
    width: var(--image-width);
    height: var(--image-height);
    background: var(--comments-bg) url('../assets/news-icon.png') no-repeat center;
    background-size: 112px 112px;
    border-radius: 8px;
    position: absolute;
    z-index: 40;
}

body.forest-theme .news-icon-fallback {
    width: var(--image-width);
    height: var(--image-height);
    background: var(--comments-bg) url('../assets/green-news-icon.png') no-repeat center;
    background-size: 112px 112px;
    border-radius: 8px;
    position: absolute;
    z-index: 40;
}

body.bluebird-theme .news-icon-fallback {
    width: var(--image-width);
    height: var(--image-height);
    background: var(--comments-bg) url('../assets/blue-news-icon.png') no-repeat center;
    background-size: 112px 112px;
    border-radius: 8px;
    position: absolute;
    z-index: 40;
}

body.dark-mode .news-icon-fallback {
    background-color: #64646e;
    filter: brightness(0.45);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    padding-left: 4px;
    padding-bottom: 0;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 42px;
    height: 41px;
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
    justify-content: center;
    color: white;
    font-size: 23px;
}

/* Shimmer Animation */
.shimmer::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            var(--border-color) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.25s infinite;
}

body.dark-mode .shimmer::before {
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 50%,
            transparent 100%);
}

@keyframes shimmer {
    100% {
        transform: translateX(300%);
    }
}

/* =================================
   COMMENTS SECTION
   ================================= */
.comments-section {
    width: 320px;
    font-size: small;
    flex-shrink: 0;
    height: 116px;
    overflow-y: hidden;
    background-color: var(--comments-bg);
    border-radius: 7px;
    padding: 8px;
    margin: -2px 25px 0 15px;
    transition: opacity 0.3s ease;
}

.comments-scroll {
    max-height: 114px;
    overflow-y: auto;
    padding: 8px;
    transform: translateY(-1px);
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    transition: scrollbar-color 0.3s ease;
    box-sizing: border-box;
}

.comments-scroll:hover {
    scrollbar-color: rgba(180, 180, 180, 0.5) transparent;
}

.comment {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .comment {
    border-bottom: 1px solid var(--darkborder);
}

.comment.visible {
    opacity: 1;
    transform: translateY(0);
}

.comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.comment-author a {
    text-decoration: none;
    color: var(--text-color);
}

body.forest-theme .comment-author a {
    color: white;
}

.comment-author-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--light-text);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    margin-right: 5px;
}

.comment-text {
    line-height: 1.3;
    word-break: break-word;
}

.comment-meta {
    display: flex;
    font-size: 10px;
    color: var(--light-text);
    margin-top: 2px;
    box-sizing: border-box;
}

.comment-score {
    margin-right: 6px;
}

.comment-time {
    margin-left: auto;
}

.no-comments {
    color: var(--meta-text);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    padding: 12px;
    transform: translateY(8px);
}

.loading-comments {
    color: var(--meta-text);
    width: 300px;
    max-width: 300px;
    font-size: small;
    flex-shrink: 0;
    max-height: 100px;
    height: 100px;
    overflow-y: hidden;
    background-color: var(--comments-bg);
    border-radius: 6px;
    padding: 8px;
    margin-right: 5px;
    margin-top: 20px;
    transition: opacity 0.3s ease;
}

.see-more-comments {
    text-align: center;
    padding-top: 5px;
    font-size: 11px;
    color: var(--secondary-color);
    cursor: pointer;
    font-weight: bold;
    box-sizing: border-box;
}

.see-more-comments:hover {
    text-decoration: underline;
}

.see-more-comments:focus-visible {
    text-decoration: underline;
}

/* =================================
   VOTING & ACTIONS
   ================================= */
.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.vote-button,
.vote-button-red {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.27s;
}

.vote-button:hover {
    color: var(--secondary-color);
}

.vote-button-red:hover {
    color: var(--primary-color);
}

.vote-count {
    font-weight: bold;
    margin: 5px 0;
}

.result-actions {
    display: flex;
    gap: 15px;
    color: var(--light-text);
    flex-shrink: 0;
    position: absolute;
    padding-top: 2px;
}

.result-action {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    position: relative;
}

.result-action:focus-visible {
    border-color: var(--secondary-color);
}

.result-action:hover {
    color: var(--footie-color);
}

body.dark-mode .result-actions,
body.dark-mode .result-action {
    color: rgb(214, 214, 214);
}

body.dark-mode .result-action:hover {
    color: white;
}

/* =================================
   BOOKMARKS
   ================================= */
.bookmark-container {
    position: absolute;
    left: -95px;
    top: 45%;
    cursor: pointer;
}

.bookmark-icon {
    width: 31px;
    height: 31px;
    background-color: #cfcfcf;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

body.forest-theme .bookmark-icon {
    background-color: var(--light-text);
}

body.bluebird-theme .bookmark-icon {
    background-color: rgb(176, 205, 245);
}

body.forest-theme .bookmark-icon.saved {
    background-color: #ffd75e;
    }

body.bluebird-theme .bookmark-icon.saved {
    background-color: #ffd75e;
}

.bookmark-icon.saved {
    background-color: #ffd75e;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

body.dark-mode .bookmark-icon {
    background-color: #2e2e2e;
}

body.dark-mode .bookmark-icon.saved {
    background-color: #f9ce4e;
}

body.dark-mode .bookmark-icon:focus-visible {
    background-color: #ffd75e;
}

.bookmark-icon:focus-visible {
    background-color: var(--secondary-color);
}

body.bluebird-theme .bookmark-icon:focus-visible {
    background-color: var(--secondary-color);
}

body.forest-theme .bookmark-icon:focus-visible {
    background-color: var(--secondary-color);
}

.bookmark-link {
    color: #f5c023;
    font-weight: bold;
    text-decoration: none;
    transform: translate(21px, 45px);
    display: inline-block;
    transition: filter 200ms linear;
}

.bookmark-link:hover {
    filter: brightness(0.9) hue-rotate(-3deg);
    transition: color 0.02s;
}

body.dark-mode .bookmark-link {
    color: #cc9b09;
}

body.dark-mode .bookmark-link:hover {
    filter: brightness(1.4) hue-rotate(-15deg);
}

.bookmark-tiny {
    height: 16px;
    width: 16px;
    transform: translate(-20px, 3px);
    display: inline-block;
    background-color: #f5c023;
    content: '';
    position: absolute;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    mask-size: auto;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-transition: -webkit-filter 200ms linear;
}

/* =================================
   PAGINATION & BUTTONS
   ================================= */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination-button {
    background-color: var(--card-color);
    border: 1.5px solid var(--inset-shadow);
    border-radius: 8px;
    padding: 12px 12px;
    min-width: 110px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    box-shadow: inset 0 0 1px var(--inset-shadow);
    transition: background-color 0.2s;
}

body.dark-mode .pagination-button {
    box-shadow: inset 0 0 1px var(--darkborder);
    border-color: var(--border-color);
}

.pagination-button:hover:not(:disabled) {
    background-color: var(--hover-bg-lite);
}

body.dark-mode .pagination-button:hover {
    background-color: #333;
}

.pagination-button:disabled {
    opacity: var(--disabled-opacity);
    cursor: not-allowed;
}

.github-button {
    background-color: var(--card-color);
    border: 1.5px solid var(--inset-shadow);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: inset 0 0 1px var(--inset-shadow);
    transition: background-color 0.2s;
    margin-bottom: 15px;
}

body.forest-theme .github-button {
    color: white;
}

body.dark-mode .github-button {
    color: var(--text-color);
    background-color: var(--card-color);
    box-shadow: inset 0 0 1px var(--darkborder);
    border-color: var(--border-color);
}

.github-button:hover {
    background-color: var(--hover-bg-lite);
}

.github-button svg {
    filter: invert(1);
    transform: translateY(6px) translateX(-6px);
}

body.dark-mode .github-button svg {
    filter: invert(0);
}

body.forest-theme .github-button svg {
    filter: invert(0);
    /* White SVG for forest theme */
}

body.dark-mode .github-button:hover {
    background-color: #333;
    transition: all 0.15s ease-in-out;
}

.donate-btn {
    display: block;
    position: absolute;
    margin-top: 32px;
    right: 70px;
    background-color: var(--primary-color);
    color: white;
    padding: 9px 12px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    z-index: 5;
    transition: background-color 0.2s;
}

.donate-btn:hover {
    filter: brightness(0.9);
    transition: color 0.12s;
}

/* =================================
   COMFY MODE
   ================================= */
body.comfy-mode .result-card {
    min-height: 290px;
}

body.comfy-mode .result-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.comfy-mode .img-container {
    width: 270px;
    height: auto;
    min-height: 270px;
    max-height: 270px;
    overflow: hidden;
    border-radius: 8px;
}

body.comfy-mode .img-container img {
    max-height: 270px;
    max-width: 270px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.15s ease-in-out;
}

body.comfy-mode .image-wrapper {
    height: auto;
    min-height: 150px;
    width: fit-content;
    margin: 0 auto;
    transition: all 0.15s ease-in-out;
}

body.comfy-mode .result-image {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
}

body.comfy-mode .result-content {
    line-height: 1.4;
    max-height: 85px;
    transform: translateY(-2%);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: ellipse;
    margin-bottom: 2px;
}

body.comfy-mode .content-section {
    line-height: 1.6;
    font-size: 1.05em;
    flex-grow: 1;
    max-height: 210px;
    margin-bottom: 5px;
}

body.comfy-mode .comments-section {
    width: 360px;
    font-size: small;
    flex-shrink: 0;
    max-height: 254px;
    height: 254px;
    overflow-y: hidden;
    border-radius: 7px;
    padding: 8px;
    margin-left: 15px;
    margin-right: 25px;
    transition: opacity 0.3s ease;
}

body.comfy-mode .comments-scroll {
    max-height: 255px;
    height: 255px;
    overflow-y: auto;
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    transition: scrollbar-color 0.3s ease;
    box-sizing: border-box;
}

body.comfy-mode .comments-scroll:hover {
    scrollbar-color: rgba(180, 180, 180, 0.5) transparent;
}

body.comfy-mode .no-comments {
    height: 160px;
    transform: translateY(28px);
}

body.comfy-mode .img-container .play-icon {
    width: 55px;
    height: 53px;
    font-size: 29px;
    padding-left: 5px;
    padding-top: 5px;
}

body.comfy-mode .news-icon-fallback {
    width: 269px;
    height: 269px;
    background-size: 180px 180px;
}

body.comfy-mode.bluebird-theme .news-icon-fallback {
    width: 269px;
    height: 269px;
    background-size: 180px 180px;
}

body.comfy-mode.forest-theme .news-icon-fallback {
    width: 269px;
    height: 269px;
    background-size: 180px 180px;
}

/* =================================
   TOGGLE BUTTONS
   ================================= */
#comfy-toggle,
#compact-toggle {
    background: none;
    position: absolute;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 111px;
    height: 43px;
    filter: brightness(1.1) hue-rotate(-6deg) saturate(1.6);
}

#comfy-toggle {
    top: 14px;
    right: 29px;
}

#compact-toggle {
    top: 45px;
    right: 29px;
}

#comfy-toggle img,
#compact-toggle img {
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
    transition: filter 0.1s ease-in-out;
}

#comfy-toggle:hover img,
#compact-toggle:hover img {
    filter: brightness(1.1) contrast(1.1);
}

body.dark-mode #comfy-toggle,
body.dark-mode #compact-toggle {
    filter: brightness(1.05) contrast(1.05);
}

body.dark-mode #comfy-toggle:hover,
body.dark-mode #compact-toggle:hover {
    filter: brightness(1.05) contrast(1.05);
}

#filter-icon {
    position: absolute;
    top: 35px;
    right: 152px;
    width: 25px;
    height: 25px;
    pointer-events: none;
    user-select: none;
    filter: brightness(0);
    z-index: 10;
}

body.forest-theme #filter-icon {
    filter: none;
}

body.dark-mode #filter-icon {
    filter: brightness(1.3);
}

.theme-toggle {
    position: fixed;
    top: 16px;
    left: 20px;
    width: 50px;
    height: 50px;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
}

.theme-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.3s ease;
}

/* =================================
   LINK PREVIEWS
   ================================= */
.link-preview-card {
    display: absolute;
    left: 326px;
    width: 308px;
    max-height: 19px;
    min-height: 19px;
    padding: 5px 8px 10px;
    transform: translateY(-3px);
    background-color: var(--comments-bg);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

body.comfy-mode .link-preview-card {
    width: 160px;
    z-index: 10;
}

.link-preview-container {
    display: flex;
    gap: 15px;
    transform: translateY(-2px);
    flex-shrink: 0;
    position: absolute;
    padding-top: 3px;
}

.link-domain {
    font-size: 13px;
    color: var(--border-dark);
    font-weight: 500;
}

body.dark-mode .link-domain {
    color: var(--border-dark);
}

.link-preview-btn {
    position: absolute;
    padding: 3px 9px 5px;
    margin-left: 254px;
    top: 1px;
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--border-dark);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

body.bluebird-theme .link-domain {
    color: var(--border-dark);
}

body.bluebird-theme .link-preview-btn {
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
}

body.bluebird-theme .link-preview-btn:hover {
    background-color: var(--hover-bg);
}

body.comfy-mode .link-preview-btn {
    margin-left: 106px;
}

body.dark-mode .link-preview-btn:hover {
    background-color: var(--hover-bg);
}

.link-preview-btn:hover {
    background-color: var(--hover-bg);
}

body.dark-mode .link-preview-btn {
    background-color: var(--button-bg);
    border-color: var(--darkborder);
    color: var(--light-text);
}

/* =================================
   HERMES FEATURES
   ================================= */
@font-face {
    font-family: 'Special Elite';
    src: url('../assets/SpecialElite.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.speech-bubble {
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    position: absolute;
    background: rgb(244, 239, 236);
    border: 2px solid #333;
    border-radius: 6px;
    padding: 8px 12px;
    max-width: 150px;
    font: bold 14px 'Special Elite', monospace;
    transform: translateY(-20px);
    box-shadow: 0 2px 4px rgba(49, 49, 49, 0.2);
    z-index: 2000;
    top: 0;
    left: 820px;
    color: #333;
}

.speech-text {
    font-family: 'Special Elite', monospace;
    padding-top: 2px;
    z-index: 3;
    position: relative;
}

.speech-tail {
    position: absolute;
    top: 50%;
    left: -18px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
}

.speech-tail-outline {
    border-top: 8.5px solid transparent;
    border-bottom: 8.5px solid transparent;
    border-right: 18px solid #333;
    z-index: 1;
    position: absolute;
}

.speech-tail-inner {
    top: 50%;
    left: -14px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 15px solid rgb(244, 239, 236);
    z-index: 2;
    position: absolute;
}

.hermes-context-menu {
    position: absolute;
    background: var(--card-color);
    border: 1px solid #999;
    border-radius: 8px;
    padding: 0;
    min-width: 160px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    line-height: 1.6;
    transition: all 0.1s ease;
}

body.dark-mode .hermes-context-menu {
    background: var(--suggestions-bg);
    border: 1px solid #8f8f8f;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hermes-context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font: 14px 'Segoe UI';
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 0 1px var(--border-color);
    border-radius: 8px;
    left: 0;
    margin-left: 0;
}

body.forest-theme .hermes-context-menu-item {
    color: white;
}
body.dark-mode .hermes-context-menu-item {
    box-shadow: inset 0 0 1px #35353e;
    color: #fff;
}

.hermes-context-menu-item:hover {
    background: var(--hover-bg-lite);
}

body.dark-mode .hermes-context-menu-item:hover {
    background-color: #3c3c43;
}

/* =================================
   UTILITY CLASSES
   ================================= */
.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-text);
}

.error-card {
    padding: 20px;
    border-radius: 4px;
    background-color: var(--card-color);
    color: var(--text-color);
}

.results-error {
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 15px;
    background-color: var(--card-color);
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    border-style: solid;
    border-width: 1.5px;
    border-color: var(--inset-shadow);
    box-shadow: inset 0 0 1px var(--inset-shadow);
    transform: translateY(6px);
    opacity: 0;
    transition: all 0.15s ease-in-out;
    z-index: 15;
}

.results-error.visible {
    opacity: 1;
    transform: translateY(0);
}

.footie {
    color: var(--footie-color);
    display: inline-block;
}

.footie a {
  color: inherit;
  text-decoration: none;
}

body.dark-mode .footie {
    color: var(--footie-color);
}

.footie:hover {
    text-decoration: underline;
    cursor: pointer;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 768px) {
    .advanced-options {
        flex-direction: column;
    }

    .result-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 15px;
        position: relative;
    }

    .vote-section {
        flex-shrink: 0;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
}

/* =================================
   SAFE SEARCH & CONTENT FILTERS
   ================================= */
body.safe-search-enabled .nsfw .image-wrapper img,
body.safe-search-enabled .nsfw .image-wrapper video,
body.safe-search-enabled .nsfw .image-wrapper .thumbnail {
    filter: blur(12px);
    pointer-events: none;
    transition: filter 0.2s ease;
}

/* =================================
   MISCELLANEOUS
   ================================= */
.search-trends-btn {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin-left: 19px;
}

.search-icon {
    position: absolute;
    color: #999;
    left: 246px;
    top: 38px;
    margin-right: 2px;
}

body.bluebird-theme .search-icon {
    position: absolute;
    color: #5898e1;
    left: 246px;
    top: 38px;
    margin-right: 2px;
}

body.forest-theme .search-icon {
    position: absolute;
    color: #609182;
    left: 246px;
    top: 38px;
    margin-right: 2px;
}

.search-trends-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: center;
    transform: translateY(-1px);
}

.suggestion-subreddit {
    font-size: 12px;
    color: var(--meta-text);
    padding-top: 1px;
    margin-left: 6px;
}

.lock-icon {
    z-index: 20;
    width: 14px;
    height: 14px;
    background: url('../assets/lock icon.png') no-repeat;
    transform: translateX(4px);
    background-size: cover;
    filter: brightness(1.4);
}

body.bluebird-theme .lock-icon {
    z-index: 20;
    width: 14px;
    height: 14px;
    background: url('../assets/blue lock icon.png') no-repeat;
    transform: translateX(4px);
    background-size: cover;
    filter: brightness(1.4);
}

body.forest-theme .lock-icon {
    z-index: 20;
    width: 14px;
    height: 14px;
    background: url('../assets/green lock icon.png') no-repeat;
    transform: translateX(4px);
    background-size: cover;
    filter: none;
}

body.dark-mode .lock-icon {
    filter: brightness(0.8);
}

.pushpin-icon {
    background: url('../assets/PUSHPIN.png') no-repeat;
    z-index: 20;
    width: 24px;
    height: 23px;
    transform: translate(3px, -7px);
    background-size: cover;
}

.checkmark {
    color: #007bff;
    font-weight: bold;
    margin: 0 5px;
}

.bell,
.bell-unmute {
    width: 20px;
    height: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1050;
}

.bell {
    background-image: url('../assets/bell.png');
}

.bell-unmute {
    background-image: url('../assets/bell_unmute.png');
}

/* =================================
   QUOTES & TEXT FORMATTING
   ================================= */
.comment-body .quote,
.el-quote {
    color: #989898;
    border-left: 4px solid #bbbbbb;
    padding-left: 12px;
    margin-left: 6px;
    margin-bottom: 0px;
    margin-top: 6px;
    font-size: 1em;
}

body.bluebird-theme .el-quote {
    color: rgb(103, 148, 210);
    border-left: 4px solid rgb(126, 170, 232);
    padding-left: 12px;
    margin: 8px 0;
    font-size: 1em;
}

body.forest-theme .el-quote {
    color: rgb(66, 132, 102);
    border-left: 4px solid rgb(54, 109, 84);
    padding-left: 12px;
    margin: 8px 0;
    font-size: 1em;
}

body.dark-mode .comment-body .quote,
body.dark-mode .el-quote {
    color: #999;
    border-left: 5px solid #555;
}

.comment-body a {
    color: var(--secondary-color);
    word-break: break-word;
    transition: color 0.2s ease;
    text-decoration: none;
}

.comment-body a:hover {
    text-decoration: underline;
}

.comment-body img {
    max-width: 150px;
    width: 150px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    overflow: visible;
    transition: transform 0.15s ease;
}

/* Comment body headers */
.comment-body h1,
.comment-body h2,
.comment-body h3,
.comment-body h4,
.comment-body h5,
.comment-body h6 {
    font-weight: bold;
    margin: 0.5em 0;
    line-height: 1.2;
}

.comment-body h1 {
    font-size: 1.5em;
}

.comment-body h2 {
    font-size: 1.3em;
}

.comment-body h3 {
    font-size: 1.1em;
}

.comment-body h4 {
    font-size: 0.9em;
}

.comment-body h5 {
    font-size: 0.8em;
}

.comment-body h6 {
    font-size: 0.7em;
}

.result-content h1 {
    font-size: 1.1em;
}

.result-content h2 {
    font-size: 0.9em;
}

.result-content h3 {
    font-size: 0.7em;
}

.result-content h4 {
    font-size: 0.5em;
}

.result-content h5 {
    font-size: 0.4em;
}

.result-content h6 {
    font-size: 0.3em;
}

/* =================================
   VIDEO PLAYER CUSTOMIZATION
   ================================= */
.plyr__controls .plyr__progress {
    flex: 1.2 1 auto !important;
    margin: 0 8px !important;
    max-width: none !important;
}

.plyr__volume {
    flex-shrink: 0 !important;
}

.plyr__volume input[type="range"] {
    width: 40px !important;
}

.plyr__controls__item:last-child {
    margin-left: 5px !important;
}

/* =================================
   FOOTER
   ================================= */
footer {
    margin-top: 0;
    text-align: center;
    padding: 20px;
    color: var(--light-text);
    font-size: 0.9rem;
}

.theme-toggle-container {
    position: absolute;
    top: 21px;
    left: 80px;
    z-index: 9999;
    display: none;
}

.theme-toggle-container.visible {
    display: block;
}

.theme-arrow {
    background: var(--card-color);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    width: 50px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
}

.theme-arrow:hover {
    background-color: var(--hover-bg-lite);
}

.theme-dropdown {
    position: absolute;
    top: 60px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 5px 20px var(--shadow-light);
    min-width: 150px;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.theme-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.theme-option {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    gap: 10px;
    border-radius: 8px;
    box-shadow: inset 0 0 1px var(--border-color);
}

.theme-option.active {
    background: var(--hover-bg-lite);
    border-radius: 8px;
}

.theme-option.active:hover {
    background: var(--hover-bg-lite);
    border-radius: 8px;
}

.theme-option:hover {
    background: var(--hover-bg-lite);
}

body.dark-mode .theme-option:hover,
body.dark-mode .theme-option.active,
body.dark-mode .plan-display-container:hover,
body.dark-mode .theme-arrow:hover,
body.dark-mode .theme-option.active:hover {
    background: var(--hover-bg);
}

.theme-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.filter-chip-container {
    display: none;
    align-items: center;
    background-color: var(--input-bg);
    border-radius: 16px;
    padding: 3px 10px;
    gap: 5px;
    margin-top: 5px;
}

body.dark-mode .filter-chip-container {
    background-color: var(--border-color);
}

.filter-chip-container .chip-text {
    font-size: 0.9rem;
}

.filter-chip-container .remove-chip {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--light-text);
    color: white;
    font-size: 10px;
    line-height: 1;
}

/* LOG IN LINK */

.login-link {
    font-family: Segoe UI;
    font-weight: 600;
    cursor: pointer;
    background: var(--card-color);
    color: var(--light-text);
    text-decoration: none;
    padding: 6px 15px 8px 9px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-bottom: 15px;

    background: var(--card-color);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    min-width: 92px;
    height: 36px;
    cursor: pointer;
}

body.dark-mode .login-icon-image {
    filter: none;
}

body.forest-theme .login-icon-image {
    filter: brightness(1);
    background-image: url('../assets/greenhead.png');
}

body.bluebird-theme .login-icon-image {
    filter: brightness(1.4);
    background-image: url('../assets/bluehead.png');
}

.login-icon-image {
    filter: brightness(2); 
    background-image: url('../assets/head.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.header-bar {
    display: flex;
    align-items: center;
    /* keeps everything vertically centered */
    justify-content: space-between;
    /* spread items: bookmarks left, search middle, login right */
    padding: 0 20px;
    /* optional padding */
    gap: 1rem;
    /* optional gap between items */
}

.login-link:hover {
    background-color: var(--hover-bg-lite);
}

body.dark-mode .login-link:hover {
    background-color: var(--hover-bg);
}

.plan-display-container {
    position: absolute;
    top: 21px;
    left: 140px;
    z-index: 9999;
    background: var(--card-color);
    border: 2px solid var(--border-color);
    border-radius: 15px;

    max-width: 135px;
    height: 36px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.plan-display-container.visible {
    display: flex;
}

.plan-display.plan-premium {
    color: var(--light-text);
    font-size: 10px;
    text-align: center;
    font-weight: bold;
    width: 135px;
}

.plan-display.plan-pro {
    color: var(--light-text);
    font-size: 10px;
    text-align: center;
    font-weight: bold;
    width: 115px;
}

.plan-display-container:hover {
    background-color: var(--hover-bg-lite);
}


/* Or if you want a more custom disabled look */
select:disabled {
    color: #dcae3b;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    padding: 7.5px 12px;
}
body.dark-mode select:disabled {
    color: #dcae3b;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    padding: 7.5px 12px;
}

.subreddit-section-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 400;
    color: var(--light-text);
    text-transform: uppercase;
    background-color: var(--suggestions-bg);
}

.delete-recent-btn {
    position: absolute;
    right: 10px;
    font-weight: 100;
    font-size: 22px;
    cursor: pointer;
    color: var(--light-text);
    opacity: 0;
}

.subreddit-suggestion:hover .delete-recent-btn {
    opacity: 1;
}

.get-premium-container {
   position: absolute;
   top: 22px;
   left: 80px;
   z-index: 9999;
   background: var(--card-color);
   border: 2px solid var(--border-color);
   border-radius: 15px;
   max-width: 117px;
   height: 36px;
   font-size: 12px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   padding-left: 3px;
}
.get-premium-container.visible {
   display: flex;
}
.get-premium-text {
   color: var(--light-text);
   font-size: 12px;
   text-align: center;
   font-weight: bold;
   width: 135px;
}
.get-premium-container:hover {
   background-color: var(--hover-bg-lite);
}

body.dark-mode .get-premium-container:hover {
    background-color: var(--hover-bg);
}

.gallery-container {
    width: 400px;
    /* adjust to your image size */
    height: 300px;
    overflow: hidden;
    position: relative;
}

.gallery-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

/* Normal mode arrows */
.gallery-arrow {
    width: 24px;
    height: 24px;
}

/* Comfy mode - bigger arrows */
body.comfy-mode .gallery-arrow {
    width: 32px !important;
    height: 32px !important;
}

body.comfy-mode .gallery-arrow svg {
    width: 19px;
    height: 19px;
}

body.comfy-mode .gallery-counter {
    font-size: 12px !important;
    padding: 4px 9px !important;
}

.swal2-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    border-radius: 10px;
    background-color: var(--card-color);
    color: var(--text-color);
    --swal2-action-button-focus-box-shadow: none !important;
    z-index: 2000;
}

.swal2-confirm {
    background-color: #3b82f6;
    border-radius: 6px;
    transition: filter 0.15s ease-in-out;
    font-family: 'Segoe UI';
    font-weight: 600;
}

.swal2-cancel {
    border-radius: 6px;
    transition: filter 0.15s ease-in-out;
    font-family: 'Segoe UI';
    font-weight: 600;
}

body.dark-mode .swal2-confirm {
    background-color: #006ec3;
}

.swal2-confirm:hover {
    background-color: #006ec3;
}

body.dark-mode .swal2-confirm:hover {
    background-color: #0062ac;
}

body.dark-mode .swal2-popup {
    background-color: var(--card-color);
    color: var(--text-color);
    --swal2-action-button-focus-box-shadow: none;
}

.swal2-input {
    border-radius: 16px;
    padding: 12px 20px;
    flex-grow: 0.89;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-color) !important;
    font-family: 'Segoe UI';
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    box-shadow: none;
}

.swal2-title {
    font-size: 1.6rem;
}
div:where(.swal2-container).swal2-backdrop-show {
    z-index: 10000;
}

body.dark-mode .swal2-input {
    border: 1px solid #424242;
    background-color: #1c1c1f;
}

div:where(.swal2-container) input:where(.swal2-input)::placeholder,
div:where(.swal2-container) input:where(.swal2-file)::placeholder,
div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder {
    color: var(--text-color);
}

body.swal2-shown {
    padding-right: 0 !important;
    overflow: auto !important;
}

.swal2-container {
    padding: 0 !important;
}

.subreddit-suggestion-err {
    color: var(--text-color);
    padding: 8px 12px;
    background-color: var(--suggestions-bg);
    box-shadow: inset 0 0 1px var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.vector-scroll-loader {
    position: absolute;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background-color: var(--card-color);
    border-color: rgba(0, 0, 0, 0.25);
    border-style: solid;
    box-shadow: inset 0 0 1.5px rgba(86, 86, 86, 0.4);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-width: 1.5px;
}

body.dark-mode .vector-scroll-loader {
    background-color: #202022;
    box-shadow: inset 0 0 1px #35353e;
    border-color: #35353e;

}

div:where(.swal2-container) input:where(.swal2-input)::placeholder,
div:where(.swal2-container) input:where(.swal2-file)::placeholder,
div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder {
    color: var(--text-color);
}

.reddit-import-container {
    text-align: left;
    margin: 20px 0;
}

.reddit-import-info {
    margin-bottom: 20px;
}

.reddit-import-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#sectionSelect {
    background-color: var(--input-bg);
    color: var(--text-color);
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    transition: all 0.15s ease-in-out;
}

.dark-mode #sectionSelect {
    background-color: var(--form-bg);
    color: var(--form-text);
    border: 1px solid var(--form-border);
}
