/* /themes/default/assets/css/style.css */

/* CSS Variables */
:root {
    --bg-primary: #1a1d23;
    --bg-secondary: #252830;
    --bg-tertiary: #2d313a;
    --bg-card: #252830;
    --bg-card-hover: #2d313a;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #8b8d91;
    --border-color: #3e4249;
    --accent-primary: #ef4444;
    --accent-secondary: #fbbf24;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --online-indicator: #10b981;
    --offline-indicator: #6b7280;
    
    --header-height: 60px;
    --header-height-mobile: 45px; /* MOBILE OPTIMIZATION: Smaller header */
    --sidebar-width: 320px;
    --card-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

body.filters-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--text-primary);
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-primary);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    gap: 0.5rem;
    justify-content: center;
}

.mobile-nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    transition: var(--transition);
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.875rem;
}

.mobile-nav-link:hover {
    color: var(--accent-primary);
    background: var(--bg-primary);
}

/* Mobile Filter Toggle */
.filter-toggle-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 3px;
    position: absolute;
    left: 1rem;
    z-index: 10;
}

.filter-toggle-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.filter-toggle-btn:hover span {
    background: var(--accent-primary);
}

/* Main Layout */
.main-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.content-area {
    flex: 1;
    padding: 2rem;
}

.sidebar {
    width: 320px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    position: static;
    overflow: visible;
}

/* Unified Models Section */
.models-section {
    margin-bottom: 3rem;
}

.models-section:not(:last-child) {
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

/* Section Headers - Unified styling */
.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--accent-primary);
}

.section-title .country-flag-title {
    width: 28px !important;
    height: auto;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
}

/* Models Grid - Base definition (overridden by landscape/portrait specific classes) */
.models-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fallback for browsers that don't support CSS custom properties */
    gap: 1rem; /* OPTIMIZED: Reduced from 1.5rem for bigger thumbnails */
    margin-bottom: 2rem;
    margin-left: 0; /* Remove any default left margin */
    margin-right: 0; /* Remove any default right margin */
    padding-left: 0; /* Remove any default left padding */
    padding-right: 0; /* Remove any default right padding */
}

/* Hide mobile model name overlay on desktop */
.model-name-mobile {
    display: none !important; /* Hidden by default on desktop */
}

/* Debug: Ensure model-image-wrapper has proper positioning context */
.model-image-wrapper {
    position: relative !important;
}

/* Model Card - FIXED for consistent layout */
.model-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.model-card:hover .model-overlay {
    opacity: 1;
}

.model-card:hover .model-info {
    transform: translateY(0);
}

.model-card > a {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Model Image Wrapper - FIXED positioning */
.model-image-wrapper {
    position: relative;
    padding-bottom: 133%;
    overflow: hidden;
    background: var(--bg-tertiary);
    /* FIXED: Remove any margin or padding that could cause positioning issues */
    margin: 0;
    padding-top: 0;
    top: 0;
}

.model-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    /* FIXED: Ensure no margin or positioning offset */
    margin: 0;
}

.model-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    /* FIXED: Ensure consistent positioning */
    margin: 0;
    top: 0;
    left: 0;
}

.model-card:hover .model-image {
    transform: scale(1.05);
}

/* Video Stream Fixes */
.model-image-wrapper video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 2 !important;
    border-radius: inherit;
    transition: var(--transition);
    margin: 0 !important;
}

/* Simplified portrait video styles */
.model-image-wrapper video.portrait-preview {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2 !important; /* Higher than background */
}

/* Background div will be created dynamically by JavaScript */
.portrait-background {
    pointer-events: none !important;
    z-index: 1 !important; /* Lower than video */
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    touch-action: none !important;
}

/* ENHANCED: Portrait video background for thumbnail previews with CSS Variable support */
.model-image-wrapper.portrait-preview-mode {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.model-image-wrapper.portrait-preview-mode::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(15px) brightness(0.4) saturate(1.2);
    z-index: 1;
    transform: scale(1.1);
}

/* Prevent any overflow from video elements */
.model-card {
    overflow: hidden;
}

.model-card .model-image-wrapper {
    overflow: hidden;
}

/* Ensure consistent sizing during transitions */
.model-card:hover .model-image-wrapper {
    transform: none;
}

/* Video loading state */
.model-image-wrapper[data-loading="true"] {
    opacity: 0.9;
}

.model-image-wrapper video[data-loading="true"] {
    opacity: 0.8;
}

/* Thumbnail Preview Enhancements */
.model-image {
    transition: opacity 0.2s ease;
}

.model-card[data-loading="true"] .model-image {
    opacity: 0.8;
}

/* Disable thumbnail preview transitions during hover to prevent flicker */
.model-card:hover .model-image {
    transition: none;
}

.model-card:hover video {
    transform: scale(1.05);
}

/* Mobile: Disable thumbnail preview on touch devices */
@media (hover: none) and (pointer: coarse) {
    .model-card {
        pointer-events: auto;
    }
}

/* Status Indicator */
.model-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10 !important;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-online .status-dot {
    background: var(--online-indicator);
}

.status-offline .status-dot {
    background: var(--offline-indicator);
}

.status-private {
    color: #c084fc !important; /* Light purple text */
}

.status-private .status-dot {
    background: #c084fc; /* Light purple dot */
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Viewers Count */
.viewers-count {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10 !important;
    color: var(--text-primary);
}

/* Model Info (Basic) - FIXED for proper spacing */
.model-basic-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Reduced gap to fit everything */
    /* FIXED: Increased height to accommodate all elements */
    min-height: 125px;
    max-height: 125px;
    overflow: hidden;
}

/* FIXED: Model name with proper spacing */
.model-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* FIXED: Reserve space and prevent overlap */
    margin-bottom: 0.25rem;
    height: 1.2em; /* Fixed height for consistency */
}

/* Model Meta Layout - FIXED spacing */
.model-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    /* FIXED: Consistent height with proper spacing */
    min-height: 28px;
    max-height: 28px;
    height: 28px;
    margin-bottom: 0.25rem; /* Space before room subject */
}

.model-meta span {
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* Country Flag Styles - Updated for flag-only display */
.country-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.country-flag[src=""] {
    display: none;
}

/* Updated clickable country link - no text, just flag */
.country-link {
    cursor: pointer;
    transition: var(--transition);
    padding: 0.3rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-width: 32px;
    min-height: 26px;
}

.country-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.country-link:active {
    transform: translateY(0);
}

.country-link .country-flag {
    transition: var(--transition);
    margin: 0;
}

.country-link:hover .country-flag {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Gender link adjustments to match */
.gender-link {
    cursor: pointer;
    transition: var(--transition);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    white-space: nowrap;
    min-height: 26px;
}

.gender-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.gender-link:active {
    transform: translateY(0);
}

.gender-link i {
    font-size: 0.8rem;
    color: inherit;
}

/* Room Subject Styles - FIXED positioning */
.model-room-subject {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    
    /* FIXED: Consistent height whether empty or not */
    min-height: 34px;
    max-height: 34px;
    height: 34px;
    
    /* Single line with ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Darker inset box design */
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    /* FIXED: Remove margin-top that could cause overlap */
    margin-top: 0;
    
    /* Inset shadow effect */
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.4),
        inset -1px -1px 2px rgba(255, 255, 255, 0.02);
    
    /* Default cursor instead of text cursor */
    cursor: default;
    
    /* Smooth transitions */
    transition: all 0.2s ease;
    
    /* FIXED: Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    
    /* FIXED: Force consistent display */
    display: block;
    box-sizing: border-box;
    
    /* FIXED: Ensure it stays at the bottom */
    flex-shrink: 0;
}

.model-room-subject:hover {
    color: var(--text-secondary);
    background: rgba(26, 29, 35, 0.8);
    border-color: rgba(0, 0, 0, 0.4);
}

/* FIXED: Empty room subject maintains exact same styling */
.model-room-subject:empty {
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.4),
        inset -1px -1px 2px rgba(255, 255, 255, 0.02);
    /* FIXED: Maintain exact same height even when empty */
    min-height: 34px;
    max-height: 34px;
    height: 34px;
}

.model-room-subject:empty::before {
    content: "\00a0";
    opacity: 0;
}

/* Model Overlay (Hover Details) */
.model-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 4 !important;
}

.model-info {
    transform: translateY(10px);
    transition: var(--transition);
}

.model-overlay-name {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    margin-left: -0.25rem;
    margin-right: 0;
    margin-top: 0.25rem;
    position: relative;
    z-index: 5 !important;
}

.tag-link {
    pointer-events: auto;
    transition: var(--transition);
    flex-shrink: 0;
    margin: 0 0.25rem 0.25rem 0.25rem;
    padding: 0;
    display: inline-flex;
}

.tag-link:hover .tag {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.tag {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0;
    vertical-align: middle;
}

/* Mobile model info */
.model-mobile-info {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    min-height: 60px;
    position: relative;
    z-index: 6 !important;
}

.model-mobile-tags {
    display: flex;
    gap: 0.4rem;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.25rem 0;
}

.model-mobile-tags .mobile-tag-link {
    flex-shrink: 0;
}

.model-mobile-tags .tag {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.model-mobile-tags .tag:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.model-mobile-tags .tag:active {
    transform: scale(0.95);
}

/* Filters Sidebar */
.filters-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filters-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Close Button */
.mobile-close-btn {
    display: none;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 0.875rem;
}

.mobile-close-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Buttons */
.category-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.category-btn {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.category-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.category-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Country Select Styling */
.country-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.country-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.country-select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Affiliate Select */
.affiliate-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.affiliate-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Tag Search */
.tag-search-container {
    position: relative;
    margin-bottom: 0.75rem;
}

.tag-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.tag-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.tag-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Tags Selection */
.tags-container {
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

/* Hide scrollbar for tags container */
.tags-container::-webkit-scrollbar {
    width: 4px;
}

.tags-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.tags-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.tag-item {
    display: flex;
    align-items: center;
    padding: 0.4rem;
    margin-bottom: 0.2rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.tag-item:hover {
    background: var(--bg-primary);
}

.tag-item label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.tag-checkbox {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

/* Custom checkbox styling */
.tag-checkbox {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}

.tag-checkbox:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.tag-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.tag-checkbox:hover {
    border-color: var(--accent-primary);
}

.tag-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

/* Special case for all-caps tags */
.tag-name.all-caps {
    text-transform: uppercase;
}

.tag-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sort Options */
.sort-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Filter Results Count */
.filter-results {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.results-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.results-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Apply/Reset Buttons */
.filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-apply {
    background: var(--accent-primary);
    color: white;
}

.btn-apply:hover {
    background: #dc2626;
}

.btn-reset {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-reset:hover {
    background: var(--bg-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-text {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1200px) {
    /* REMOVED: auto-fill grid override - let landscape/portrait settings control columns */
}

@media (max-width: 768px) {
    .site-header {
        height: auto;
        position: fixed;
        width: 100%;
    }
    
    .header-content {
        height: var(--header-height);
        justify-content: center;
        align-items: center;
        padding: 0 1rem;
    }
    
    .main-container {
        flex-direction: column !important;
        padding-top: 130px;
    }
    
    .content-area {
        padding: 1rem;
        padding-top: 0.5rem;
    }
    
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 30px;
    }
    
    .mobile-close-btn {
        display: flex;
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
        padding: 0.75rem 1rem;
    }
    
    .logo {
        margin: 0;
        font-size: 1.3rem;
    }
    
    .sidebar {
        width: 100% !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        height: 100vh !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border: none !important;
        background: var(--bg-secondary);
        padding-top: 2rem;
        overflow-y: auto;
    }
    
    .sidebar.mobile-active {
        transform: translateX(0);
    }
    
    /* Mobile: 2 models per row */
    .models-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    /* FIXED: Adjust model cards for mobile with proper spacing */
    .model-basic-info {
        padding: 8px;
        min-height: 110px;
        max-height: 110px;
        gap: 0.2rem; /* Smaller gap on mobile */
    }
    
    .model-name {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
        height: 1.1em;
    }
    
    /* FIXED: Mobile adjustments for room subject */
    .model-room-subject {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        margin-top: 0;
        min-height: 30px;
        max-height: 30px;
        height: 30px;
    }
    
    .model-room-subject:empty {
        min-height: 30px;
        max-height: 30px;
        height: 30px;
    }
    
    /* Hide desktop overlay on mobile */
    .model-overlay {
        display: none !important;
    }
    
    /* Show mobile info on mobile */
    .model-mobile-info {
        display: block !important;
    }
    
    .category-buttons {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.3rem !important; /* Smaller title for mobile */
    }
    
    .tags-container {
        max-height: 200px;
    }
    
    /* Mobile adjustments for gender and country links */
    .model-meta {
        gap: 0.4rem;
        min-height: 26px;
        max-height: 26px;
        height: 26px;
        margin-bottom: 0.2rem;
    }
    
    .gender-link, .country-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        min-height: 24px;
    }
    
    .country-link {
        min-width: 30px;
        padding: 0.25rem;
    }
    
    .country-flag {
        width: 18px;
        height: 13px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ========================================
   CONFIGURABLE FILTER MENU POSITIONING
   ======================================== */

/* Layout Variations */
.main-container.sidebar-left {
    flex-direction: row;
}

.main-container.sidebar-right {
    flex-direction: row;
}

.main-container.sidebar-hidden {
    flex-direction: row;
}

/* Sidebar Position Variations */
.sidebar.sidebar-position-left {
    border-left: none;
    border-right: 1px solid var(--border-color);
    order: -1; /* Move to the left */
}

.sidebar.sidebar-position-right {
    border-left: 1px solid var(--border-color);
    border-right: none;
    order: 1; /* Keep on the right */
}

.sidebar.sidebar-position-hidden {
    position: fixed !important;
    top: var(--header-height);
    right: -340px; /* Hide off-screen */
    bottom: 0;
    z-index: 999;
    height: calc(100vh - var(--header-height));
    transform: translateX(0);
    transition: right 0.3s ease;
    border: 1px solid var(--border-color);
    border-right: none;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.sidebar.sidebar-position-hidden.active {
    right: 0; /* Slide in from right */
}


/* Content area adjustments based on sidebar position */
.main-container.sidebar-hidden .content-area {
    width: 100%;
    max-width: none;
}

/* Body overlay for hidden sidebar */
body.filters-open .sidebar.sidebar-position-hidden {
    right: 0;
}

body.filters-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Keep existing mobile toggle style unchanged */

.filter-toggle-btn.desktop-visible {
    display: none; /* Hidden by default, shown by JS when needed */
    position: fixed;
    bottom: 20px; /* Bottom right corner */
    right: 20px; /* Small margin from edge */
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    padding: 0;
    z-index: 1001; /* Above everything */
    transition: var(--transition);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.filter-toggle-btn.desktop-visible:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Simple toggle icon */
.filter-toggle-btn.desktop-visible span {
    width: 18px;
    height: 2px;
    background: white;
    transition: var(--transition);
    margin: 2px 0;
}

/* IMPORTANT: Remove all content resizing - filter menu goes OVER content */
body.desktop-toggle-visible .content-area,
body.desktop-toggle-visible.filters-open .content-area,
body.filters-open .content-area {
    margin-right: 0 !important; /* NO RESIZING */
    transition: none !important;
}

/* Enhanced close button for hidden sidebar - restore red styling */
.sidebar.sidebar-position-hidden .filters-header .mobile-close-btn {
    display: flex !important;
    background: var(--accent-primary);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar.sidebar-position-hidden .filters-header .mobile-close-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

/* Fix padding issue for hidden mode - make it flush with sidebar edges */
.sidebar.sidebar-position-hidden .filters-header {
    /* Remove all special styling and set flush padding */
    background: none;
    border-bottom: none;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-top: -1.5rem;
    margin-bottom: 0.75rem; /* Reduced from 1.5rem to match left/right spacing */
    padding: 1.5rem;
    /* Better alignment between title and X button */
    align-items: center;
    line-height: 1.2;
}

/* Ensure title and button are perfectly aligned */
.sidebar.sidebar-position-hidden .filters-header span {
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.sidebar.sidebar-position-hidden .filters-header .mobile-close-btn {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent button from shrinking */
}

@media (max-width: 768px) {
    /* CRITICAL: Always show mobile toggle button on mobile, regardless of filter position */
    .filter-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 30px;
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        z-index: 10;
    }
    
    /* Hide desktop toggle on mobile */
    .filter-toggle-btn.desktop-visible {
        display: none !important;
    }
    
    /* FIXED: Universal mobile sidebar behavior - ALWAYS START CLOSED */
    .sidebar {
        width: 100% !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        height: 100vh !important;
        transform: translateX(-100%) !important; /* Force closed */
        transition: transform 0.3s ease;
        border: none !important;
        background: var(--bg-secondary);
        padding-top: 2rem;
        overflow-y: auto;
        order: initial !important;
    }
    
    /* FIXED: Active states work for all positions on mobile */
    .sidebar.mobile-active {
        transform: translateX(0) !important;
    }
    
    /* Override all desktop positioning classes on mobile - FORCE CLOSED STATE */
    .sidebar.sidebar-position-left,
    .sidebar.sidebar-position-right,
    .sidebar.sidebar-position-hidden {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        transform: translateX(-100%) !important; /* Force closed initially */
        transition: transform 0.3s ease;
        border: none !important;
        box-shadow: none;
    }
    
    .sidebar.sidebar-position-left.mobile-active,
    .sidebar.sidebar-position-right.mobile-active,
    .sidebar.sidebar-position-hidden.mobile-active {
        transform: translateX(0) !important;
    }
    
    /* Remove conflicting active class on mobile */
    .sidebar.sidebar-position-hidden.active {
        transform: translateX(-100%) !important; /* Keep closed on mobile */
    }
    
    /* Reset close button on mobile - keep red styling */
    .sidebar.sidebar-position-hidden .filters-header .mobile-close-btn {
        width: 32px;
        height: 32px;
        background: var(--accent-primary);
        border: none;
        color: white;
    }
    
    .sidebar.sidebar-position-hidden .filters-header {
        /* Fix padding on mobile too - make it flush */
        background: none;
        border-bottom: none;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        margin-top: -2rem; /* Account for mobile padding-top: 2rem */
        margin-bottom: 0.75rem; /* Reduced spacing to match desktop */
        padding: 1.5rem;
        padding-top: 2rem; /* Match mobile sidebar padding-top */
        /* Better alignment on mobile too */
        align-items: center;
        line-height: 1.2;
    }
}

/* Desktop positioning classes - preserve existing filter menu layout */
.main-container.sidebar-left {
    flex-direction: row;
}

.main-container.sidebar-right {
    flex-direction: row;
}

.main-container.sidebar-hidden {
    flex-direction: row;
}

.sidebar.sidebar-position-left {
    border-left: none;
    border-right: 1px solid var(--border-color);
    order: -1;
}

.sidebar.sidebar-position-right {
    border-left: 1px solid var(--border-color);
    border-right: none;
    order: 1;
}

/* CLEAN: Hidden sidebar slides over content, doesn't resize it */
.sidebar.sidebar-position-hidden {
    position: fixed !important;
    top: 0;
    right: -350px; /* Hide off-screen */
    bottom: 0;
    z-index: 1000; /* High z-index to go over content */
    width: 350px;
    height: 100vh;
    transform: translateX(0);
    transition: right 0.3s ease;
    border: 1px solid var(--border-color);
    border-right: none;
    overflow-y: auto;
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.4);
    background: var(--bg-secondary);
}

.sidebar.sidebar-position-hidden.active {
    right: 0; /* Slide in over content */
}

/* Content area remains unchanged - no resizing */
.main-container.sidebar-hidden .content-area {
    width: 100%;
    max-width: none;
    margin: 0; /* No margins */
    padding: 2rem; /* Keep normal padding */
}

/* Overlay for hidden sidebar - dims background */
body.filters-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999; /* Below sidebar, above content */
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto; /* Allow clicks to close */
}

/* Subtle hover tooltip for desktop toggle */
.filter-toggle-btn.desktop-visible::after {
    content: 'Filters';
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.filter-toggle-btn.desktop-visible:hover::after {
    opacity: 1;
}

/* END OF CLEAN TOGGLE BUTTON SOLUTION */

/* ======================================================= */
/* MODEL CARD STYLE VARIATIONS */
/* ======================================================= */

/* Portrait Style (Default) - 3:4 aspect ratio */
.models-grid-portrait .model-image-wrapper {
    padding-bottom: 133%; /* Portrait aspect ratio 3:4 */
}

/* Landscape Style - 16:9 aspect ratio */
.models-grid-landscape .model-image-wrapper {
    padding-bottom: 56.25%; /* Landscape aspect ratio 16:9 */
}

/* Alternative Landscape Style - 4:3 aspect ratio (uncomment if preferred) */
/*
.models-grid-landscape .model-image-wrapper {
    padding-bottom: 75%;
}
*/

/* Ensure all other model card styles remain consistent regardless of aspect ratio */
.models-grid-landscape .model-card,
.models-grid-portrait .model-card {
    /* Maintain consistent card styling */
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Dynamic Responsive Grid - Controlled by JavaScript and CSS Custom Properties */
.models-grid-landscape {
    --grid-columns-desktop: 4;
    --grid-columns-tablet: 4;
    --grid-columns-mobile: 2;
    grid-template-columns: repeat(var(--grid-columns-desktop), 1fr);
}

.models-grid-portrait {
    --grid-columns-desktop: 4;
    --grid-columns-tablet: 3;
    --grid-columns-mobile: 2;
    grid-template-columns: repeat(var(--grid-columns-desktop), 1fr);
}

/* Tablet responsive adjustments */
@media (max-width: 1199px) and (min-width: 768px) {
    .models-grid-landscape {
        grid-template-columns: repeat(var(--grid-columns-tablet), 1fr);
    }
    
    .models-grid-portrait {
        grid-template-columns: repeat(var(--grid-columns-tablet), 1fr);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    /* MOBILE OPTIMIZATION: Smaller header for more content space */
    :root {
        --header-height: var(--header-height-mobile);
    }
    
    .header-content {
        height: var(--header-height-mobile);
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.3rem; /* Slightly smaller logo */
    }
    
    /* MOBILE OPTIMIZATION: Hide navigation links for smaller header */
    .header-nav {
        display: none;
    }
    
    .mobile-nav {
        display: none; /* Hide mobile nav for maximum space */
    }
    
    /* MOBILE OPTIMIZATION: Minimal gaps between cards (3-5px) */
    .models-grid-landscape {
        grid-template-columns: repeat(var(--grid-columns-mobile), 1fr);
        gap: 0.25rem; /* 4px gap - minimal as requested */
    }
    
    .models-grid-portrait {
        grid-template-columns: repeat(var(--grid-columns-mobile), 1fr);
        gap: 0.25rem; /* 4px gap - minimal as requested */
    }
    
    /* MOBILE OPTIMIZATION: Minimal content padding for maximum space */
    .content-area {
        padding: 0.75rem 0.25rem 0.25rem 0.25rem !important; /* Reduced top space */
    }
    
    /* MOBILE OPTIMIZATION: Even more minimal padding for model pages */
    body.model-page .content-area {
        padding: 0.25rem 0.15rem 0.15rem 0.15rem !important; /* Minimal top space for model pages */
    }
    
    /* MOBILE OPTIMIZATION: Reduce first section top margin on model pages */
    body.model-page .video-section:first-child {
        margin-top: 0 !important;
    }
    
    /* MOBILE OPTIMIZATION: Hide elements for cleaner cards */
    .model-meta {
        display: none !important; /* Hide gender/country */
    }
    
    .model-room-subject {
        display: none !important; /* Hide marquee text */
    }
    
    .model-mobile-info {
        display: none !important; /* Hide mobile tags */
    }
    
    /* MOBILE OPTIMIZATION: Move model name to thumbnail overlay */
    .model-basic-info .model-name {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
        color: white;
        font-size: 0.9rem;
        font-weight: 600;
        padding: 1.5rem 0.75rem 0.75rem;
        margin: 0;
        height: auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 5;
        line-height: 1.2;
    }
    
    /* MOBILE OPTIMIZATION: Smaller status indicators */
    .model-status {
        top: 6px;
        left: 6px;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
        border-radius: 10px;
    }
    
    .status-dot {
        width: 5px;
        height: 5px;
    }
    
    .viewers-count {
        top: 6px;
        right: 6px;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
        border-radius: 10px;
    }
    
    /* MOBILE OPTIMIZATION: Make status indicators smaller on model page too */
    .status-live {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.65rem !important;
        border-radius: 10px !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .status-live .status-dot {
        width: 5px !important;
        height: 5px !important;
    }
    
    .video-status .viewers-count {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.65rem !important;
        border-radius: 10px !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    /* MOBILE OPTIMIZATION: Adjust main container for smaller header */
    .main-container {
        min-height: calc(100vh - var(--header-height-mobile));
        margin-top: var(--header-height-mobile) !important; /* Add top margin to prevent content going under header */
    }
    
    /* MOBILE OPTIMIZATION: Ensure sidebar positioning accounts for header */
    .main-container.sidebar-hidden {
        margin-top: var(--header-height-mobile) !important;
    }
    
    /* MOBILE OPTIMIZATION: Remove section spacing - remove big empty space */
    .section-header {
        margin-bottom: 0.25rem !important; /* Minimal margin */
        margin-top: 0.5rem !important; /* Smaller top margin */
    }
    
    .section-title {
        margin: 0 !important; /* No margins on title */
    }
    
    .models-section {
        margin-bottom: 0.5rem !important; /* Minimal section spacing */
        margin-top: 0 !important; /* No top margin */
    }
    
    .models-section:not(:last-child) {
        padding-bottom: 0.25rem !important;
    }
    
    /* MOBILE OPTIMIZATION: Remove any top spacing/padding from main container */
    .main-container {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    /* MOBILE OPTIMIZATION: Fix model card structure to remove empty space under thumbnails */
    .model-card {
        position: relative !important;
    }
    
    .model-card .model-image-wrapper {
        position: relative !important;
        margin-bottom: 0 !important; /* Remove any bottom margin */
    }
    
    /* MOBILE OPTIMIZATION: Completely hide model-basic-info to remove empty space */
    .model-basic-info {
        display: none !important; /* This removes the empty space under thumbnails */
    }
    
    /* MOBILE OPTIMIZATION: Show mobile model name overlay (hidden by default) */
    .model-name-mobile {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)) !important;
        color: white !important;
        font-size: 0.75rem !important; /* Smaller font size for mobile */
        font-weight: 600 !important;
        padding: 1rem 0.5rem 0.5rem !important; /* Smaller padding */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        z-index: 10 !important;
        line-height: 1.2 !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.9) !important;
        display: block !important;
        pointer-events: none !important;
    }
}

/* ==========================================================================
   TAG LINE LIMITS - BASED ON MODEL CARD STYLE
   ========================================================================== */

/* Landscape mode: 1 line of tags maximum */
.models-grid-landscape .model-tags {
    max-height: 24px !important;
    overflow: hidden !important;
}

/* Portrait mode: 2 lines of tags maximum */
.models-grid-portrait .model-tags {
    max-height: 48px !important;
    overflow: hidden !important;
}

/* ==========================================================================
   SEARCH INPUT WITH BUTTON STYLING
   ========================================================================== */

.search-container {
    position: relative;
    display: flex;
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    border-right: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-button {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 0 8px 8px 0;
    color: white;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.search-button:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
}

.search-button i {
    font-size: 0.875rem;
}

/* Mobile adjustments for search */
@media (max-width: 768px) {
    .search-input {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .search-button {
        padding: 0.6rem 0.8rem;
        min-width: 40px;
    }
    
    .search-button i {
        font-size: 0.8rem;
    }
}