:root {
    --color-bg: #0a0a0f;
    --color-surface: #16161d;
    --color-surface-elevated: #1e1e28;
    --color-primary: #ff6b9d;
    --color-accent: #7ed957;
    --color-text: #e8e8f0;
    --color-text-muted: #9a9aaa;
    --color-border: #2a2a35;
    
    --font-display: 'Darker Grotesque', sans-serif;
    --font-body: 'Crimson Pro', serif;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Grain texture overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* Header */
.site-header {
    background: rgba(22, 22, 29, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.logo-subtitle {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--color-primary);
    transition: transform var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.update-btn {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), #ff8fb5);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.update-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.update-btn:active {
    transform: translateY(0);
}

.update-btn svg {
    animation: rotate 2s linear infinite paused;
}

.update-btn:hover svg {
    animation-play-state: running;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out;
}

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

.search-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.search-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.search-box {
    display: flex;
    gap: 1rem;
    position: relative;
}

#searchInput {
    flex: 1;
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    background: var(--color-surface-elevated);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    outline: none;
    transition: all var(--transition-base);
}

#searchInput:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.search-submit {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--color-accent), #3eb8b0);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.search-results {
    margin-top: 2rem;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Anime Grid */
.anime-grid-section {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.anime-count {
    font-weight: 700;
    color: var(--color-accent);
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.anime-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    animation: scaleIn 0.4s ease-out both;
}

.anime-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.anime-card-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--color-surface-elevated), var(--color-surface));
}

.anime-card-content {
    padding: 1.25rem;
}

.anime-card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.anime-card-meta {
    display: flex;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.anime-card-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-finished {
    background: rgba(78, 205, 196, 0.2);
    color: var(--color-accent);
}

.status-airing {
    background: rgba(255, 107, 157, 0.2);
    color: var(--color-primary);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger animation for grid items */
.anime-card:nth-child(1) { animation-delay: 0.1s; }
.anime-card:nth-child(2) { animation-delay: 0.15s; }
.anime-card:nth-child(3) { animation-delay: 0.2s; }
.anime-card:nth-child(4) { animation-delay: 0.25s; }
.anime-card:nth-child(5) { animation-delay: 0.3s; }
.anime-card:nth-child(6) { animation-delay: 0.35s; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: rotate(90deg);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 3000;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Footer */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    margin-top: 5rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    font-family: var(--font-display);
    color: var(--color-text-muted);
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .search-container {
        padding: 2rem 1.5rem;
    }
    
    .search-title {
        font-size: 2rem;
    }
}

/* PAGE SYSTEM - CRITICAL */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* TOGGLE SLIDER */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* STYLED DROPDOWN SELECT */
select {
    background: var(--color-surface) !important;
    color: white !important;
    border: 2px solid var(--color-border) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 12px !important;
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

select:hover {
    border-color: var(--color-accent) !important;
    background: var(--color-surface-elevated) !important;
}

select:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
}

/* STREAMING LINK BUTTONS */
.streaming-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), #ff8fb5);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.streaming-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

/* MANGA LINK BUTTONS */
.manga-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-accent), #a4f0a1);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(126, 217, 87, 0.3);
}

.manga-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(126, 217, 87, 0.4);
}

/* CONTENT TREE STRUCTURE */
.content-tree {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.content-tree-header {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-tree-header:hover {
    color: var(--color-primary);
}

.tree-arrow {
    transition: transform 0.3s;
}

.tree-arrow.expanded {
    transform: rotate(90deg);
}

.tree-section {
    margin-left: 1.5rem;
    border-left: 2px solid var(--color-border);
    padding-left: 1rem;
    margin-top: 0.75rem;
}

.tree-section-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tree-item {
    padding: 0.5rem 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.tree-item:hover {
    color: white;
}

/* GENRE TAG FILTERS */
.genre-tag-selectable {
    display: inline-block;
    background: rgba(126, 217, 87, 0.2);
    color: var(--color-accent);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.genre-tag-selectable:hover {
    background: rgba(126, 217, 87, 0.3);
    transform: translateY(-2px);
}

.genre-tag-selectable.selected {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(126, 217, 87, 0.4);
}

/* WEEK NAVIGATION BUTTONS */
.week-nav-btn {
    background: linear-gradient(135deg, var(--color-primary), #ff8fb5);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.week-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

/* BEAUTIFUL BADGE SYSTEM */
.badge {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* TsuMePlz Score Badge - Golden */
.badge-tsumeplz {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* AniList Score Badge - Pink/Green gradient */
.badge-anilist {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
}

/* Genre Badges - Green themed */
.badge-genre {
    background: linear-gradient(135deg, var(--color-accent), #a4f0a1);
    color: var(--color-bg);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin: 0.25rem;
}

/* Streaming Badge - Green */
.badge-streaming {
    background: linear-gradient(135deg, #00d084, #00e896);
    color: white;
    margin: 0.5rem;
    text-decoration: none;
    display: inline-block;
}

.badge-streaming:hover {
    background: linear-gradient(135deg, #00e896, #00ffa8);
}

/* Status Badge */
.badge-status {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Episode Count Badge */
.badge-episodes {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ENHANCED DROPDOWN STYLING */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-elevated)) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%237ed957' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    color: white !important;
    border: 2px solid var(--color-border) !important;
    padding: 0.85rem 3rem 0.85rem 1.5rem !important;
    border-radius: 12px !important;
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

select:hover {
    border-color: var(--color-accent) !important;
    background: linear-gradient(135deg, var(--color-surface-elevated), var(--color-surface)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(126, 217, 87, 0.3) !important;
}

select:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2) !important;
}

select option {
    background: var(--color-surface);
    color: white;
    padding: 0.75rem;
}

/* Genre Tags Container */
#genreTags {
    padding: 1rem;
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

/* HORIZONTAL WEEK CALENDAR */
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.calendar-day {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.calendar-day.today {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 157, 0.3);
}

.calendar-day-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

.day-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.day-date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.calendar-releases {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.calendar-anime-item {
    background: var(--color-surface);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid var(--color-accent);
}

.calendar-anime-item:hover {
    background: var(--color-surface-elevated);
    transform: translateX(4px);
    border-left-color: var(--color-primary);
}

.calendar-anime-title {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.calendar-anime-ep {
    font-size: 0.85rem;
    color: var(--color-accent);
}

.calendar-anime-time {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.no-releases {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

/* Override today to be green instead of pink */
.calendar-day.today {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 2px rgba(126, 217, 87, 0.3) !important;
}

.calendar-day.today .day-name {
    color: var(--color-accent) !important;
}

/* BLOG PAGE STYLES */
.blog-section {
    padding: 2rem 0;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-post-card {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.2);
    border-color: var(--color-primary);
}

.blog-post-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.blog-post-content {
    padding: 1.5rem;
}

.blog-post-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-post-preview {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-new-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: var(--font-display);
}

/* Full blog post view */
.blog-full-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-full-image {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.back-btn {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(-4px);
}

.blog-post-content-full {
    color: var(--color-text);
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Comments section */
.blog-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-family: var(--font-body);
    margin-bottom: 1rem;
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-form button:hover {
    background: #ff8db5;
    transform: translateY(-2px);
}

.comment {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-header strong {
    color: var(--color-primary);
}

.comment-header span {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.comment p {
    color: var(--color-text);
    line-height: 1.6;
}

.comment button {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.comment button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* BLOG PAGE STYLES - FIXED */
.blog-section {
    padding: 2rem 0;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-post-card {
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(255, 107, 157, 0.3);
    border-color: var(--color-primary);
}

.blog-new-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--color-primary), #ff8db5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: var(--font-display);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.blog-post-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.blog-post-content {
    padding: 1.5rem;
}

.blog-post-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.blog-post-preview {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Make first blog card (newest) span 2 columns and be taller */
.blog-post-card:first-child {
    grid-column: span 2;
}

.blog-post-card:first-child .blog-post-image {
    height: 450px;
}

.blog-post-card:first-child .blog-post-title {
    font-size: 2.2rem;
}

.blog-post-card:first-child .blog-post-preview {
    font-size: 1.1rem;
}

/* Responsive: on smaller screens, first card takes full width */
@media (max-width: 768px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post-card:first-child {
        grid-column: span 1;
    }
}

/* Full blog post styling */
#blogFullPost {
    animation: fadeIn 0.3s ease;
}

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

.blog-full-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2rem;
}

#blogFullPost .blog-post-title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

#blogFullPost .blog-post-content {
    color: var(--color-text);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}
