:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-bg: #0a0a0a;
    --card-bg: #111111;
    --surface-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --blur-bg: saturate(180%) blur(20px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 87, 108, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(240, 147, 251, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Container */
.wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: var(--blur-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

.logo {
    text-align: center;
}

.logo-text {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.logo-text:hover::after {
    transform: scaleX(1);
}

/* Mobile Menu Toggle - Arrow Style */
.menu-toggle {
    display: none;
    position: absolute;
    right: 0;
    background: var(--surface-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--hover-bg);
    border-color: rgba(102, 126, 234, 0.3);
}

.menu-toggle-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid var(--text-primary);
    transition: transform 0.3s ease;
}

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

/* Navigation */
.nav-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.search-wrapper {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-field {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    background: var(--surface-bg);
    border: 2px solid transparent;
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-field:focus {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.5;
    pointer-events: none;
}

.nav-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-pill {
    padding: 0.625rem 1.5rem;
    background: var(--surface-bg);
    border: 2px solid transparent;
    border-radius: 100px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-pill span {
    position: relative;
    z-index: 1;
}

.nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.nav-pill.active {
    background: var(--primary-gradient);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-pill.active::before {
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.content-wrapper {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Horizontal Masonry Grid */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.grid-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.grid-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.item-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.media-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
}

.media-image {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item:hover .media-image {
    transform: scale(1.08);
    filter: brightness(0.7);
}

.media-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.grid-item.has-video:hover .media-video {
    opacity: 1;
}

/* Content Overlay */
.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.7) 50%, 
        transparent 100%);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-item:hover .content-overlay {
    transform: translateY(0);
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Badges */
.badge-container {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.badge {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-video {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.badge-new {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.625rem 1rem;
    background: var(--surface-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.page-btn:hover:not(.page-current):not(.page-disabled) {
    background: var(--hover-bg);
    border-color: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.page-current {
    background: var(--primary-gradient);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.page-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 0.5rem;
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, transparent, rgba(17, 17, 17, 0.5));
    backdrop-filter: blur(10px);
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.footer-link:hover::after {
    transform: scaleX(1);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.media-image.loading {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    animation: pulse 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .masonry-column:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 1024px) {
    .masonry-column:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0.75rem 1rem;
    }
    
    .header-top {
        margin-bottom: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-container {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        margin-top: 0;
    }
    
    .nav-container.active {
        max-height: 400px;
        opacity: 1;
        margin-top: 1rem;
    }
    
    .masonry-column:nth-child(n+3) {
        display: none;
    }
    
    .grid-item {
        border-radius: 8px;
    }
    
    .content-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, 
            rgba(0,0,0,0.9) 0%, 
            rgba(0,0,0,0.5) 60%, 
            transparent 100%);
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .item-title {
        font-size: 0.85rem;
    }
    
    .item-meta {
        font-size: 0.75rem;
    }
    
    
}

@media (max-width: 480px) {
    .masonry-column:nth-child(n+2) {
        display: none;
    }
    
    .masonry-grid {
        gap: 0.5rem;
    }
    
    .content-wrapper {
        padding: 0 0.5rem;
    }
    
    .grid-item {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .content-overlay {
        padding: 1.25rem 1rem 1rem;
        background: linear-gradient(to top, 
            rgba(0,0,0,0.98) 0%, 
            rgba(0,0,0,0.8) 40%, 
            rgba(0,0,0,0.4) 70%, 
            transparent 100%);
    }
    
    .item-title {
        font-size: 0.95rem;
        font-weight: 700;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    }
    
    .badge {
        padding: 0.2rem 0.6rem;
        font-size: 0.65rem;
    }
    
    .pagination-wrapper {
        padding: 0 1rem;
        gap: 0.25rem;
    }
    
    .page-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-width: 38px;
    }
    
    /* Hide pagination elements on mobile */
    .page-btn:not(.page-nav):not(.page-current) {
        display: none;
    }
    
    .page-dots {
        display: none;
    }
    
    .menu-toggle-arrow {
        border-left-width: 8px;
        border-right-width: 8px;
        border-top-width: 10px;
    }
}

/* Smooth Scroll */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .grid-item {
        -webkit-tap-highlight-color: transparent;
    }
    
    .content-overlay {
        transform: translateY(0);
    }
    
    .grid-item:active {
        transform: scale(0.98);
    }
}

/* SVG Icons */
.search-icon {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.meta-icon {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: inline-block;
    vertical-align: middle;
}