/* MediaSnap.ai - Common Page Styles */
/* Shared styles for all pages */

/* CSS Variables - inherits from style-main.css */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099cc;
    --background-dark: #0a0a0a;
    --background-darker: #050505;
    --danger-color: #ff4757;
}

/* Additional variables that should use style-main.css variables */
body {
    --surface-color: var(--bg-surface);
    --border-color: var(--border-color);
}

body.light-mode {
    --background-dark: #f5f5f5;
    --background-darker: #e8e8e8;
    --danger-color: #dc2626;
}

/* Page Header - Common for all pages */
.page-header,
.library-header,
.profile-header,
.settings-header,
.subscription-header {
    width: 100%;
    max-width: none;
    padding: 10px 0 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

/* Container max-width for better readability on large screens */
.profile-header .container,
.settings-header .container,
.subscription-header .container,
.profile-content .container,
.settings-content .container,
.subscription-content .container {
    max-width: 1200px; /* 75% of 1600px typical large screen */
    margin: 0 auto;
    width: 100%;
}

/* Generic Content Section */
.content-section {
    padding: 10px 0;
    width: 100%;
}

.content-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-section h2 i {
    color: var(--primary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.header-left {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.header-right {
    flex-shrink: 0;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(102, 126, 234, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.3) 50%,
        transparent
    );
}

.page-title i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

.page-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.6;
    text-align: left;
    margin: 0;
}

/* Controls Section - Common for filter + search in one row */
.library-controls,
.page-controls {
    padding: 40px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.controls-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.controls-grid .filter-section {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.controls-grid .search-section {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

/* Ensure search-section in filter-bar keeps items on same row */
.filter-bar .search-section {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Old Filter Section - for pages not yet updated */
.filter-section {
    background: var(--bg-primary);
}

.filter-controls,
.filter-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000000;
    border-color: transparent;
    font-weight: 600;
}

/* Search Controls - Common search UI */
.search-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

/* Common Container - Optimized width for large screens */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Community creations section - use 1800px on large screens like other sections */
@media (min-width: 1400px) {
    .community-creations-section .container {
        max-width: 1800px !important;
    }
    
    /* Library section - use 1800px for 5 columns */
    .content-section .container {
        max-width: 1800px !important;
    }
}

/* Common Section */
.page-section {
    padding: 60px 0;
    background: var(--background-dark);
}

/* Common Grid Layouts - Full width grids for all content sections */
/* Generic Content Grid */
.content-grid,
.models-grid,
.posts-grid,
.workflows-grid,
.tools-grid,
.articles-grid,
.events-grid,
.media-grid,
.templates-grid {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

/* Masonry Grid for User Generations - HORIZONTAL Loading (Left to Right) */
.content-grid.masonry-grid {
    padding: 0 20px;
    max-width: 100%;
    width: 100%;
}

.content-grid.masonry-grid .masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    width: calc(33.333% - 8px); /* Default 3 columns */
    margin-bottom: 12px;
    /* Animation properties */
    opacity: 0;
    transform: scale(0.6) translateY(20px);
}

/* Medium screens - 4 columns */
@media (min-width: 1200px) and (max-width: 1399px) {
    .content-grid.masonry-grid .masonry-item {
        width: calc(25% - 9px); /* 4 columns */
    }
    
    .content-grid.masonry-grid .masonry-item-landscape {
        width: calc(50% - 4.5px);
    }
}

/* Large screens - 5 columns override (must come after base rule) */
@media (min-width: 1400px) {
    /* Force content-wrapper to 1800px */
    .content-container .content-wrapper {
        max-width: 1800px !important;
        width: 100% !important;
    }
    
    /* Force masonry grid to use full width in both container and content-wrapper */
    .content-wrapper .content-grid.masonry-grid,
    .container .content-grid.masonry-grid {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 5 columns layout - items made bigger by reducing gap */
    .content-grid.masonry-grid .masonry-item {
        width: calc(20% - 7.2px) !important;
        min-width: 0 !important;
    }
    
    .content-grid.masonry-grid .masonry-item-landscape {
        width: calc(40% - 3.6px) !important;
    }
}

/* Animated state when item becomes visible */
.content-grid.masonry-grid .masonry-item.show-item {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Hover effect only after animation */
.content-grid.masonry-grid .masonry-item.show-item:hover {
    transform: scale(1) translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Landscape items - 2x width */
.content-grid.masonry-grid .masonry-item-landscape {
    width: calc(66.666% - 4px);
}

.content-grid.masonry-grid .masonry-item-landscape img,
.content-grid.masonry-grid .masonry-item-landscape video {
    object-fit: contain !important;
    width: 100% !important;
    height: auto !important;
}

/* Hover effect moved to .show-item:hover above */

/* Responsive masonry */
@media (max-width: 1200px) {
    .content-grid.masonry-grid .masonry-item {
        width: calc(50% - 6px);
    }
    
    .content-grid.masonry-grid .masonry-item-landscape {
        width: calc(100% - 0px);
    }
}

@media (max-width: 768px) {
    .content-grid.masonry-grid {
        padding: 0 12px;
    }
    
    .content-grid.masonry-grid .masonry-item {
        width: calc(50% - 6px);
    }
    
    .content-grid.masonry-grid .masonry-item-landscape {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .content-grid.masonry-grid .masonry-item {
        width: 100%;
    }
    
    .content-grid.masonry-grid .masonry-item-landscape {
        width: 100%;
    }
}


.content-grid.masonry-grid .masonry-item img,
.content-grid.masonry-grid .masonry-item video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Trends page - make media full height (only for items with trends-overlay) */
.content-grid.masonry-grid .masonry-item:has(.trends-overlay) {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    position: relative; /* Maintain positioning for overlay */
}

.content-grid.masonry-grid .masonry-item:has(.trends-overlay) > img,
.content-grid.masonry-grid .masonry-item:has(.trends-overlay) > video,
.content-grid.masonry-grid .masonry-item:has(.trends-overlay) > .trend-image-placeholder {
    flex: 1;
    min-height: 400px;
    height: 100%;
    object-fit: cover;
    width: 100%;
    border-radius: 12px;
}

.content-grid.masonry-grid .masonry-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-grid.masonry-grid .masonry-item:hover .masonry-item-overlay {
    opacity: 1;
}

.content-grid.masonry-grid .masonry-item-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.content-grid.masonry-grid .masonry-item-user i {
    font-size: 12px;
    color: #00d4ff;
}

.content-grid.masonry-grid .masonry-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
}

.content-grid.masonry-grid .masonry-tag {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.content-grid.masonry-grid .masonry-tag-more {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.content-grid.masonry-grid .masonry-item-stats {
    display: flex;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

.content-grid.masonry-grid .masonry-item-stats i {
    margin-right: 4px;
    color: #00d4ff;
}



.content-grid.masonry-grid .masonry-item-badge {
    position: absolute;
    top: 32px;
    left: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Model Stats */
.model-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.model-stats span,
.model-stats .stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.model-stats span i,
.model-stats .stat i {
    font-size: 14px;
    color: var(--primary-color);
}

.model-stats span i.fa-heart,
.model-stats .stat i.fa-heart {
    color: #544e4f ;
}

/* Favorite Button */
.favorite-btn,
.model-card .favorite-btn,
.masonry-item .favorite-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 8px;
}

.favorite-btn:hover,
.model-card .favorite-btn:hover,
.masonry-item .favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn:focus,
.favorite-btn:active,
.favorite-btn:focus-visible,
.model-card .favorite-btn:focus,
.model-card .favorite-btn:active,
.model-card .favorite-btn:focus-visible,
.masonry-item .favorite-btn:focus,
.masonry-item .favorite-btn:active,
.masonry-item .favorite-btn:focus-visible {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    box-shadow: none !important;
    border: none !important;
}

.favorite-btn i,
.model-card .favorite-btn i,
.masonry-item .favorite-btn i {
    color: rgba(0, 0, 0, 0.5);
    font-size: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important; /* Solid */
}

.favorite-btn:hover i,
.model-card .favorite-btn:hover i,
.masonry-item .favorite-btn:hover i {
    color: rgba(0, 0, 0, 0.7);
}

.favorite-btn.favorited i,
.model-card .favorite-btn.favorited i,
.masonry-item .favorite-btn.favorited i {
    color: rgba(255, 60, 60, 0.9);
    font-weight: 900 !important; /* Solid */
}

.favorite-btn.favorited:hover i,
.model-card .favorite-btn.favorited:hover i,
.masonry-item .favorite-btn.favorited:hover i {
    color: rgba(255, 80, 80, 1);
}

/* Responsive grid columns - optimized for 1400px container (4 columns) */
.content-grid,
.models-grid,
.workflows-grid,
.tools-grid,
.events-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.posts-grid,
.articles-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Media grid and Templates grid have specific column count (from library) - optimized for 1400px */
.media-grid,
.templates-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Responsive adjustments for all grids */
@media (max-width: 1024px) {
    .content-grid,
    .models-grid,
    .workflows-grid,
    .tools-grid,
    .events-grid,
    .posts-grid,
    .articles-grid,
    .media-grid,
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-grid,
    .models-grid,
    .workflows-grid,
    .tools-grid,
    .events-grid,
    .posts-grid,
    .articles-grid,
    .media-grid,
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For 1200px constrained container, 3 columns is optimal */

@media (max-width: 480px) {
    .content-grid,
    .models-grid,
    .workflows-grid,
    .tools-grid,
    .events-grid,
    .posts-grid,
    .articles-grid,
    .media-grid,
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
       /* padding: 80px 0 40px; */
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .filter-section {
        padding: 30px 0;
    }
    
    .filter-controls {
        gap: 12px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .container,
    .container-centered {
        padding: 0 16px;
    }
    
    .controls-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .controls-grid .filter-section {
        display: flex;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .controls-grid .filter-section::-webkit-scrollbar {
        display: none;
    }
    
    .filter-controls,
    .filter-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
        gap: 8px;
        padding: 0 4px;
    }
    
    .filter-controls::-webkit-scrollbar,
    .filter-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        flex-grow: 0;
        padding: 10px;
        font-size: 16px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        max-width: 44px;
        max-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .filter-btn i {
        margin: 0;
    }
    
    .controls-grid .search-section {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .filter-btn {
        padding: 10px 12px;
    }
}

/* Loading and Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

/* Create Cards Section */
.create-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 40px 0;
    padding: 0 20px;
}

/* AI Models Section - Dynamic grid to show models in approximately 2 rows */
.ai-models-section .content-grid.ai-models-grid {
    display: grid;
    gap: 16px;
    margin: 40px 0;
    padding: 0;
}

/* AI models grid - 4 columns for 1400px container */
.ai-models-section .content-grid.ai-models-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Responsive adjustments for AI models grid */
@media (max-width: 1024px) {
    .ai-models-section .content-grid.ai-models-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .ai-models-section .content-grid.ai-models-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ai-models-section .content-grid.ai-models-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Model Banner Styles */
.model-banner {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.05);
}

.model-icon-fallback {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px 8px 0 0;
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
}

/* Community Creations Section - Normal grid with infinite scroll */
.community-creations-section .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 40px 0;
    padding: 0;
    /* No row limit - allow infinite scroll */
}

/* General content grid (fallback) - no restrictions */
.content-section .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 40px 0;
    padding: 0;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: #00d4ff;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(0, 212, 255, 0.05);
}

.view-all-link:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.view-all-link i {
    transition: transform 0.3s ease;
}

.view-all-link:hover i {
    transform: translateX(4px);
}

.create-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.create-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.create-card-bg-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) rotate(-15deg);
    font-size: 120px;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
    pointer-events: none;
}

body.light-mode .create-card-bg-icon {
    color: rgba(0, 0, 0, 0.03);
}

.create-card h3 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.create-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.create-card .btn {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.create-card .btn:hover {
    background: linear-gradient(135deg, #0099cc, #007aa3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
}

/* Specific card styles */
.create-image-card .create-card-bg-icon {
    color: rgba(255, 255, 255, 0.03);
}

body.light-mode .create-image-card .create-card-bg-icon {
    color: rgba(0, 0, 0, 0.03);
}

.create-video-card .create-card-bg-icon {
    color: rgba(255, 255, 255, 0.03);
}

body.light-mode .create-video-card .create-card-bg-icon {
    color: rgba(0, 0, 0, 0.03);
}

.create-audio-card .create-card-bg-icon {
    color: rgba(255, 255, 255, 0.03);
}

body.light-mode .create-audio-card .create-card-bg-icon {
    color: rgba(0, 0, 0, 0.03);
}

/* Responsive */
@media (max-width: 768px) {
    .create-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 20px 0;
        padding: 0 16px;
    }
    
    .create-card {
        padding: 24px;
    }
    
    .create-card-bg-icon {
        font-size: 80px;
        right: 16px;
    }
    
    .create-card h3 {
        font-size: 20px;
    }
    
    .create-card p {
        font-size: 14px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        padding: 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .view-all-link {
        align-self: flex-end;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .content-section .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 20px 0;
        padding: 0;
    }
    
    .ai-models-section .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 20px 0;
        padding: 0;
        /* Mobile: single column, all items in one column (multiple rows) */
    }

    .ai-models-section .content-grid.ai-models-grid {
        grid-template-columns: repeat(1, 1fr) !important; /* Mobile'da tek model */
    }
}

/* Loading and Empty States */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state h3 {
    color: var(--text-primary);
    font-size: 24px;
    margin-bottom: 12px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ========================================
   GENERIC CONTENT PAGE STYLES
   Used by library, models, templates, etc.
   ======================================== */

/* Content Header (replaces library-header, models-header, etc.) */
/* Moved to style-main.css for global sticky header */

.header-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Controls (replaces library-controls, page-controls, etc.) */
.content-controls {
    padding: 24px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 70px;
    z-index: 50;
    backdrop-filter: blur(10px);
}

/* Clear Search Button */
.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.clear-search:hover {
    color: var(--text-primary);
}

/* Sort Select */
.sort-select {
    padding: 10px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.sort-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

.sort-select:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.5);
}

/* Content Section (replaces library-content, models-section, etc.) */
.content-section {
    padding: 0px 0 80px;
    background: var(--bg-primary);
    min-height: 60vh;
}

/* Create Button in Empty State */
.content-section .empty-state .create-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.content-section .empty-state .create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-color);
}

/* Auth Prompt (Sign-in/empty state) */
.auth-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    min-height: 400px;
}

/* Override grid layout when auth-prompt is inside library-grid */
.library-grid:has(.auth-prompt) {
    display: block !important;
    grid-template-columns: 1fr !important;
}

.auth-prompt-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 24px;
    opacity: 0.8;
}

.auth-prompt-title {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
}

.auth-prompt-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
    max-width: 500px;
}

.auth-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4);
}

.auth-prompt-btn i {
    font-size: 18px;
}

/* Library Grid - Horizontal Layout (4 columns for 1400px container) */
.library-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px;
    padding: 0 20px;
    max-width: 100%;
    width: 100%;
}

.media-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.media-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.media-thumbnail {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 200px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease;
    object-fit: cover;
    background: #000;
}

.media-card:hover .media-thumbnail img,
.media-card:hover .media-thumbnail video {
    transform: scale(1.05);
}

.audio-placeholder,
.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    font-size: 64px;
    color: var(--primary-color);
}

.media-type-badge,
.masonry-item .media-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    border: 1px solid;
}

/* Video Badge - Blue/Cyan */
.media-type-badge.badge-video {
    background: rgba(59, 130, 246, 0.2);
    color: #c0d8ff;
    border-color: rgba(59, 130, 246, 0.3);
}

.media-type-badge.badge-video i {
    color: #3b82f6;
}

/* Image Badge - Purple */
.media-type-badge.badge-image {
    background: rgba(168, 85, 247, 0.2);
    color: #e5c9ff;
    border-color: rgba(168, 85, 247, 0.3);
}

.media-type-badge.badge-image i {
    color: #a855f7;
}

/* Audio Badge - Orange */
.media-type-badge.badge-audio {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.3);
}

.media-type-badge.badge-audio i {
    color: #f97316;
}

/* Default fallback */
.media-type-badge:not(.badge-video):not(.badge-image):not(.badge-audio) {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.media-type-badge:not(.badge-video):not(.badge-image):not(.badge-audio) i {
    color: var(--primary-color);
}

/* Privacy Badge */
.media-privacy-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.media-privacy-badge.public {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.media-privacy-badge.public i {
    color: #22c55e;
}

.media-privacy-badge.private {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.media-privacy-badge.private i {
    color: #ef4444;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-card:hover .media-overlay {
    opacity: 1;
}

.library-overlay-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.library-media-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: 100%;
}

.library-tag {
    background: var(--bg-secondary);
    color: #00d4ff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.overlay-action-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.overlay-action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.overlay-action-btn.danger:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--danger-color);
}

.media-info {
    padding: 16px;
}

.media-prompt {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

.media-model {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 140px;
}

.media-model i {
    color: var(--primary-color);
    font-size: 11px;
    flex-shrink: 0;
}

.media-model span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 120px;
}

.media-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.media-time i {
    font-size: 11px;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--primary-color);
}

/* Responsive - Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .library-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .library-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        padding: 0 12px;
    }
    
    
    .header-stats {
        width: 100%;
        justify-content: space-around;
        gap: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .media-thumbnail {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .library-grid {
        grid-template-columns: 1fr !important;
    }
    
    .media-thumbnail {
        height: auto;
    }
}

/* =====================
   TRENDS PAGE STYLES
   ===================== */

/* Trends overlay - always visible with gradient background */
.trends-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    opacity: 1 !important;
    pointer-events: auto;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transition: background 0.3s ease;
    border-radius: 12px;
}

/* Remove background on hover */
.masonry-item:hover .trends-overlay {
    background: transparent;
}

/* Trends info section */
.trends-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trends-title {
    color: white;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.trends-category {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Trends actions section */
.trends-actions {
    display: flex;
    gap: 8px;
}

.trends-btn-use {
    flex: 1;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.trends-btn-use:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.trends-btn-details {
    flex: 1;
    padding: 6px 12px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    backdrop-filter: blur(4px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.trends-btn-details::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.trends-btn-details:hover {
    transform: translateY(-2px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.5);
}


