.announcement-banner {
    display: none;
    margin: 0 20px;
    margin-top: 20px;
    background: linear-gradient(135deg,
                var(--bright-red) 0%,
                #b30000 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 15px;
    position: relative;
}

.banner-icon {
    font-size: 1.2rem;
}

.announcement-banner p {
    margin: 0;
    flex-grow: 1;
    font-family: var(--comic-font);
    font-size: 1.1rem;
    line-height: 1.4;
    color: #ffffff;
    padding-right: 30px;
}

.announcement-banner strong {
    color: #ffcccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.banner-close:hover {
    background: var(--bright-red);
    transform: translateY(-50%) scale(1.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* STATS WIDGETS */
.stats-container {
    display: inline-flex;
    gap: 10px;
    margin: 20px 0;
    text-decoration: none;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #3E1F16 0%, #211510 100%);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.2),
        0 8px 15px rgba(0, 0, 0, 0.2);
}

.stat-badge:active {
    transform: scale(0.95) !important;
}

.stat-label {
    font-family: var(--comic-font);
    padding: 8px 15px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-family: var(--comic-font);
    background: var(--accent-color);
    color: var(--brown);
    padding: 8px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#grem {
    display: block;
    width: auto;
    height: 24px;
}

#cece-badge {
    overflow: visible !important;
}

/* Match the specific green/gold theme for the value while keeping the badge shape */
#cece-count {
    background: #54bd03;
    color: gold;
    /* Keeps the pill shape consistent */
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
}

/* The floating heart animation */
#cece-badge:hover::after {
    content: '❤️';
    position: absolute;
    top: -10px;
    /* Start slightly above */
    right: 20px;
    font-size: 1.2rem;
    pointer-events: none;
    animation: floatHeart 1.2s ease-out forwards;
}

@keyframes floatHeart {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-40px) scale(1.5);
        opacity: 0;
    }
}

/* SEARCH TIPS CONTAINER */
.search-guide {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 20px;
    font-family: var(--comic-font);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-guide h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.guide-item {
    display: flex;
    flex-direction: column;
}

.guide-item strong {
    font-size: 0.9rem;
    color: #555;
}

.guide-item code {
    background: #eee;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 5px 0;
    font-weight: bold;
    color: #d63384;
    width: fit-content;
}

.guide-item span {
    font-size: 0.8rem;
    color: #777;
}

.guide-note {
    margin-top: 15px;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    padding-top: 10px;
    color: #666;
}

/* BUTTONS & CONTROLS */
.controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.sort-container {
    display: flex;
    gap: 10px;
}

.controls-btn {
    height: 50px;
    box-sizing: border-box;
    font-family: var(--comic-font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    background: linear-gradient(135deg, #3E1F16 0%, #211510 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.controls-btn:hover {
    color: var(--brown);
    transform: translateY(-2px) scale(1.05);
    background-color: var(--accent-color);
    background-image: none;
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.2),
        0 8px 15px rgba(0, 0, 0, 0.2);
}

.controls-btn:active {
    transform: scale(0.95) !important;
}

.controls-btn.active {
    background-color: var(--accent-color) !important;
    background-image: none !important;
    color: var(--brown);
    transform: none;
}

.controls-btn.clear-btn {
    background: var(--bright-red);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.controls-btn.clear-btn:hover {
    color: white;
    background: var(--bright-red);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6), 
                0 10px 40px rgba(255, 0, 0, 0.3);
}

#random-quote-btn {
    margin-left: auto;
    background: linear-gradient(to right,
            #ff3d00, #ff8c00, #ffd700, #4caf50, #2196f3, #9c27b0, #ff3d00);
    background-size: 200% auto;
    animation: rainbowFlow 5s linear infinite;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    padding: 10px 24px;
    font-family: var(--comic-font);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#random-quote-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background-image: linear-gradient(to right,
            #ff3d00, #ff8c00, #ffd700, #4caf50, #2196f3, #9c27b0, #ff3d00);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

#random-quote-btn:active {
    transform: scale(0.95) !important;
    background-image: linear-gradient(to right,
            #ff3d00, #ff8c00, #ffd700, #4caf50, #2196f3, #9c27b0, #ff3d00) !important;
}

@keyframes rainbowFlow {
    from { background-position: 0% 0%; }
    to { background-position: -200% 0%; }
}

/* SEARCH BAR */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    height: 50px;
    width: 300px;
    box-sizing: border-box;
    padding: 0 20px;
    font-size: 18px;
    line-height: 1.2;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.35) 0%,
            rgba(255, 255, 255, 0.25) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-family: var(--comic-font);
    color: #fff;
    outline: none;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.search-input:focus {
    width: 350px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(255, 140, 0, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

#search-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#search-btn img {
    width: 22px;
    height: 22px;
    margin: 0;
    filter: invert(100%);
}

@keyframes shake {
    0%,
    100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.shake-error {
    animation: shake 0.4s ease-in-out;
}

/* TABS */
.tabs-header {
    height: 50px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tab-link {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--comic-font);
    font-size: 16px;
    font-weight: 500;
    border-radius: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tab-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tab-link.active {
    background: var(--accent-color);
    color: var(--brown);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(255, 215, 0, 0.3);
}

/* PAGINATION */
.pagination {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-family: var(--comic-font);

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.1);

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.page-btn:hover {
    transform: translateY(-3px) scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: var(--accent-color);
}

.page-btn.active {
    background-color: var(--accent-color);
    color: var(--brown);
    border: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    cursor: default;
    pointer-events: none;
    transform: scale(1.1);
}

.page-btn.arrow {
    font-size: 20px;
    background-color: transparent;
    border: none;
}

.page-btn.arrow:hover {
    background-color: var(--accent-color);
    color: var(--brown);
}

.page-dots {
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    padding: 0 8px;
    font-weight: bold;
    user-select: none;
}

/* VIDEO GRID (Default View) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: linear-gradient(135deg,
            rgba(33, 21, 16, 0.7) 0%,
            rgba(10, 10, 10, 0.8) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 16px 20px 20px 20px;
}

.card h3 {
    font-family: var(--comic-font);
    font-size: 1rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-weight: 500;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-right: 10px;
}

.video-date::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin-right: 10px;
}

/* QUOTE RESULTS (Search View) */
.quote-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.quote-search-card {
    display: flex;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg,
            rgba(33, 21, 16, 0.7) 0%,
            rgba(10, 10, 10, 0.8) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quote-search-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.quote-card-video {
    border-radius: 12px;
    margin-left: 10px;
    position: relative;
    width: 400px;
    height: 225px;
    background: #000;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
}

.lazy-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.quote-search-card:hover .lazy-thumb {
    opacity: 1;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.quote-search-card:hover .video-play-button {
    background: var(--bright-red);
    border-color: transparent;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.quote-card-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.quote-card-info #title {
    font-family: var(--comic-font);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
}

.quote-text-container {
    cursor: pointer;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
    margin: 10px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.quote-text-container:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.matching-text {
    font-family: var(--comic-font);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ffffff;
    margin: 0;
}

.highlight {
    color: #ff0000;
    font-weight: bold;
    text-decoration: underline;
}

.jump-hint {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    opacity: 0.8;
}

/* MISC & WARNINGS */
.no-results-warning {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 60px 40px;
    margin: 40px auto;
    max-width: 550px;

    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.05);

    text-align: center;
    font-family: var(--comic-font);
    color: #ffffff;

    animation: fadeInSlide 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.no-results-warning h2 {
    background: linear-gradient(135deg, #fff 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.no-results-warning p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    line-height: 1.6;
}

.no-results-warning .clear-search-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;

    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;

    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.no-results-warning .clear-search-link:hover {
    background: var(--accent-color);
    color: var(--brown);
    transform: translateY(-3px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.no-results-warning .clear-search-link:active {
    transform: scale(0.95);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Easter Eggs */
.easter-egg-hidden {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
}

.sixseven-active,
.jump-active {
    display: flex !important;
    animation: fadeInOut 2s forwards;
}

.sixseven-active img {
    animation: snapRotate 1s linear 2;
}

.jump-active img {
    animation: jumpAndFlip 2s linear forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes snapRotate {

    0%,
    49.9% {
        transform: rotate(-15deg);
    }

    50%,
    100% {
        transform: rotate(15deg);
    }
}

@keyframes jumpAndFlip {
    0% {
        transform: translateY(0) scaleX(1);
    }

    25% {
        transform: translateY(-150px) scaleX(1);
    }

    50% {
        transform: translateY(0) scaleX(-1);
    }

    75% {
        transform: translateY(-150px) scaleX(-1);
    }

    100% {
        transform: translateY(0) scaleX(1);
    }
}