:root {
    --bg-color-light: #ffffff;
    --bg-color-dark: #1a1a1a;
    --text-color-light: #000000;
    --text-color-dark: #ffffff;
    --header-height: 80px;
    --footer-height: 145px;
    --sidebar-width: 300px;
    --accent-color: #10b981;
    --accent-color-hover: #059669;
    --tech-badge-bg: #f3f4f6;
    --tech-badge-text: #4b5563;
    --tech-badge-bg-dark: #374151;
    --tech-badge-text-dark: #d1d5db;
    --background-color: var(--bg-color-light);
    --background-color-dark: var(--bg-color-dark);
    --border-color: #e1e4e8;
    --border-color-dark: #2d2d2d;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

body {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    margin: 0;
    padding: 0;
    overflow-y: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.vibe {
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto !important;
    }

    /* Mobile Header Enhancements */
    .site-header {
        padding: 0.5rem 0.75rem;
        padding-top: calc(0.5rem + var(--safe-area-top));
        height: auto;
        min-height: 56px;
        gap: 4px;
    }

    .site-title {
        font-size: clamp(1rem, 4vw, 1.4rem);
        letter-spacing: -0.02em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-container {
        gap: 6px;
        margin-bottom: 0;
    }

    .site-logo {
        height: 28px;
        flex-shrink: 0;
    }

    .site-description {
        font-size: 0.8rem;
        opacity: 0.8;
    }

    .header-right {
        gap: 6px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 0.78rem;
        gap: 3px;
        border-radius: 8px;
    }

    .nav-icon {
        width: 15px;
        height: 15px;
    }

    .nav-text {
        font-size: 0.78rem;
    }

    .sidebar-toggle {
        padding: 6px;
        width: 36px;
        height: 36px;
        margin-right: 2px;
        border-radius: 8px;
    }

    .sidebar-icon {
        width: 16px;
        height: 16px;
    }

    .dark-mode-toggle {
        padding: 6px;
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .mode-icon {
        width: 16px;
        height: 16px;
    }

    .star-count {
        font-size: 0.75rem;
    }

    .star-count svg {
        width: 13px;
        height: 13px;
    }

    /* Mobile Categories Toggle */
    .categories-toggle {
        padding: 6px 10px;
        font-size: 0.78rem;
        gap: 4px;
        min-height: 36px;
        min-width: 36px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.2);
        background: rgba(16, 185, 129, 0.15) !important;
        border: 1.5px solid rgba(16, 185, 129, 0.3) !important;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
        z-index: 1000;
        position: relative;
        border-radius: 8px;
    }

    .categories-icon {
        width: 15px;
        height: 15px;
    }

    .categories-text {
        font-size: 0.78rem;
        font-weight: 700;
    }

    /* Mobile Dropdown */
    .categories-dropdown-menu {
        min-width: 180px;
        max-height: 60vh;
        right: 0;
        left: auto;
    }

    .dropdown-item {
        padding: 12px 14px;
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.1);
    }

    .category-name {
        font-size: 0.85rem;
    }

    .category-count {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

body.dark-mode {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

.dark-mode-toggle {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    color: var(--accent-color);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dark-mode-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.dark-mode-toggle:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.dark-mode-toggle:hover::before {
    left: 100%;
}

/* Sidebar toggle button */
.sidebar-toggle {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    color: var(--accent-color);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-right: 8px;
}

.sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.sidebar-toggle:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.sidebar-toggle:hover::before {
    left: 100%;
}

.sidebar-toggle.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle.active .sidebar-show-icon {
    display: none;
}

.sidebar-toggle.active .sidebar-hide-icon {
    display: block;
}

.sidebar-toggle:not(.active) .sidebar-show-icon {
    display: block;
}

.sidebar-toggle:not(.active) .sidebar-hide-icon {
    display: none;
}

.dark-mode .sidebar-toggle {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-color);
}

.dark-mode .sidebar-toggle:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

.dark-mode .sidebar-toggle.active {
    background: var(--accent-color);
    color: white;
}

.categories-dropdown {
    position: relative;
    display: inline-block;
}

.categories-toggle {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    color: var(--accent-color);
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    min-width: 120px;
}

.categories-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.categories-toggle:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.categories-toggle:hover::before {
    left: 100%;
}

.categories-toggle.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.categories-toggle.active:hover {
    background: var(--accent-color-hover);
    border-color: var(--accent-color-hover);
}

.categories-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.categories-toggle.active .categories-icon {
    transform: rotate(90deg);
}

.categories-text {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.dropdown-arrow {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.categories-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.categories-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateX(4px);
}

.dropdown-item.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-color);
    font-weight: 600;
}

.dropdown-item.active::before {
    content: '✓';
    position: absolute;
    right: 16px;
    color: var(--accent-color);
    font-weight: bold;
}

.category-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.category-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-color-light);
    opacity: 0.7;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.dropdown-divider {
    height: 1px;
    background: rgba(16, 185, 129, 0.2);
    margin: 8px 16px;
}

/* Dark mode support for dropdown */
.dark-mode .categories-dropdown-menu {
    background: rgba(26, 26, 26, 0.98);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 3px 10px rgba(0, 0, 0, 0.2);
}

.dark-mode .dropdown-item:hover {
    background: rgba(16, 185, 129, 0.15);
}

.dark-mode .dropdown-item.active {
    background: rgba(16, 185, 129, 0.2);
}

.dark-mode .category-count {
    background: rgba(16, 185, 129, 0.15);
    color: var(--text-color-dark);
}

.dark-mode .dropdown-divider {
    background: rgba(16, 185, 129, 0.3);
}

/* Sidebar Toggle States */
.sidebar.hidden {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}

.sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Sidebar Toggle */
@media (max-width: 768px) {
    .sidebar.hidden {
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        height: 0;
        padding: 0;
        margin: 0;
        border: none;
        overflow: hidden;
    }

    .sidebar {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        z-index: 10;
    }

    .sidebar:not(.hidden) {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        padding: 16px !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(225, 228, 232, 0.6) !important;
        display: block !important;
        position: relative !important;
        z-index: 100 !important;
    }
}

.mode-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.site-header {
    padding: 0.6rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(225, 228, 232, 0.6);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
}

.dark-mode .site-header {
    background: rgba(26, 26, 26, 0.95);
    border-bottom-color: rgba(45, 45, 45, 0.6);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.dark-mode .site-header::before {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
}

.header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-width: 0;
    flex-shrink: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.site-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.site-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.dark-mode .site-logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.dark-mode .site-logo:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.nav-text {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.star-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-color);
    font-size: 0.9rem;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.star-count:hover {
    opacity: 1;
}

.star-count svg {
    width: 16px;
    height: 16px;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-right: 8px;
}

.social-link {
    color: var(--accent-color);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    opacity: 1;
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.techstack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-right: 0.5rem;
}

.tech-badge {
    background: var(--tech-badge-bg);
    color: var(--tech-badge-text);
    padding: 0.1rem 0.2rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.dark-mode .tech-badge {
    background: var(--tech-badge-bg-dark);
    color: var(--tech-badge-text-dark);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    gap: 12px;
    position: relative;
    z-index: 2;
    border-top: 1px solid #f3f4f6;
}

.dark-mode .card-footer {
    border-top-color: #374151;
}

.card-footer .contributor-badge {
    bottom: 0;
}

.site-footer {
    padding: 20px 24px;
    text-align: center;
    border-top: 1px solid rgba(225, 228, 232, 0.6);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--footer-height);
    transition: all 0.3s ease;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.05);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
}

.dark-mode .site-footer {
    background: rgba(26, 26, 26, 0.95);
    border-color: rgba(45, 45, 45, 0.6);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.2);
}

.dark-mode .site-footer::before {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
}

/* Hide-on-scroll animations */
body.header-hidden .site-header {
    transform: translateY(-100%);
}

/* Footer remains visible */

/* Add subtle shadow when content scrolls */
body.scrolled .site-header {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.scrolled .site-footer {
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 30px;
    text-align: left;
    font-size: 0.7rem;
    padding: 0 1rem;
    align-items: start;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-section h3 {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.8;
}

.dark-mode .footer-section h3 {
    color: var(--text-color-dark);
}

.footer-section p {
    font-size: inherit;
    margin: 0;
    line-height: 1.3;
    opacity: 0.6;
    color: var(--text-color-light);
}

.dark-mode .footer-section p {
    color: var(--text-color-dark);
}

.book-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.book-link svg {
    width: 14px;
    height: 14px;
}

/* Add padding to main content to prevent overlap with fixed footer */
.layout-wrapper {
    padding-bottom: calc(var(--footer-height) + 8px);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 16px;
        text-align: left;
        padding: 0 0.75rem;
    }

    .footer-section {
        text-align: left;
    }

    .footer-section p {
        text-align: left;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .footer-section h3 {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .book-links {
        align-items: flex-start;
    }

    .book-link {
        font-size: 0.8rem;
        padding: 4px 0;
    }

    .site-footer {
        position: static;
        text-align: left;
        padding: 14px 16px;
        padding-bottom: calc(14px + var(--safe-area-bottom));
    }

    .layout-wrapper {
        padding-bottom: 0;
    }

    .site-description {
        display: none !important;
    }

    .site-header {
        padding: 0.75rem 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        position: relative;
        height: auto;
    }

    body.vibe .site-header {
        height: auto !important;
    }

    body.vibe .sidebar {
        display: none !important;
    }

    .header-left {
        flex: 1;
        min-width: 0;
    }

    .header-right {
        position: static;
        gap: 8px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .star-count {
        display: flex;
        font-size: 0.8rem;
    }

    .star-count svg {
        width: 14px;
        height: 14px;
    }

    .dark-mode-toggle {
        padding: 4px;
    }

    .mode-icon {
        width: 18px;
        height: 18px;
    }

    .site-slogan {
        display: none;
    }

    .site-description {
        display: flex !important;
        margin-top: 4px;
    }

    .platform-hint {
        font-size: 0.7rem;
    }

    .platform-tag {
        padding: 1px 6px;
        font-size: 0.75rem;
    }

    .github-link {
        display: none;
    }

    .github-link span {
        display: none;
    }

    .search-container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
}

.site-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.025em;
    text-decoration: none;
}

/* Blinking cursor animation for development mode */
@keyframes blink-cursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.site-slogan {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0 0 0.8rem 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .site-slogan {
        display: none;
    }

    .site-description {
        display: flex !important;
        margin-top: 4px;
    }

    .platform-hint {
        font-size: 0.7rem;
    }

    .platform-tag {
        padding: 1px 6px;
        font-size: 0.75rem;
    }

    .header-right {
        gap: 8px;
    }

    .mode-text {
        display: none;
    }

    .dark-mode-toggle {
        padding: 6px;
    }

    .github-link {
        padding: 6px;
    }

    .github-link span {
        display: none;
    }
}

.site-title:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #059669 0%, #2563eb 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-title::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-color), #3b82f6);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.site-title:hover::before {
    opacity: 0.15;
}

.site-description {
    color: var(--text-color-light);
    margin: 0;
    font-size: 1rem;
    opacity: 0.85;
    display: flex;
    flex-direction: column;
    font-weight: 500;
    transition: opacity 0.3s ease;
    gap: 0.3rem;
}

.platform-hint {
    font-size: 0.75rem;
    opacity: 0.6;
    margin: 0;
}

.platform-pills {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-tag:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.platform-tag.active {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

.dark-mode .platform-tag {
    background: rgba(16, 185, 129, 0.2);
}

.dark-mode .platform-tag:hover {
    background: rgba(16, 185, 129, 0.25);
}

.dark-mode .platform-tag.active {
    background: var(--accent-color);
}

.dark-mode .site-description {
    color: var(--text-color-dark);
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--accent-color);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 2;
    flex-shrink: 0;
}

.chat-button:hover {
    opacity: 1;
}

.chat-button svg {
    width: 16px;
    height: 16px;
}

.yaml-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--accent-color);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 2;
    flex-shrink: 0;
}

.yaml-button:hover {
    opacity: 1;
}

.yaml-button svg {
    width: 16px;
    height: 16px;
}

.create-yaml-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.create-yaml-button:hover {
    background-color: #0e9f71;
}

.create-yaml-button svg {
    width: 14px;
    height: 14px;
}

.dark-mode .create-yaml-button {
    background-color: var(--accent-color);
    color: white;
}

.dark-mode .create-yaml-button:hover {
    background-color: #0e9f71;
}

.yaml-content {
    background-color: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    color: #333;
    font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow: auto;
    white-space: pre-wrap;
    margin: 0;
}

.dark-mode .yaml-content {
    background-color: #2d2d2d;
    color: #f5f5f5;
}

/* YAML syntax highlighting */
.yaml-content .key {
    color: #0550ae;
    font-weight: 500;
}

.dark-mode .yaml-content .key {
    color: #4d9eee;
}

.yaml-content .string {
    color: #22863a;
}

.yaml-content .string .number {
    color: #56b366 !important;
}

.dark-mode .yaml-content .string {
    color: #56b366;
}

.yaml-content .number {
    color: #905;
}

.dark-mode .yaml-content .number {
    color: #e76086;
}

.yaml-content .boolean {
    color: #0550ae;
    font-weight: 500;
}

.dark-mode .yaml-content .boolean {
    color: #4d9eee;
}

/* Style title as code in the yml modal */
#yamlModalOverlay .modal-title {
    font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace;
    font-size: 1.2rem;
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    display: flex;
    flex: 1;
    align-items: stretch;
    min-height: 0;
}

.sidebar {
    width: var(--sidebar-width);
    padding: 20px;
    border-right: 1px solid rgba(225, 228, 232, 0.3);
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow-y: auto;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        2px 0 20px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Sidebar hidden state */
.sidebar.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    width: 0;
    min-width: 0;
    padding: 0;
    border-right: none;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(16, 185, 129, 0.2) 20%,
            rgba(16, 185, 129, 0.4) 50%,
            rgba(16, 185, 129, 0.2) 80%,
            transparent 100%);
    border-radius: 1px;
}

.dark-mode .sidebar {
    background: linear-gradient(135deg,
            rgba(26, 26, 26, 0.98) 0%,
            rgba(20, 20, 20, 0.95) 100%);
    border-right-color: rgba(45, 45, 45, 0.3);
    scrollbar-color: #2d2d2d transparent;
    box-shadow:
        2px 0 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark-mode .sidebar::before {
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(16, 185, 129, 0.3) 20%,
            rgba(16, 185, 129, 0.5) 50%,
            rgba(16, 185, 129, 0.3) 80%,
            transparent 100%);
}

.main-content {
    flex: 1;
    min-width: 0;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow-y: auto;
    padding: 20px;
    padding-top: 0;
    position: relative;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
    transition: all 0.3s ease;
}

/* Main content when sidebar is hidden */
.sidebar.hidden+.main-content {
    margin-left: 0;
    width: 100%;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.dark-mode .main-content {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    scrollbar-color: #2d2d2d transparent;
}

.dark-mode .main-content::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

.main-content-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-color-light);
    padding: 4px 20px;
    border-bottom: 1px solid #e1e4e8;
    z-index: 10;
    margin: 0 -20px 12px -20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s ease;
}

.dark-mode .main-content-header {
    background-color: var(--bg-color-dark);
    border-color: #2d2d2d;
}

/* Hide dev/filters header on scroll as well */
body.header-hidden .main-content-header {
    transform: translateY(-100%);
}

.main-content-header .header-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 auto;
    gap: 16px;
}

.main-content-header .header-description {
    font-size: 0.85rem;
    color: var(--text-color-light);
    opacity: 0.8;
    white-space: nowrap;
}

.dark-mode .main-content-header .header-description {
    color: var(--text-color-dark);
}

.main-content-header .platform-selectors {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-color-light);
    opacity: 0.9;
    flex-wrap: wrap;
    margin-right: 0 !important;
}

.dark-mode .main-content-header .platform-selectors {
    color: var(--text-color-dark);
}

.main-content-header .dev-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: var(--bg-color-light);
    min-width: 120px;
    margin-left: auto;
}

.dark-mode .main-content-header .dev-mode-toggle {
    background-color: var(--bg-color-dark);
    border-color: #2d2d2d;
}

.main-content-header .dev-mode-toggle:hover {
    border-color: var(--accent-color);
}

.main-content-header .dev-mode-label {
    font-size: 13px;
    color: var(--text-color-light);
    white-space: nowrap;
    order: 1;
}

.dark-mode .main-content-header .dev-mode-label {
    color: var(--text-color-dark);
}

.main-content-header .switch {
    order: 2;
}

@media (max-width: 768px) {
    .main-content-header {
        padding: 8px 16px;
        margin: 0 -12px 12px -12px;
    }

    .main-content-header .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .main-content-header .header-description {
        text-align: left;
        white-space: normal;
    }

    .main-content-header .platform-selectors {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        align-items: center;
        text-align: left;
        gap: 4px;
    }

    .main-content-header .custom-select,
    .main-content-header .custom-input {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
    }

    .main-content-header .custom-input {
        width: 100%;
    }

    /* Show custom inputs on new line when visible */
    .main-content-header .custom-input:not([style*="display: none"]) {
        margin-top: 4px;
        margin-bottom: 4px;
    }
}

.main-content-header .custom-select {
    padding: 2px 20px 2px 4px;
    font-size: inherit;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: var(--accent-color);
    cursor: pointer;
    min-width: 0;
    font-weight: 500;
    background-position: right 4px center;
    background-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.main-content-header .custom-select:hover {
    opacity: 0.8;
}

.main-content-header .custom-input {
    padding: 2px 4px;
    font-size: inherit;
    border: none;
    border-bottom: 1px dashed var(--accent-color);
    border-radius: 0;
    background-color: transparent;
    color: var(--accent-color);
    min-width: 100px;
    font-weight: 500;
}

.main-content-header .custom-input:focus {
    outline: none;
    box-shadow: none;
    border-bottom-style: solid;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    align-items: start;
}

/* Remove category section styles since we're not using them anymore */

/* Category section styles removed for cleaner card view */

/* Loading and Error States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.error-text {
    color: #ef4444;
    font-size: 1.125rem;
    margin: 0 0 24px 0;
    max-width: 400px;
}

.retry-button {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-button:hover {
    background: #059669;
    transform: translateY(-1px);
}

.dark-mode .loading-spinner {
    border-color: #374151;
    border-top-color: #10b981;
}

.dark-mode .loading-text {
    color: #9ca3af;
}

.dark-mode .error-text {
    color: #fca5a5;
}







/* Filter header styling */
.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    grid-column: 1 / -1;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color-light);
}

.dark-mode .filter-header h3 {
    color: var(--text-color-dark);
}

.filter-count {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
}

.dark-mode .filter-header {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.container-lg.markdown-body {
    padding: 0;
    max-width: none;
    width: 100%;
}

@media (min-width: 1200px) {
    .prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 1200px) {
    .prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    /* Category cards removed */
}

@media (max-width: 900px) {
    .prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
        padding: 14px;
    }

    /* Category cards removed */

    /* Category header removed */
}

@media (max-width: 768px) {
    .prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 14px;
        padding: 14px;
    }

    .prompt-card {
        min-height: 140px;
        padding: 14px;
        border-radius: 12px;
        transition: all 0.2s ease;
    }

    /* Disable hover transforms on touch devices */
    .prompt-card:hover {
        transform: none;
    }

    @media (hover: hover) {
        .prompt-card:hover {
            transform: translateY(-2px);
        }
    }

    .prompt-title {
        font-size: 1rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .prompt-content {
        font-size: 0.875rem;
        line-height: 1.55;
        margin-bottom: 14px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .card-footer {
        padding-top: 12px;
        gap: 10px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .category-badge {
        font-size: 10px;
        padding: 3px 8px;
        border-radius: 6px;
    }

    .show-toggle {
        font-size: 0.78rem;
        padding: 6px 10px;
        border-radius: 6px;
    }

    /* Mobile Contribute Card */
    .contribute-card {
        min-height: 120px;
        padding: 16px 14px;
        border-radius: 12px;
        border-width: 2px;
    }

    .contribute-card .prompt-title {
        font-size: 0.95rem;
        margin-bottom: 10px;
        gap: 6px;
    }

    .contribute-card .prompt-content {
        font-size: 0.825rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .contribute-card .contributor-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .contributor-badge {
        margin-left: 0;
        align-self: flex-end;
    }

    .show-toggle {
        padding: 8px 14px;
        font-size: 13px;
    }
}

.prompt-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.prompt-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.prompt-card:hover::before {
    opacity: 1;
}

.prompt-card:hover::after {
    opacity: 1;
}

.prompt-card:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.prompt-card:focus-within::before {
    opacity: 1;
}

/* Improved focus states for better accessibility */
.prompt-card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.show-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .prompt-card {
        border-width: 2px;
        border-color: var(--text-color-light);
    }

    .dark-mode .prompt-card {
        border-color: var(--text-color-dark);
    }

    .category-badge {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .prompt-card,
    .show-toggle,
    .category-badge,
    .contributor-badge {
        transition: none;
    }

    .prompt-card:hover {
        transform: none;
    }

    .prompt-card.loading {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Loading animation for cards */
.prompt-card.loading {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.6s ease forwards;
}

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

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

/* Shimmer effect for loading */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translateY(0);
    }
}

.prompt-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.dark-mode .prompt-card.loading::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Loading skeleton for content */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 1em;
    margin: 4px 0;
}

.dark-mode .loading-skeleton {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200px 100%;
}

/* Enhanced loading states */
.prompts-grid.loading {
    opacity: 0.7;
}

.prompts-grid.loading .prompt-card {
    animation: pulse 2s infinite;
}

/* Smooth content transitions */
.prompt-content {
    animation: slideIn 0.6s ease-out;
}

.prompt-title {
    animation: slideIn 0.4s ease-out;
}

.category-badge {
    animation: slideIn 0.8s ease-out;
}

.dark-mode .prompt-card.loading::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Stagger animation for multiple cards */
.prompt-card:nth-child(1) {
    animation-delay: 0.1s;
}

.prompt-card:nth-child(2) {
    animation-delay: 0.2s;
}

.prompt-card:nth-child(3) {
    animation-delay: 0.3s;
}

.prompt-card:nth-child(4) {
    animation-delay: 0.4s;
}

.prompt-card:nth-child(5) {
    animation-delay: 0.5s;
}

.prompt-card:nth-child(6) {
    animation-delay: 0.6s;
}

.prompt-card:nth-child(7) {
    animation-delay: 0.7s;
}

.prompt-card:nth-child(8) {
    animation-delay: 0.8s;
}

.prompt-card.expanded .prompt-content {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    max-height: none;
}

.dark-mode .prompt-card {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.dark-mode .prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: #4b5563;
}

.prompt-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #111827;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.dark-mode .prompt-title {
    color: #f9fafb;
}

.prompt-content {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    font-weight: 400;
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

.show-toggle {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.12) 0%,
            rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-color);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

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

.show-toggle:hover {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.25) 0%,
            rgba(16, 185, 129, 0.2) 100%);
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.3),
        0 4px 12px rgba(16, 185, 129, 0.2);
}

.show-toggle:hover::before {
    left: 100%;
}

.show-toggle:active {
    transform: translateY(0);
    background: rgba(16, 185, 129, 0.3);
}

.dark-mode .prompt-content {
    color: #9ca3af;
}

/* Category Badge Styles */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    transition: all 0.2s ease;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.category-badge.jailbreak {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.category-badge.override {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.category-badge.exfiltration {
    background: rgba(139, 69, 19, 0.1);
    color: #92400e;
    border: 1px solid rgba(139, 69, 19, 0.2);
}

.category-badge.maliciouscontent {
    background: rgba(220, 38, 127, 0.1);
    color: #be185d;
    border: 1px solid rgba(220, 38, 127, 0.2);
}

.category-badge.obfuscation {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.category-badge.rolehijack {
    background: rgba(168, 85, 247, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.category-badge.multistep {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.category-badge.hiddenpayload {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.category-badge.crossprompt {
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.category-badge.benign {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Dark mode category badges */
.dark-mode .category-badge {
    background: #374151;
    color: #d1d5db;
    border: 1px solid #4b5563;
}

.dark-mode .category-badge.jailbreak {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.dark-mode .category-badge.override {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.dark-mode .category-badge.exfiltration {
    background: rgba(139, 69, 19, 0.2);
    color: #d97706;
}

.dark-mode .category-badge.maliciouscontent {
    background: rgba(220, 38, 127, 0.2);
    color: #f472b6;
}

.dark-mode .category-badge.obfuscation {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.dark-mode .category-badge.rolehijack {
    background: rgba(168, 85, 247, 0.2);
    color: #a78bfa;
}

.dark-mode .category-badge.multistep {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.dark-mode .category-badge.hiddenpayload {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.dark-mode .category-badge.crossprompt {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.dark-mode .category-badge.benign {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* Example count indicator */
.example-count {
    font-size: 0.75rem;
    color: var(--text-color-light);
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 500;
}

.dark-mode .example-count {
    color: var(--text-color-dark);
    background: rgba(255, 255, 255, 0.05);
}

.copy-button {
    position: static;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--accent-color);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 2;
    margin-left: 8px;
    flex-shrink: 0;
}

.copy-button:hover {
    opacity: 1;
}

.copy-button svg {
    width: 16px;
    height: 16px;
}

.search-container {
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(248, 250, 252, 0.6) 100%);
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(16, 185, 129, 0.3) 50%,
            transparent 100%);
}

.search-container:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(248, 250, 252, 0.8) 100%);
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.08),
        0 6px 20px rgba(16, 185, 129, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.dark-mode .search-container {
    background: linear-gradient(135deg,
            rgba(26, 26, 26, 0.8) 0%,
            rgba(20, 20, 20, 0.6) 100%);
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark-mode .search-container::before {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(16, 185, 129, 0.4) 50%,
            transparent 100%);
}

.dark-mode .search-container:hover {
    background: linear-gradient(135deg,
            rgba(26, 26, 26, 0.9) 0%,
            rgba(20, 20, 20, 0.8) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prompt-count {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.prompt-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.6s ease;
}

.prompt-count:hover::before {
    left: 100%;
}

.dark-mode .prompt-count {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.25);
}

.prompt-count .count-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.prompt-count.filtered {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.dark-mode .prompt-count.filtered {
    background: rgba(59, 130, 246, 0.15);
}


#searchResults {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dark-mode #searchResults {
    background: rgba(26, 26, 26, 0.6);
    border-color: rgba(16, 185, 129, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 4px 8px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.search-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(16, 185, 129, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.search-result-item:hover {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.08) 0%,
            rgba(16, 185, 129, 0.12) 100%);
    border-color: rgba(16, 185, 129, 0.2);
    transform: translateX(6px) translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.search-result-item:hover::before {
    left: 100%;
}

.dark-mode .search-result-item:hover {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.15) 0%,
            rgba(16, 185, 129, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.search-result-item.active {
    background: linear-gradient(135deg,
            var(--accent-color) 0%,
            rgba(16, 185, 129, 0.9) 100%);
    color: white;
    border-color: var(--accent-color);
    box-shadow:
        0 0 0 4px rgba(16, 185, 129, 0.2),
        0 6px 20px rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
}

/* Category item content styling */
.category-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.category-icon {
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.category-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.category-count-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dark-mode .category-name {
    color: var(--text-color-dark);
}

.dark-mode .category-count-badge {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: rgba(16, 185, 129, 0.9);
}

.search-result-item.active .category-name {
    color: white;
}

.search-result-item.active .category-count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(225, 228, 232, 0.6);
        padding: 12px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .dark-mode .sidebar {
        border-bottom-color: rgba(45, 45, 45, 0.6);
        background: rgba(26, 26, 26, 0.98);
    }

    /* Mobile Search Container */
    .search-container {
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 10px;
    }

    .prompt-count {
        margin-bottom: 10px;
        padding: 8px 10px;
        font-size: 0.78rem;
    }


    /* Mobile Category Filtering */
    #searchResults {
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(16, 185, 129, 0.1);
        margin-top: 8px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dark-mode #searchResults {
        background: rgba(26, 26, 26, 0.8);
        border-color: rgba(16, 185, 129, 0.15);
    }

    .search-result-item {
        padding: 12px 16px;
        margin: 2px 4px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.1);
    }

    .search-result-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .search-result-item:hover {
        background-color: rgba(16, 185, 129, 0.1);
        transform: translateX(2px);
    }

    .dark-mode .search-result-item:hover {
        background-color: rgba(16, 185, 129, 0.15);
    }

    .search-result-item.active {
        background-color: var(--accent-color);
        color: white;
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }

    .category-name {
        flex: 1;
        font-weight: 600;
    }

    .category-count-badge {
        background: rgba(255, 255, 255, 0.2);
        color: inherit;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 600;
        min-width: 24px;
        text-align: center;
    }

    .search-result-item.active .category-count-badge {
        background: rgba(255, 255, 255, 0.3);
    }

    /* Mobile Search Results Styling */
    .search-result-content {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .search-result-category {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--accent-color);
        opacity: 0.8;
    }

    .search-result-text {
        font-size: 0.85rem;
        line-height: 1.4;
        color: var(--text-color-light);
        opacity: 0.9;
    }

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

    /* Mobile Category Filter Header */
    .search-container::before {
        content: '📂 Filter by Category';
        display: block;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-color-light);
        margin-bottom: 8px;
        opacity: 0.9;
        padding: 8px 12px;
        background: rgba(16, 185, 129, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(16, 185, 129, 0.2);
        text-align: center;
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
    }

    .dark-mode .search-container::before {
        color: var(--text-color-dark);
        background: rgba(16, 185, 129, 0.15);
        border-color: rgba(16, 185, 129, 0.25);
    }


    /* Mobile Category Filter Animation */
    .search-result-item {
        animation: mobileCategorySlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        opacity: 0;
        transform: translateY(10px);
    }

    .search-result-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .search-result-item:nth-child(2) {
        animation-delay: 0.15s;
    }

    .search-result-item:nth-child(3) {
        animation-delay: 0.2s;
    }

    .search-result-item:nth-child(4) {
        animation-delay: 0.25s;
    }

    .search-result-item:nth-child(5) {
        animation-delay: 0.2s;
    }

    .search-result-item:nth-child(6) {
        animation-delay: 0.24s;
    }

    .search-result-item:nth-child(7) {
        animation-delay: 0.28s;
    }

    .search-result-item:nth-child(8) {
        animation-delay: 0.32s;
    }

    .search-result-item:nth-child(9) {
        animation-delay: 0.36s;
    }

    .search-result-item:nth-child(10) {
        animation-delay: 0.4s;
    }

    @keyframes mobileCategorySlideIn {
        from {
            opacity: 0;
            transform: translateY(6px);
        }

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

    .main-content {
        height: auto;
        padding: 10px;
        padding-top: 0;
    }

    .header-right {
        gap: 8px;
    }

    .mode-text {
        display: none;
    }

    .dark-mode-toggle {
        padding: 6px;
    }

    .github-link {
        padding: 6px;
    }

    .github-link span {
        display: none;
    }
}

/* Add modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 12px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dark-mode .modal {
    background: rgba(26, 26, 26, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 12px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    padding-right: 80px;
    color: var(--text-color-light);
    flex: 1;
}

.modal-copy-button {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    color: var(--accent-color);
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.modal-copy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
    transition: left 0.5s ease;
}

.modal-copy-button:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.modal-copy-button:hover::before {
    left: 100%;
}

.modal-close {
    position: static;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    cursor: pointer;
    color: #ef4444;
    padding: 8px;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.modal-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.2), transparent);
    transition: left 0.5s ease;
}

.dark-mode .modal-close {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
}

.modal-close:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.modal-close:hover::before {
    left: 100%;
}

.prompt-card {
    cursor: pointer;
}

/* Add contributor badge styles */
.contributor-badge {
    font-size: 0.7rem;
    color: var(--accent-color);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.2s ease;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dark-mode .contributor-badge {
    background: rgba(16, 185, 129, 0.15);
}

.contributor-badge:hover {
    opacity: 1;
    transform: translateY(-1px);
    background: var(--accent-color);
    color: white;
}

.dark-mode .contributor-badge:hover {
    color: var(--bg-color-dark);
}

.prompt-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color-light);
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 40px;
}

/* Add modal header and footer styles */
.modal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e4e8;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.modal-footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    max-width: 50%;
}

.modal-footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    white-space: nowrap;
}

.modal-chat-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-chat-button:hover {
    background: var(--accent-color-hover);
}

.modal-chat-button svg {
    width: 16px;
    height: 16px;
}

.modal-contributor {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.modal-contributor:hover {
    opacity: 1;
}

.dark-mode .modal-title {
    color: var(--text-color-dark);
}

.modal-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color-light);
}

.dark-mode .modal-content {
    color: var(--text-color-dark);
}

.modal-copy-button:hover {
    opacity: 1;
}

.modal-copy-button svg {
    width: 20px;
    height: 20px;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.dark-mode .modal-close {
    color: var(--text-color-dark);
}

.footer-section a {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-section a:hover {
    opacity: 1;
}

.book-link {
    color: var(--accent-color) !important;
    padding: 1px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dark-mode .book-link {
    color: var(--accent-color) !important;
}

.book-link:hover {
    opacity: 1;
}

.social-footer-link {
    color: var(--accent-color);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.dark-mode .social-footer-link {
    color: var(--accent-color);
}

.contribute-card {
    border: 3px dashed var(--accent-color);
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.12) 0%,
            rgba(59, 130, 246, 0.12) 50%,
            rgba(139, 92, 246, 0.08) 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(16, 185, 129, 0.15),
        0 4px 16px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.contribute-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(16, 185, 129, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.contribute-card:hover::before {
    transform: translateX(100%);
}

.contribute-card:hover {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.2) 0%,
            rgba(59, 130, 246, 0.2) 50%,
            rgba(139, 92, 246, 0.15) 100%);
    transform: translateY(-8px) scale(1.03);
    border-color: var(--accent-color);
    border-width: 4px;
    box-shadow:
        0 24px 48px rgba(16, 185, 129, 0.25),
        0 12px 24px rgba(16, 185, 129, 0.15),
        0 6px 12px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dark-mode .contribute-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
}

.dark-mode .contribute-card:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    box-shadow:
        0 20px 40px rgba(16, 185, 129, 0.3),
        0 8px 16px rgba(16, 185, 129, 0.2);
}

.contribute-card .prompt-title {
    color: var(--accent-color) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.contribute-card .prompt-content {
    color: var(--text-color-light) !important;
    opacity: 0.8 !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.dark-mode .contribute-card .prompt-content {
    color: var(--text-color-dark) !important;
}

.contribute-card .contributor-badge {
    background: var(--accent-color) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    border: none !important;
    opacity: 1 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* Special styling for the contribute card when it spans full width */
.contribute-card[style*="grid-column: 1 / -1"] {
    min-height: 200px;
    border-width: 3px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.dark-mode .contribute-card[style*="grid-column: 1 / -1"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
}

.search-result-item.add-prompt {
    color: var(--accent-color);
    border: 1px dashed var(--accent-color);
    background: rgba(16, 185, 129, 0.05);
    transition: all 0.2s ease;
}

.search-result-item.add-prompt:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.dark-mode .search-result-item.add-prompt {
    background: rgba(16, 185, 129, 0.1);
}

.dark-mode .search-result-item.add-prompt:hover {
    background: rgba(16, 185, 129, 0.15);
}

.star-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-color);
    font-size: 0.9rem;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.star-count:hover {
    opacity: 1;
}

.star-count svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .star-count {
        display: flex;
        font-size: 0.8rem;
    }

    .star-count svg {
        width: 14px;
        height: 14px;
    }
}

/* Dev Mode Toggle Switch Styles */
.dev-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: var(--bg-color-light);
    min-width: 120px;
    flex: 1;
}

.dev-mode-label {
    font-size: 14px;
    color: var(--text-color-light);
    white-space: nowrap;
    order: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.dark-mode .slider {
    background-color: #555;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

.dark-mode .slider:before {
    background-color: #e1e1e1;
}

input:checked+.slider {
    background-color: var(--accent-color);
}

.dark-mode input:checked+.slider {
    background-color: var(--accent-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-color);
}

.dark-mode input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-color);
}

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.main-content-header .dev-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: var(--bg-color-light);
    min-width: 160px;
    flex: 1;
}

.dark-mode .main-content-header .dev-mode-toggle {
    background-color: var(--bg-color-dark);
    border-color: #2d2d2d;
}

.main-content-header .dev-mode-toggle:hover {
    border-color: var(--accent-color);
}

.main-content-header .dev-mode-label {
    font-size: 14px;
    color: var(--text-color-light);
    white-space: nowrap;
    order: 1;
}

.dark-mode .main-content-header .dev-mode-label {
    color: var(--text-color-dark);
}

.main-content-header .switch {
    order: 2;
}

@media (max-width: 768px) {
    .main-content-header .dev-mode-toggle {
        width: 100%;
        order: -1;
    }

    .main-content-header .dev-mode-label {
        display: inline-block;
    }

    .main-content-header .platform-selectors {
        flex-direction: column;
        width: 100%;
    }
}

/* Copilot Suggestion Modal Styles */
.copilot-suggestion-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1001;
    display: none;
}

.dark-mode .copilot-suggestion-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.copilot-suggestion-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color-light);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 520px;
    z-index: 1002;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    display: none;
}

.dark-mode .copilot-suggestion-modal {
    background: var(--bg-color-dark);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.prompts-count-label {
    display: none;
}

.dev-mode .count-label {
    display: none;
}

.dev-mode .prompts-count-label {
    display: block;
}

.copilot-suggestion-content {
    margin-bottom: 24px;
    color: var(--text-color-light);
    font-size: 1.1rem;
    line-height: 1.5;
}

.dark-mode .copilot-suggestion-content {
    color: var(--text-color-dark);
}

.copilot-suggestion-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.copilot-suggestion-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color-light);
    font-size: 0.9rem;
    opacity: 0.8;
    order: 2;
    margin-top: 8px;
}

.dark-mode .copilot-suggestion-checkbox {
    color: var(--text-color-dark);
}

.copilot-suggestion-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
    margin: 0;
}

.copilot-suggestion-checkbox:hover {
    opacity: 1;
}

.copilot-suggestion-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    order: 1;
}

.copilot-suggestion-button {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    width: 100%;
}

.copilot-suggestion-button.primary {
    background: var(--accent-color);
    color: white;
}

.copilot-suggestion-button.primary:hover {
    background: var(--accent-color-hover);
    transform: translateY(-1px);
}

.copilot-suggestion-button.secondary {
    background: transparent;
    color: var(--text-color-light);
    border: 1px solid #e1e4e8;
}

.dark-mode .copilot-suggestion-button.secondary {
    color: var(--text-color-dark);
    border-color: #2d2d2d;
}

.copilot-suggestion-button.secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.dark-mode .copilot-suggestion-button.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 480px) {
    .copilot-suggestion-modal {
        padding: 24px;
        max-width: 100%;
        margin: 0 16px;
    }

    .copilot-suggestion-content {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .copilot-suggestion-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Variable Input Field Styles */
.variable-container {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 8px;
    border: 1px solid var(--accent-color);
}

.variable-form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.variable-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variable-input-wrapper label {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 500;
}

.variable-input {
    padding: 8px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--bg-color-light);
    color: var(--text-color-light);
    transition: all 0.2s ease;
}

.dark-mode .variable-input {
    background: var(--bg-color-dark);
    color: var(--text-color-dark);
    border-color: #2d2d2d;
}

.variable-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

/* Modal content styling removed - using default styles */

.chrome-ext-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-color);
    font-size: 0.9rem;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.chrome-ext-link:hover {
    opacity: 1;
}

.chrome-ext-link svg {
    width: 20px;
    height: 20px;
}

.platform-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
}

.custom-select {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.dark-mode .custom-select {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
    border-color: #2d2d2d;
}

.custom-select:hover {
    border-color: var(--accent-color);
}

.custom-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.custom-input {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    transition: all 0.2s ease;
    min-width: 150px;
}

.dark-mode .custom-input {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
    border-color: #2d2d2d;
}

.custom-input:hover {
    border-color: var(--accent-color);
}

.custom-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.custom-input::placeholder {
    color: #6a737d;
    opacity: 0.8;
}

.dark-mode .custom-input::placeholder {
    color: #8b949e;
}

@media (max-width: 768px) {
    .platform-selectors {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 12px;
        width: 100%;
    }

    .custom-select,
    .custom-input {
        width: 100%;
    }
}

.main-content-header .custom-select {
    min-width: 0;
}

.main-content-header .custom-input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .main-content-header {
        padding: 8px 16px;
        margin: 0 -12px 12px -12px;
    }

    .main-content-header .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .main-content-header .header-description {
        text-align: left;
        white-space: normal;
    }

    .main-content-header .platform-selectors {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        align-items: center;
        text-align: left;
        gap: 4px;
    }

    .main-content-header .custom-select,
    .main-content-header .custom-input {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
    }

    .main-content-header .custom-input {
        width: 100%;
    }

    /* Show custom inputs on new line when visible */
    .main-content-header .custom-input:not([style*="display: none"]) {
        margin-top: 4px;
        margin-bottom: 4px;
    }
}

.platform-tag-container {
    position: relative;
    display: inline-block;
}

.grok-mode-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 160px;
    margin-top: 4px;
    background: var(--bg-color-light);
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    overflow: hidden;
    padding: 4px;
}

.dark-mode .grok-mode-dropdown {
    background: var(--bg-color-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.grok-mode-option {
    padding: 4px 8px;
    cursor: pointer;
    color: var(--text-color-light);
    transition: all 0.2s ease;
    border-radius: 4px;
    white-space: nowrap;
}

.dark-mode .grok-mode-option {
    color: var(--text-color-dark);
}

.grok-mode-option:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
}

.dark-mode .grok-mode-option:hover {
    background: rgba(16, 185, 129, 0.2);
}

.cursor-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    opacity: 0.8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    margin-right: 8px;
}

.cursor-logo:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.cursor-logo svg {
    width: 16px;
    height: 16px;
}

/* Style for the Cursor AI logo paths in dark mode */
.cursor-logo path[fill="#fff"] {
    transition: fill 0.2s ease;
}

.dark-mode .cursor-logo path[fill="#fff"] {
    fill: #2d2d2d;
}

@media (max-width: 768px) {
    .cursor-logo span {
        display: none;
    }
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.modal-hint {
    margin-bottom: 0;
    font-size: 0.75rem;
    color: var(--text-color-light);
    opacity: 0.7;
    display: block;
    line-height: 1.4;
    max-width: 300px;
}

.dark-mode .modal-hint {
    color: var(--text-color-dark);
}

.content-well {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.dark-mode .content-well {
    background-color: var(--background-color-dark);
    border-color: var(--border-color-dark) !important;
}

.modal-content pre {
    margin: 0;
    padding: 1rem;
    background-color: var(--code-background);
    border-radius: 0;
    overflow-x: auto;
}

.modal-content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--code-text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Dark mode adjustments */

.dark-mode .modal-content pre {
    background-color: var(--dark-code-background);
}

.dark-mode .modal-content code {
    color: var(--dark-code-text);
}

.dark-mode .modal-hint {
    background-color: var(--dark-hover-color);
}

.dark-mode .content-well {
    border-color: var(--dark-border-color);
    background-color: var(--dark-background);
}

.github-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.github-inputs {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: var(--text-color-light);
}

.github-inputs span {
    opacity: 0.7;
    font-size: 12px;
}

.github-input {
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    width: 100px;
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    transition: all 0.2s ease;
}

#github-branch {
    width: 80px;
}

@media (max-width: 768px) {

    /* Mobile Modal Enhancements */
    .modal {
        width: calc(100% - 16px);
        max-width: none;
        padding: 16px;
        border-radius: 14px;
        max-height: 90vh;
        max-height: 90dvh;
        transform: translate(-50%, -50%);
    }

    .modal-header {
        margin-bottom: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .modal-title {
        font-size: 1.1rem;
        padding-right: 40px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        padding: 8px;
    }

    .modal-copy-button {
        width: 36px;
        height: 36px;
        padding: 8px;
        margin-left: auto;
    }

    .modal-content {
        font-size: 0.875rem;
        line-height: 1.5;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 14px;
        padding-top: 10px;
    }

    .modal-footer-left {
        max-width: 100%;
        margin-bottom: 0;
    }

    .modal-footer-right {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .modal-chat-button {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.875rem;
        min-height: 44px;
    }

    .modal-embed-button {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 4px;
        min-height: 44px;
    }

    /* Mobile Touch Interactions */
    .prompt-card {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.1);
    }

    .prompt-card:active {
        transform: translateY(-4px) scale(1.02);
        transition: transform 0.1s ease;
        box-shadow:
            0 16px 32px rgba(0, 0, 0, 0.15),
            0 8px 16px rgba(0, 0, 0, 0.1);
    }

    .show-toggle {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.1);
    }

    .category-badge {
        min-height: 32px;
        min-width: 32px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .modal-copy-button,
    .modal-close {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .sidebar-toggle {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        margin-right: 4px;
    }

    .sidebar-icon {
        width: 18px;
        height: 18px;
    }

    .dark-mode-toggle {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Mobile Spacing Optimizations */
    .main-content {
        padding: 12px;
        padding-top: 0;
    }

    .site-footer {
        padding: 14px 16px;
        padding-bottom: calc(14px + var(--safe-area-bottom));
        height: auto;
        min-height: 50px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 16px;
        text-align: left;
    }

    .footer-section {
        margin-bottom: 0;
    }

    .footer-section h3 {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .footer-section p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .book-links {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .book-link {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        touch-action: manipulation;
    }

    /* Mobile-Specific Animations - lightweight for performance */
    @media (prefers-reduced-motion: no-preference) {
        .prompt-card {
            animation: mobileCardSlideIn 0.4s ease-out forwards;
        }

        .prompt-card:nth-child(odd) {
            animation-delay: 0.05s;
        }

        .prompt-card:nth-child(even) {
            animation-delay: 0.1s;
        }

        .contribute-card {
            animation: mobileContributeSlideIn 0.5s ease-out forwards;
        }
    }

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

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

    @keyframes mobileContributeSlideIn {
        from {
            opacity: 0;
            transform: translateY(24px);
        }

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

    /* Mobile Performance Optimizations */
    .prompt-card::before,
    .prompt-card::after,
    .contribute-card::before {
        /* Avoid will-change on mobile for memory savings */
        will-change: auto;
    }

    .modal {
        will-change: auto;
    }

    /* Mobile Scroll Optimizations */
    .main-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .sidebar {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Mobile Viewport Optimizations */
    .modal-overlay {
        -webkit-overflow-scrolling: touch;
    }

    .modal {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .site-header {
        padding: 0.4rem 0.6rem;
        padding-top: calc(0.4rem + var(--safe-area-top));
        height: auto;
        min-height: 48px;
    }

    .site-title {
        font-size: clamp(0.9rem, 4.5vw, 1.15rem);
    }

    .logo-container {
        gap: 4px;
        margin-bottom: 0;
    }

    .site-logo {
        height: 24px;
    }

    .site-description {
        font-size: 0.7rem;
        display: none !important;
    }

    .header-right {
        gap: 4px;
    }

    .nav-link {
        padding: 4px 6px;
        font-size: 0.7rem;
        gap: 2px;
    }

    .nav-icon {
        width: 13px;
        height: 13px;
    }

    .nav-text {
        display: none;
    }

    .sidebar-toggle {
        width: 32px;
        height: 32px;
        padding: 4px;
        margin-right: 1px;
    }

    .sidebar-icon {
        width: 15px;
        height: 15px;
    }

    .dark-mode-toggle {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    .mode-icon {
        width: 15px;
        height: 15px;
    }

    .categories-toggle {
        padding: 4px 6px;
        font-size: 0.7rem;
        min-height: 32px;
        min-width: 32px;
    }

    .categories-text {
        display: none;
    }

    .star-count {
        font-size: 0.7rem;
    }

    .star-count svg {
        width: 12px;
        height: 12px;
    }

    .sidebar {
        padding: 10px;
    }

    .search-container {
        padding: 10px;
        margin-bottom: 10px;
    }

    .prompt-count {
        padding: 6px 8px;
        font-size: 0.72rem;
    }

    /* Extra Small Mobile Category Filtering */
    #searchResults {
        max-height: 140px;
        margin-top: 6px;
    }

    .search-result-item {
        padding: 8px 10px;
        margin: 1px 2px;
        font-size: 0.8rem;
        min-height: 38px;
    }

    .category-name {
        font-size: 0.8rem;
    }

    .category-count-badge {
        font-size: 0.7rem;
        padding: 1px 5px;
        min-width: 18px;
    }

    .prompts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .prompt-card {
        min-height: 120px;
        padding: 12px;
        border-radius: 10px;
    }

    .prompt-title {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .prompt-content {
        font-size: 0.825rem;
        line-height: 1.45;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .card-footer {
        padding-top: 10px;
        gap: 6px;
    }

    .category-badge {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 5px;
    }

    .show-toggle {
        font-size: 0.72rem;
        padding: 4px 8px;
        border-radius: 5px;
    }

    .contribute-card {
        min-height: 100px;
        padding: 12px 10px;
        border-radius: 10px;
    }

    .contribute-card .prompt-title {
        font-size: 0.85rem;
        margin-bottom: 8px;
        gap: 5px;
    }

    .contribute-card .prompt-content {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .contribute-card .contributor-badge {
        padding: 4px 8px;
        font-size: 0.68rem;
    }

    .modal {
        width: calc(100% - 12px);
        padding: 14px;
        border-radius: 10px;
        max-height: 88vh;
        max-height: 88dvh;
    }

    .modal-title {
        font-size: 1rem;
        padding-right: 36px;
    }

    .modal-content {
        font-size: 0.825rem;
        line-height: 1.45;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .modal-copy-button {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .modal-chat-button,
    .modal-embed-button {
        font-size: 0.825rem;
        padding: 8px 12px;
        min-height: 40px;
    }

    .site-footer {
        padding: 10px 12px;
        padding-bottom: calc(10px + var(--safe-area-bottom));
        min-height: 44px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-section h3 {
        font-size: 0.78rem;
        margin-bottom: 4px;
    }

    .footer-section p {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .book-link {
        padding: 4px 8px;
        font-size: 0.72rem;
        min-height: 36px;
    }

    /* Extra small main content */
    .main-content {
        padding: 8px;
        padding-top: 0;
    }

    .main-content-header {
        padding: 6px 10px;
        margin: 0 -4px 10px -4px;
    }

    .main-content-header .header-description {
        font-size: 0.8rem;
    }
}

.dark-mode .modal-footer {
    border-color: #2d2d2d;
}

.github-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.dark-mode .github-inputs {
    color: var(--text-color-dark);
}

.dark-mode .github-input {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
    border-color: #2d2d2d;
}

.create-yaml-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.create-yaml-button:hover {
    background-color: #0e9f71;
}

/* ===== Blog Promo Section on Main Page ===== */
.blog-promo-section {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
}

.dark-mode .blog-promo-section {
    border-top-color: var(--border-color-dark);
}

.blog-promo-header {
    text-align: center;
    margin-bottom: 32px;
}

.blog-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-bottom: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dark-mode .blog-promo-badge {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.blog-promo-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-promo-subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin: 0;
}

.blog-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.blog-promo-card {
    position: relative;
    display: block;
    padding: 24px;
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    overflow: hidden;
}

.blog-promo-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.dark-mode .blog-promo-card {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
}

.dark-mode .blog-promo-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.blog-promo-card-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 2.5rem;
    font-weight: 900;
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
}

.blog-promo-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: var(--text-color-light);
}

.dark-mode .blog-promo-card-title {
    color: var(--text-color-dark);
}

.blog-promo-card-excerpt {
    font-size: 0.85rem;
    opacity: 0.65;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

.blog-promo-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.blog-promo-date {
    opacity: 0.5;
}

.blog-promo-read {
    color: var(--accent-color);
    font-weight: 600;
    transition: transform 0.2s ease;
    display: inline-block;
}

.blog-promo-card:hover .blog-promo-read {
    transform: translateX(3px);
}

.blog-promo-cta {
    text-align: center;
}

.blog-promo-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent-color), #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.blog-promo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

@media (max-width: 640px) {
    .blog-promo-grid {
        grid-template-columns: 1fr;
    }

    .blog-promo-section {
        padding: 24px 16px;
    }

    .blog-promo-title {
        font-size: 1.4rem;
    }
}