/* Ben's Bites Light Theme */
:root {
    --bites-red: #ff6b6b;
    --bites-red-dark: #e55656;
    --bites-red-light: #ffcccc;
    --bites-red-hover: #ff8888;
    --bites-green: #71b771;
    --bites-green-dark: #74b974;
    --bites-bg: #f8f9fa;
    --bites-card-bg: #ffffff;
    --bites-border: #e9ecef;
    --bites-text: #212529;
    --bites-text-muted: #6c757d;
    --bites-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bites-bg);
    color: var(--bites-text);
    line-height: 1.6;
}

/* Typography */
.bites-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--bites-text);
    position: relative;
}

.bites-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--bites-red), var(--bites-red-dark));
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: var(--bites-text);
    border-bottom: 2px solid var(--bites-red-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Navigation */
.bites-nav {
    background: var(--bites-card-bg) !important;
    border-bottom: 2px solid var(--bites-red-light);
    box-shadow: var(--bites-shadow);
}

.bites-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--bites-red-dark) !important;
    text-decoration: none;
}

.bites-brand:hover {
    color: var(--bites-red-hover) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--matrix-text) !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--bites-red-dark) !important;
}

/* Search */
.bites-search {
    border: 1px solid var(--bites-border);
    border-radius: 5px 0 0 5px;
    font-family: 'JetBrains Mono', monospace;
}

.bites-search:focus {
    border-color: var(--bites-green-dark);
    box-shadow: 0 0 0 0.2rem rgba(144, 238, 144, 0.5);
}

.search-container:focus-within {
    box-shadow: 0 0 10px rgba(144, 238, 144, 0.6);
    border-radius: 5px;
}

.search-container:focus-within .bites-search {
    box-shadow: none;
}

.search-container:focus-within .search-btn {
    box-shadow: none;
}

.search-btn {
    color: var(--bites-green-dark);
    border-color: var(--bites-green-dark);
}

.search-btn:hover {
    background-color: var(--bites-green-dark);
    border-color: var(--bites-green-dark);
    color: white;
}

/* Cards */
.bites-card {
    background: var(--bites-card-bg);
    border: 1px solid var(--bites-border);
    border-radius: 8px;
    box-shadow: var(--bites-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bites-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(90deg, var(--bites-red), var(--bites-red-dark));
}

.bites-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.bites-section {
    background: var(--bites-card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--bites-shadow);
    margin-bottom: 30px;
    border: 1px solid var(--bites-border);
}

/* Buttons */
.btn-success {
    background-color: var(--bites-red);
    border-color: var(--bites-red);
    font-weight: 500;
}

.btn-success:hover {
    background-color: var(--bites-red-hover);
    border-color: var(--bites-red-hover);
}

.btn-outline-success {
    color: var(--bites-red);
    border-color: var(--bites-red);
    font-weight: 500;
}

.btn-outline-success:hover {
    background-color: var(--bites-red);
    border-color: var(--bites-red);
    color: white;
}

.btn-primary {
    background-color: var(--bites-text);
    border-color: var(--bites-text);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--bites-text-muted);
    border-color: var(--bites-text-muted);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-buttons .btn {
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--bites-red);
    color: var(--bites-text);
    background: white;
    height: 36px;
}

.filter-buttons .btn:hover,
.filter-buttons .btn.active {
    background-color: var(--bites-red);
    border-color: var(--bites-red);
    color: white;
}

.filter-buttons .btn:hover {
    background-color: var(--bites-red-hover);
    border-color: var(--bites-red-hover);
}

/* Sort buttons - ensure red color scheme */
.btn-group .btn-success {
    background-color: var(--bites-red);
    border-color: var(--bites-red);
    color: white;
}

.btn-group .btn-success:hover {
    background-color: var(--bites-red-hover);
    border-color: var(--bites-red-hover);
}

.btn-group .btn-outline-success {
    color: var(--bites-red);
    border-color: var(--bites-red);
    background-color: white;
}

.btn-group .btn-outline-success:hover {
    background-color: var(--bites-red);
    border-color: var(--bites-red);
    color: white;
}

/* Click Indicators */
.click-indicator {
    text-align: right;
    min-width: 80px;
}

.click-count {
    background-color: var(--bites-red);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
}

.click-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--bites-red), var(--bites-red-dark));
    border-radius: 2px;
    margin-top: 4px;
    transition: width 0.3s ease;
}

.click-bar-small {
    height: 3px;
    background: linear-gradient(90deg, var(--bites-red), var(--bites-red-dark));
    border-radius: 1px;
    transition: width 0.3s ease;
}

/* Trending Links */
.trending-link {
    padding: 15px;
    background: var(--bites-bg);
    border-radius: 8px;
    border: 1px solid var(--bites-border);
    transition: all 0.3s ease;
}

.trending-link:hover {
    background: var(--bites-card-bg);
    box-shadow: var(--bites-shadow);
}

/* Featured Section */
.featured-scroll {
    overflow-x: auto;
    padding-bottom: 10px;
}

.featured-scroll::-webkit-scrollbar {
    height: 8px;
}

.featured-scroll::-webkit-scrollbar-track {
    background: var(--bites-bg);
    border-radius: 4px;
}

.featured-scroll::-webkit-scrollbar-thumb {
    background: var(--bites-red-light);
    border-radius: 4px;
}

.featured-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--bites-red-dark);
}

.featured-card {
    min-height: 200px;
    margin-right: 15px;
}

.featured-card .btn-primary {
    background-color: var(--bites-red);
    border-color: var(--bites-red);
    color: white;
    font-weight: 500;
}

.featured-card .btn-primary:hover {
    background-color: var(--bites-red-hover);
    border-color: var(--bites-red-hover);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bites-card-bg), var(--bites-bg));
    padding: 60px 0;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ccffcc" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

.hero-section .display-4 {
    position: relative;
    z-index: 1;
}

.hero-section .lead {
    position: relative;
    z-index: 1;
    color: var(--bites-text-muted);
}

/* Alerts */
.bites-alert {
    background: var(--bites-red-light);
    border-color: var(--bites-red);
    color: var(--bites-text);
}

/* Search Highlights */
.bites-highlight {
    background: var(--bites-red-light);
    color: var(--bites-text);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Badges */
.badge {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.bg-success {
    background-color: var(--bites-green-dark) !important;
}

.bg-secondary {
    background-color: var(--bites-text-muted) !important;
}

/* Loading Spinner */
.spinner-border.text-success {
    color: var(--bites-green-dark) !important;
}



/* Footer */
footer {
    background: var(--bites-card-bg) !important;
    border-top: 2px solid var(--bites-red-light);
    margin-top: 50px;
}

/* Links */
a {
    color: var(--bites-text) !important;
    text-decoration: none !important;
}

a:hover {
    color: var(--bites-text) !important;
    text-decoration: underline !important;
}

/* Navigation links exception */
.navbar-nav .nav-link {
    color: var(--bites-text) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--bites-red-dark) !important;
}

/* Equal height newsletter cards */
.newsletter-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.newsletter-card {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.newsletter-card .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--bites-red);
}

.newsletter-card .card::before {
    display: none;
}

.newsletter-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.newsletter-card .card-title {
    margin-bottom: 1rem;
}

.newsletter-card .card-text {
    margin-bottom: 0.5rem;
}

.newsletter-card .card-text:nth-of-type(2) {
    margin-top: auto;
    margin-bottom: 1rem;
}

.newsletter-card .btn {
    margin-top: auto;
    background-color: white;
    border-color: var(--bites-red);
    color: var(--bites-red);
    font-weight: 500;
}

.newsletter-card .btn:hover {
    background-color: var(--bites-red-hover);
    border-color: var(--bites-red-hover);
    color: white;
}

/* Dropdown for other sections */
.dropdown-toggle::after {
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--bites-border);
    box-shadow: var(--bites-shadow);
}

.dropdown-item {
    color: var(--bites-text);
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: var(--bites-bg);
    color: var(--bites-text);
}

.dropdown-item.active {
    background-color: var(--bites-green-dark);
    color: white;
}

/* Explore Page Styles */
.explore-card {
    position: relative;
    margin-bottom: 1rem;
}

.explore-card .card-body {
    padding: 1.5rem;
}

.explore-card .content-meta {
    color: var(--bites-green-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.explore-card .card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.explore-card .visit-btn {
    background-color: transparent;
    border: 1px solid var(--bites-red);
    color: var(--bites-red);
    font-weight: 500;
}

.explore-card .visit-btn:hover {
    background-color: var(--bites-red-hover);
    border-color: var(--bites-red-hover);
    color: white;
}

.explore-card .click-count-bottom {
    background-color: var(--bites-red);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
}

.subtle-note {
    color: var(--bites-green-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.content-meta {
    color: var(--bites-green-dark) !important;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bites-section {
        padding: 20px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .featured-scroll {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .newsletter-cards {
        flex-direction: column;
    }
    
    .newsletter-card {
        min-width: 100%;
    }
}

/* Grid Pattern Background */
.bites-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="smallgrid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23f0f0f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23smallgrid)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
}

/* Ensure content stays above background */
.bites-section > * {
    position: relative;
    z-index: 1;
}
