/* ============================================
   Video Analyzer AI - User Styles
   Centralized CSS for user-facing templates
   ============================================ */

/* ============================================
   GLASSMORPHISM DESIGN SYSTEM
   ============================================ */

/* Header - Glassmorphism Style */
header.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Navbar links - white text with better visibility */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MODERN LANGUAGE SWITCHER
   ============================================ */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 2.5rem;
    text-align: center;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.lang-btn-active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.lang-btn-active:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* Language switcher in sidebar */
.list-group-item .language-switcher .lang-btn {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #495057;
    font-weight: 500;
}

.list-group-item .language-switcher .lang-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.list-group-item .language-switcher .lang-btn-active {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(21, 109, 149, 0.2);
}

.list-group-item .language-switcher .lang-btn-active:hover {
    background-color: #0d5a7a !important;
    border-color: #0d5a7a !important;
}

/* ============================================
   GLOBAL IMPROVEMENTS FOR CONTRAST & READABILITY
   ============================================ */

/* CRITICAL: Fix text-muted contrast - was too light */
.text-muted {
    color: #6c757d !important; /* Darker grey instead of very light grey */
    font-weight: 400;
}

.text-muted strong {
    color: #495057 !important; /* Even darker for strong text */
    font-weight: 600;
}

/* Ensure all links have good contrast */
a {
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Better contrast for code blocks */
code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    border: 1px solid #dee2e6;
}

pre code {
    background-color: transparent;
    border: none;
    padding: 0;
}

/* Better contrast for labels */
label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Improve form labels visibility */
.form-label {
    font-weight: 500;
    color: #495057;
}

/* Better contrast for disabled elements */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   INDEX PAGE STYLES
   ============================================ */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6f42c1, #0d6efd); /* Purple to Blue gradient */
    color: white;
    padding: 5rem 1rem;
    margin-bottom: 3rem;
    border-radius: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hero section buttons - ensure visibility */
.hero-section .btn-light {
    background-color: rgba(255, 255, 255, 0.95);
    color: #212529;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-light:hover {
    background-color: white;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.hero-section .btn-warning {
    background-color: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-warning:hover {
    background-color: #ffcd39;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none; /* Remove default card border */
    border-radius: 0.75rem; /* Slightly more rounded */
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02); /* Lift and slightly enlarge */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.feature-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center icon and text */
    text-align: center;
}

.feature-card .icon-bg {
    font-size: 3rem; /* Larger icons */
    margin-bottom: 1rem;
    width: 70px; /* Circle background */
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background for icon */
    color: #fff; /* Default icon color on colored cards */
}

/* Specific card background colors */
.card-bg-primary { 
    background-color: var(--bs-primary); 
    color: white; 
}

.card-bg-secondary { 
    background-color: var(--bs-secondary); 
    color: white; 
}

.card-bg-success { 
    background-color: var(--bs-success); 
    color: white; 
}

.card-bg-info { 
    background-color: var(--bs-info); 
    color: #212529; /* Darker text for better contrast */
} 

.card-bg-warning { 
    background-color: var(--bs-warning); 
    color: #212529; /* Darker text for better contrast */
} 

.card-bg-purple { 
    background-color: #6f42c1; 
    color: white; 
} 

.card-bg-dark { 
    background-color: var(--bs-dark); 
    color: white; 
}

/* Ensure text in colored cards is always readable */
.card-bg-primary .card-title,
.card-bg-primary .card-text,
.card-bg-secondary .card-title,
.card-bg-secondary .card-text,
.card-bg-success .card-title,
.card-bg-success .card-text,
.card-bg-purple .card-title,
.card-bg-purple .card-text,
.card-bg-dark .card-title,
.card-bg-dark .card-text {
    color: white;
}

.card-bg-info .card-title,
.card-bg-info .card-text,
.card-bg-warning .card-title,
.card-bg-warning .card-text {
    color: #212529;
}

.card-bg-info .icon-bg,
.card-bg-warning .icon-bg {
    background-color: rgba(0, 0, 0, 0.15); /* Darker icon bg for better contrast */
    color: #212529; /* Dark icon color on light cards */
}

/* Buttons on colored cards - ensure visibility */
.card-bg-primary .btn-light,
.card-bg-secondary .btn-light,
.card-bg-success .btn-light,
.card-bg-purple .btn-light,
.card-bg-dark .btn-light {
    background-color: rgba(255, 255, 255, 0.95);
    color: #212529;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.card-bg-primary .btn-light:hover,
.card-bg-secondary .btn-light:hover,
.card-bg-success .btn-light:hover,
.card-bg-purple .btn-light:hover,
.card-bg-dark .btn-light:hover {
    background-color: white;
    color: #212529;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-bg-info .btn-light,
.card-bg-warning .btn-light {
    background-color: #212529;
    color: white;
    border: 1px solid #212529;
    font-weight: 600;
}

.card-bg-info .btn-light:hover,
.card-bg-warning .btn-light:hover {
    background-color: #000000;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.feature-card .btn {
    margin-top: auto; /* Push button to bottom */
    border-radius: 50rem; /* Pill shape */
    padding: 0.5rem 1.5rem;
    font-weight: bold;
}

/* ============================================
   SCENE SEARCH PAGE STYLES
   ============================================ */

/* Pre-formatted text wrapping */
pre {
    white-space: pre-wrap; /* Ensure long lines wrap */
    word-wrap: break-word;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    color: #212529;
    line-height: 1.5;
}

/* Scene image styling */
.scene-image img, 
.scene-image .placeholder {
    max-width: 200px; /* Limit max image width */
    height: auto;
    display: block; /* Center image if container is wider */
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scene-image .placeholder {
    min-height: 100px; /* Give placeholder some height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    font-weight: 500;
}

/* ============================================
   IMAGE PAGE STYLES
   ============================================ */

/* Remove text decoration from links */
.image-page a {
    text-decoration: none;
}

/* ============================================
   PUBLIC GALLERY & PUBLIC SCENE DETAIL STYLES
   (base_public.html templates)
   ============================================ */

/* CSS Variables for brand colors */
:root {
    --brand-blue: #156d95;
    --brand-green: #8fdd83;
    --brand-gradient: linear-gradient(90deg, rgba(21, 109, 149, 1) 0%, rgba(143, 221, 131, 1) 100%);
    --brand-light-grey: #E0E0E0;
    --vijon-dark-green: #156d95;
    --vijon-vibrant-blue: #156d95;
    --vijon-muted-teal: #8fdd83;
    --vijon-dark-teal: #156d95;
    --vijon-light-grey: #E0E0E0;
}

/* Hero Section for Public Pages - Glassmorphism Style */
.public-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    padding: 120px 20px 80px 20px;
    text-align: center;
    margin-bottom: 40px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism container for hero content */
.public-hero-section .container {
    position: relative;
    z-index: 1;
}

/* Glassmorphism card for hero content */
.public-hero-section .glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 60px 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    max-width: 900px;
    margin: 0 auto;
}

.public-hero-section .glass-card h1 {
    font-family: 'Work Sans', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.public-hero-section .glass-card p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Search Hero - Glassmorphism Style (identical to example) */
.search-hero {
    max-width: 800px;
    margin: 0 auto;
}

.search-hero .search-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 30px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.2);
    width: 100%;
    max-width: 600px;
}

.search-hero .search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1.1rem;
    flex: 1;
    min-width: 0;
}

.search-hero .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-hero .search-box button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 10px 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-hero .search-box button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-hero button:hover {
    background: var(--brand-blue);
    color: white;
    box-shadow: 0 4px 8px rgba(21, 109, 149, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-grid.masonry {
    display: block;
    column-count: 4;
    column-gap: 20px;
}

@media (max-width: 1200px) {
    .gallery-grid.masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-grid.masonry {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid.masonry {
        column-count: 1;
    }
}

/* Image Cards */
.image-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}


.gallery-grid:not(.masonry) .image-card {
    display: block;
    margin-bottom: 0;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.15);
}

.image-card img {
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 500px;
    object-fit: cover;
    display: block;
}


.gallery-grid:not(.masonry) .image-card img {
    height: 280px;
    min-height: 280px;
    max-height: 280px;
}

/* Gallery Fade Overlay */
.gallery-fade-overlay {
    position: relative;
}

.gallery-fade-overlay.has-fade::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    z-index: 5;
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    padding: 15px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay h6 {
    color: white !important;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.image-overlay .text-white-50 {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* Filters Bar */
.filters-bar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 5px;
    cursor: pointer;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.filter-badge:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-badge a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.filter-badge a:hover {
    color: white;
    text-decoration: none;
}

/* Public Page Typography */
.public-page h1, 
.public-page h2, 
.public-page h3, 
.public-page h4, 
.public-page h5, 
.public-page h6 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-blue);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
}

/* Fix h1 on gradient backgrounds - ensure white text with subtle shadow */
.public-page h1 {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    margin-top: 100px;
}

/* Scene Detail Page - Hero Gradient Section */
.scene-hero-gradient {
    width: 100%;
    background: var(--brand-gradient);
    position: relative;
    z-index: 0;
}

/* Ensure content below gradient has white background */
.public-page .container-fluid.px-4 {
    background: white;
    position: relative;
    z-index: 1;
}

/* Scene Title - Blue text on white background (below gradient) */
.public-page .scene-title {
    color: var(--brand-blue) !important;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2rem !important;
    margin-bottom: 2rem;
    text-shadow: none !important;
    font-family: 'Work Sans', sans-serif;
}

/* Subtitle under h1 on gradient */
.public-page h1 + p.text-muted {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15) !important;
    font-weight: 500;
}

/* Ensure links in headings are visible */
.public-page h1 a,
.public-page h2 a,
.public-page h3 a,
.public-page h4 a,
.public-page h5 a,
.public-page h6 a {
    color: var(--brand-blue);
    text-decoration: none;
}

.public-page h1 a:hover,
.public-page h2 a:hover,
.public-page h3 a:hover,
.public-page h4 a:hover,
.public-page h5 a:hover,
.public-page h6 a:hover {
    color: #0d4d6b;
    text-decoration: underline;
}

/* Public Page Cards - Glassmorphism Style */
.public-page .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.public-page .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.public-page .card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px 16px 0 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-family: 'Work Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1rem 1.5rem;
    color: white !important;
}

/* ============================================
   COLORED BOX HEADERS - White Text on Blue/Green
   ============================================ */

/* Global rule: Any card-header with brand colors gets white text */
.card-header.bg-primary[style*="background"],
.card-header.bg-info[style*="background"],
.card-header.bg-danger[style*="background"],
.card-header.bg-success[style*="background"],
.card-header.bg-warning[style*="background"] {
    color: white !important;
}

/* Blue headers - Glassmorphism with gradient background - Better Contrast */
.public-page .card-header.bg-primary,
.public-page .card-header.bg-info,
.public-page .card-header.bg-danger {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.public-page .card-header.bg-primary h5,
.public-page .card-header.bg-primary .mb-0,
.public-page .card-header.bg-primary h6,
.public-page .card-header.bg-info h5,
.public-page .card-header.bg-info .mb-0,
.public-page .card-header.bg-info h6,
.public-page .card-header.bg-danger h5,
.public-page .card-header.bg-danger .mb-0,
.public-page .card-header.bg-danger h6 {
    color: white !important;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.public-page .card-header.bg-primary i,
.public-page .card-header.bg-info i,
.public-page .card-header.bg-danger i,
.public-page .card-header i {
    color: white !important;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
}

/* Green headers - Glassmorphism with gradient background - Better Contrast */
.public-page .card-header.bg-success {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.public-page .card-header.bg-success h5,
.public-page .card-header.bg-success .mb-0,
.public-page .card-header.bg-success h6 {
    color: white !important;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.public-page .card-header.bg-success i {
    color: white !important;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
}

/* Warning headers - Glassmorphism with gradient background - Better Contrast */
.public-page .card-header.bg-warning {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.public-page .card-header.bg-warning h5,
.public-page .card-header.bg-warning .mb-0,
.public-page .card-header.bg-warning h6 {
    color: white !important;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.public-page .card-header.bg-warning i {
    color: white !important;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
}

/* Override any text-dark classes on colored headers - Force white text */
.public-page .card-header.bg-primary.text-dark,
.public-page .card-header.bg-info.text-dark,
.public-page .card-header.bg-success.text-dark,
.public-page .card-header.bg-warning.text-dark,
.public-page .card-header.bg-danger.text-dark {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white !important;
}

.public-page .card-header.bg-primary.text-dark h5,
.public-page .card-header.bg-primary.text-dark .mb-0,
.public-page .card-header.bg-primary.text-dark h6,
.public-page .card-header.bg-info.text-dark h5,
.public-page .card-header.bg-info.text-dark .mb-0,
.public-page .card-header.bg-info.text-dark h6,
.public-page .card-header.bg-success.text-dark h5,
.public-page .card-header.bg-success.text-dark .mb-0,
.public-page .card-header.bg-success.text-dark h6,
.public-page .card-header.bg-warning.text-dark h5,
.public-page .card-header.bg-warning.text-dark .mb-0,
.public-page .card-header.bg-warning.text-dark h6,
.public-page .card-header.bg-danger.text-dark h5,
.public-page .card-header.bg-danger.text-dark .mb-0,
.public-page .card-header.bg-danger.text-dark h6 {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Ensure all icons in card headers are white with better visibility */
.public-page .card-header.bg-primary.text-dark i,
.public-page .card-header.bg-info.text-dark i,
.public-page .card-header.bg-success.text-dark i,
.public-page .card-header.bg-warning.text-dark i,
.public-page .card-header.bg-danger.text-dark i {
    color: white !important;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
}

/* Public Page Buttons - Glassmorphism Style */
.public-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.625rem 1.5rem;
}

.public-page .btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* Public Page Outline Buttons - Modern Style */
.public-page .btn-outline-primary {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background-color: transparent;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(21, 109, 149, 0.1);
}

.public-page .btn-outline-primary:hover {
    background-color: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(21, 109, 149, 0.3);
    transform: translateY(-2px);
}

.public-page .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    background-color: transparent;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.1);
}

.public-page .btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

.public-page .btn {
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.public-page .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Search Bar Buttons - Modern Outline Style with rounded corners */
/* Search Bar Buttons - Modern Solid Style (no transparent outline, no green) */
.search-bar-buttons .btn-primary {
    border-radius: 50px !important;
    padding: 0.75rem 1.5rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.search-bar-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Modern glassmorphism buttons */
.search-bar-buttons .btn-outline-primary,
.search-bar-buttons .btn-outline-primary.dropdown-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #667eea !important;
    font-weight: 500 !important;
    border-radius: 50px !important;
    padding: 0.75rem 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.search-bar-buttons .btn-outline-primary:hover,
.search-bar-buttons .btn-outline-primary.dropdown-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3) !important;
    transform: translateY(-2px) !important;
}

.search-bar-buttons .btn-outline-primary:focus,
.search-bar-buttons .btn-outline-primary:active,
.search-bar-buttons .btn-outline-primary.dropdown-toggle:focus,
.search-bar-buttons .btn-outline-primary.dropdown-toggle:active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 16px rgba(102, 126, 234, 0.3) !important;
}

/* Modern glassmorphism danger button */
.search-bar-buttons .btn-outline-danger {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    color: #dc3545 !important;
    font-weight: 500 !important;
    border-radius: 50px !important;
    padding: 0.75rem 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.search-bar-buttons .btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Search Bar Input Field - Glassmorphism */
.search-bar-buttons .form-control,
.search-bar-buttons input[type="search"] {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #212529 !important;
}

.search-bar-buttons .form-control:focus,
.search-bar-buttons input[type="search"]:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    outline: none !important;
}

.search-bar-buttons .form-control::placeholder,
.search-bar-buttons input[type="search"]::placeholder {
    color: #adb5bd;
    opacity: 0.7;
}

/* Search bar buttons icons - Update colors on hover and default state */
.search-bar-buttons .btn-outline-primary i[data-lucide],
.search-bar-buttons .btn-outline-primary svg {
    color: #667eea !important;
    stroke: #667eea !important;
}

.search-bar-buttons .btn-outline-primary:hover i[data-lucide],
.search-bar-buttons .btn-outline-primary:hover svg,
.search-bar-buttons .btn-outline-primary:active i[data-lucide],
.search-bar-buttons .btn-outline-primary:active svg,
.search-bar-buttons .btn-outline-primary:focus i[data-lucide],
.search-bar-buttons .btn-outline-primary:focus svg {
    color: white !important;
    stroke: white !important;
}

.search-bar-buttons .btn-outline-danger i[data-lucide],
.search-bar-buttons .btn-outline-danger svg {
    color: #dc3545 !important;
    stroke: #dc3545 !important;
}

.search-bar-buttons .btn-outline-danger:hover i[data-lucide],
.search-bar-buttons .btn-outline-danger:hover svg {
    color: white !important;
    stroke: white !important;
}

.search-bar-buttons .btn-outline-danger:focus,
.search-bar-buttons .btn-outline-danger:active {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

/* Override for btn-group in search bar - Glassmorphism */
.search-bar-buttons .btn-group .btn-outline-primary,
.search-bar-buttons .btn-group .btn-outline-primary.dropdown-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #667eea !important;
    font-weight: 500 !important;
    border-radius: 50px !important;
    padding: 0.75rem 1.25rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.search-bar-buttons .btn-group .btn-outline-primary:hover,
.search-bar-buttons .btn-group .btn-outline-primary.dropdown-toggle:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Ensure no green background anywhere in search bar buttons - Now using glassmorphism */
/* Old styles removed - using glassmorphism gradient styles above */

/* Search input in search bar - Glassmorphism style applied above */

.public-page .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border-color: rgba(102, 126, 234, 0.5);
    color: #667eea;
    background-color: transparent;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.public-page .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* Duplicate definition removed - using the one above */

/* Public Page Form Controls - Glassmorphism Style */
.public-page .form-control {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.public-page .form-control:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    outline: none;
}

.public-page .form-control::placeholder {
    color: #adb5bd;
    opacity: 1;
}

/* Public Page Cards - Glassmorphism Style */
.public-page .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.public-page .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.public-page .card-body {
    background: transparent;
    color: #212529;
}

.public-page .card-title {
    color: var(--brand-blue);
    font-weight: 700;
}

.public-page .card-text {
    color: #495057;
    line-height: 1.6;
}

/* Fix card text that's too light */
.public-page .card-text.small {
    color: #495057 !important; /* Dark grey instead of very light */
    font-weight: 400;
}

.public-page .card-text.small.text-muted {
    color: #6c757d !important; /* Medium grey for muted small text */
}

/* Card titles should be dark and readable */
.public-page .card-title {
    color: #212529 !important;
    font-weight: 600;
}

.public-page .card-title.h6 {
    color: #212529 !important;
    font-weight: 600;
}

.public-page h6.card-title {
    color: #212529 !important;
    font-weight: 600;
}

/* Public Page Pagination */
.public-page .pagination .page-link {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    font-weight: 500;
    transition: all 0.2s ease;
}

.public-page .pagination .page-item.active .page-link {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(21, 109, 149, 0.3);
}

.public-page .pagination .page-link:hover {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
    box-shadow: 0 2px 4px rgba(21, 109, 149, 0.2);
}

.public-page .pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(21, 109, 149, 0.25);
}

/* Public Page Text Muted - Improved contrast */
.public-page .text-muted {
    color: #495057 !important; /* Dark grey for much better readability */
    font-weight: 400;
}

.public-page .text-muted strong {
    color: #212529 !important; /* Very dark for strong text */
    font-weight: 600;
}

/* Fix "Found X favorites" and similar info text */
.public-page p.text-muted {
    color: #495057 !important;
    font-size: 1rem;
    font-weight: 500;
}

.public-page p.text-muted strong {
    color: #212529 !important;
    font-weight: 700;
}

/* Main Content Wrapper for Public Pages */
.main-content-wrapper {
    padding-top: 120px;
}

/* Scene Image Card */
.public-page .scene-image-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 20px;
    overflow: hidden;
}

.public-page .scene-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Remove padding from scene image card body - minimal padding only for buttons */
.public-page .scene-image-card .card-body {
    padding: 0.5rem !important;
}

/* Ensure image fills container completely with no white space */
.public-page .scene-image-card .image-container img {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Remove border-radius from image to eliminate white space */
.public-page .scene-image-card .card-img-top {
    border-radius: 0 !important;
    width: 100%;
    display: block;
}

/* Ensure image container has no padding or margin */
.public-page .scene-image-card .image-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove any padding from the card itself */
.public-page .scene-image-card {
    padding: 0 !important;
}

/* Ensure card-body for other scenes also has minimal padding */
.public-page .scene-image-card .card-body:has(.card-text) {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Image Container with Overlay */
.public-page .image-container {
    position: relative;
    overflow: hidden;
}

.public-page .image-container .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.public-page .image-container:hover .image-overlay {
    opacity: 1;
}

.public-page .overlay-content {
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.public-page .overlay-content i {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.public-page .image-container:hover .overlay-content i {
    transform: scale(1.1);
}

.public-page .overlay-content span {
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.public-page .download-btn {
    position: relative;
}

.public-page .premium-badge {
    background: var(--brand-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Public Page Buttons - Additional Styles */
.public-page .btn-outline-primary {
    border-color: var(--brand-blue) !important;
    color: var(--brand-blue) !important;
    background-color: transparent;
    font-weight: 500;
}

.public-page .btn-outline-primary:hover {
    background-color: var(--brand-blue) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(21, 109, 149, 0.3);
    transform: translateY(-1px);
}

.public-page .btn-outline-warning {
    border-color: var(--brand-green) !important;
    color: #156d95 !important; /* Darker blue for better contrast on light backgrounds */
    background-color: transparent;
}

.public-page .btn-outline-warning:hover {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
    color: white !important;
}

.public-page .btn-warning {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
    color: #156d95 !important; /* Dark blue text on light green */
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    font-weight: 600;
}

.public-page .btn-warning:hover {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(21, 109, 149, 0.3);
}

.public-page .btn-secondary {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: white !important;
    font-weight: 500;
}

.public-page .btn-secondary:hover {
    background-color: #0d4d6b !important;
    border-color: #0d4d6b !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(21, 109, 149, 0.4);
}

/* Public Page Badges */
.public-page .badge {
    border-radius: 12px;
    padding: 0.35em 0.65em;
}

.public-page .badge.bg-secondary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    font-weight: 600;
}

.public-page .badge.bg-info {
    background-color: var(--brand-green) !important;
    color: #156d95 !important; /* Dark blue text on light green */
    font-weight: 600;
}

.public-page .badge.bg-success {
    background-color: var(--brand-green) !important;
    color: #156d95 !important; /* Dark blue text on light green */
    font-weight: 600;
}

/* Public Page Breadcrumb */
.public-page .breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-top: 100px;
}

.public-page .breadcrumb-item a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.public-page .breadcrumb-item a:hover {
    color: #0d4d6b;
    text-decoration: underline;
}

.public-page .breadcrumb-item.active {
    color: #6c757d; /* Darker grey for better readability */
    font-weight: 500;
}

/* Public Page Alerts */
/* Global alert overlay styles - all dismissible alerts should be in overlay */
.alert.alert-dismissible {
    position: fixed !important;
    top: 80px !important;
    left: 1rem !important;
    right: 1rem !important;
    z-index: 9999 !important;
    margin: 0 !important;
    max-width: calc(100% - 2rem) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border-radius: 16px !important;
}

.public-page .alert {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.public-page .alert-success {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(25, 135, 84, 0.3);
    color: #0f5132;
}

.public-page .alert-danger {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(220, 53, 69, 0.3);
    color: #842029;
}

.public-page .alert-warning {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

.public-page .alert-info {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: rgba(102, 126, 234, 0.3);
    color: #055160;
}

/* Image Modal/Lightbox - Global styles (not scoped to .public-page) */
.image-modal {
    display: none !important;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.image-modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: white;
    padding: 10px;
}

.image-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    z-index: 10000;
}

.image-modal-actions .btn {
    min-width: 150px;
    border-radius: 50px;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10000;
    line-height: 1;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Ensure modal is hidden by default */
.image-modal:not(.show) {
    visibility: hidden;
}

/* ============================================
   TEXT ON IMAGES/VIDEOS - OVERLAY STYLES
   ============================================ */

/* Text overlay on video/images - ensure readability */
.video-title-overlay,
.image-title-overlay,
.scene-title-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    color: white;
    padding: 1rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    z-index: 10;
}

/* Video player container - ensure text is readable */
.video-player-container video {
    background-color: #000;
}

/* Text on dark backgrounds in cards */
.card-img-top + .card-body h6,
.card-img-top + .card-body .card-title {
    color: #212529 !important;
    font-weight: 600;
}

/* Video/Image cards - ensure text is always readable */
.public-page .card .card-body h6.card-title {
    color: #212529 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.public-page .card .card-body .card-text {
    color: #495057 !important;
    font-weight: 400;
}

.public-page .card .card-body .card-text.small {
    color: #495057 !important;
    line-height: 1.5;
}

/* View Details button text - already handled by main .btn-primary styles above */

/* ============================================
   MY COLLECTIONS & USER PROFILE SPECIFIC
   ============================================ */

/* Collections page - ensure all text is readable */
.public-page .collections-page h1 {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Profile page card headers - handled by COLORED BOX HEADERS section above */

/* Star ratings - ensure inactive stars are visible */
.public-page .star-icon.text-muted {
    color: #adb5bd !important; /* Medium grey for inactive stars */
}

.public-page .star-icon.text-warning {
    color: #ffc107 !important; /* Yellow for active stars */
}

/* Rating info text */
.public-page .rating-info small.text-muted {
    color: #495057 !important; /* Dark grey for better readability */
    font-weight: 500;
}

.public-page .rating-info small.text-success {
    color: #198754 !important;
    font-weight: 600;
}

/* ============================================
   DROPDOWN & INTERACTIVE ELEMENTS
   ============================================ */

/* Improve dropdown visibility */
.public-page .dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.public-page .dropdown-item {
    color: #212529;
    font-weight: 400;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.public-page .dropdown-item:hover,
.public-page .dropdown-item:focus {
    background-color: #f8f9fa;
    color: var(--brand-blue);
}

.public-page .dropdown-item.active {
    background-color: var(--brand-blue);
    color: white;
    font-weight: 600;
}

/* Improve table readability */
.public-page table {
    border-collapse: separate;
    border-spacing: 0;
}

.public-page table th {
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
}

.public-page table td {
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem;
    color: #495057;
}

.public-page table tr:hover {
    background-color: #f8f9fa;
}

/* Improve list group items */
.public-page .list-group-item {
    border-color: rgba(0, 0, 0, 0.08);
    color: #212529;
}

.public-page .list-group-item:hover {
    background-color: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.12);
}

.public-page .list-group-item.active {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
    font-weight: 600;
}

/* Fix list group items with light text */
.public-page .list-group-item h6 {
    color: #212529 !important; /* Dark text for titles */
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.public-page .list-group-item-action h6 {
    color: #212529 !important;
    font-weight: 600;
}

.public-page .list-group-item-action:hover h6,
.public-page .list-group-item-action:focus h6 {
    color: var(--brand-blue) !important;
}

.public-page .list-group-item small.text-muted {
    color: #6c757d !important; /* Medium grey for timestamps */
    font-weight: 500;
}

.public-page .list-group-item p.small.text-muted {
    color: #495057 !important; /* Darker grey for descriptions */
    line-height: 1.5;
}

/* Improve badge contrast */
.public-page .badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
}

.public-page .badge.bg-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.public-page .badge.bg-success {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.public-page .badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

/* ============================================
   AUTH FORMS - LOGIN & REGISTER
   Glassmorphism Style
   ============================================ */

/* Auth Form Card - Glassmorphism */
.auth-form-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-form-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.auth-form-card .card-body {
    background: transparent;
    padding: 2.5rem;
}

/* Auth Form Input Fields - Glassmorphism */
.auth-form-input {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 12px !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1rem !important;
    font-size: 1rem;
    color: #212529 !important;
}

.auth-form-input:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
    outline: none;
}

.auth-form-input::placeholder {
    color: #adb5bd;
    opacity: 0.7;
}

/* Auth Form Button - Modern Gradient */
.auth-form-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3) !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem;
}

.auth-form-button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px);
}

.auth-form-button:active,
.auth-form-button:focus {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 16px rgba(102, 126, 234, 0.3) !important;
    outline: none;
}

/* Auth Form Alerts - Glassmorphism */
.auth-form-card .alert {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.auth-form-card .alert-danger {
    border-color: rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.auth-form-card .alert-success {
    border-color: rgba(25, 135, 84, 0.3);
    color: #0f5132;
}

.auth-form-card .alert-info {
    border-color: rgba(13, 202, 240, 0.3);
    color: #055160;
}

/* Auth Form HR - Subtle divider */
.auth-form-card hr {
    border-color: rgba(102, 126, 234, 0.2);
    opacity: 0.5;
    margin: 1.5rem 0;
}

/* ============================================
   ADDITIONAL BADGES - Glassmorphism Style
   ============================================ */

/* Badge success - Glassmorphism with gradient (general) */
.badge.bg-success:not(.public-page .badge.bg-success) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Badge danger - Keep red but with glassmorphism (general) */
.badge.bg-danger:not(.public-page .badge.bg-danger) {
    background: rgba(220, 53, 69, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Favorite buttons - Heart icon colors based on button state */
.favorite-btn.btn-danger i[data-lucide="heart"],
.favorite-btn.btn-danger svg {
    color: white !important;
    stroke: white !important;
}

/* Outline buttons - Red heart for visibility on dark/transparent backgrounds */
.favorite-btn.btn-outline-danger i[data-lucide="heart"],
.favorite-btn.btn-outline-danger svg,
.favorite-btn.btn-outline-light i[data-lucide="heart"],
.favorite-btn.btn-outline-light svg {
    color: #dc3545 !important;
    stroke: #dc3545 !important;
}

/* Badge with heart icon - ensure white */
.badge.bg-danger i[data-lucide="heart"],
.badge.bg-danger svg {
    color: white !important;
    stroke: white !important;
}

.public-page .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.public-page .badge.bg-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* ============================================
   MOBILE RESPONSIVE STYLES (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
    /* Header: Logo più piccolo a sinistra, hamburger a destra sulla stessa linea */
    .navbar {
        padding: 0.5rem 1rem !important;
    }
    
    .navbar .container-fluid {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        position: relative !important;
    }
    
    .navbar-brand {
        margin-right: 0 !important;
        margin-left: 0 !important;
        order: 1;
        flex-shrink: 0;
    }
    
    .navbar-brand img {
        height: 35px !important;
        width: auto !important;
    }
    
    .navbar-toggler {
        order: 2;
        margin-left: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0;
    }
    
    /* Menu hamburger: mantiene l'effetto di abbassamento ma allineato a destra sotto l'hamburger */
    .navbar-collapse {
        order: 3;
        width: auto !important;
        flex-basis: auto !important;
        margin-top: 1rem !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.50) 0%, rgba(118, 75, 162, 0.50) 100%) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border-radius: 16px !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: 0 8px 32px 0 rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
        padding: 1rem !important;
        align-self: flex-end !important;
        min-width: 250px !important;
        max-width: 90vw !important;
    }
    
    /* Menu items allineati a destra */
    .navbar-collapse .navbar-nav {
        margin-left: 0 !important;
        margin-right: 0 !important;
        align-items: flex-end !important;
        width: 100% !important;
    }
    
    .navbar-collapse .nav-item {
        width: 100%;
        text-align: right;
    }
    
    .navbar-collapse .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 8px !important;
        margin-bottom: 0.25rem;
        justify-content: flex-end !important;
    }
    
    .navbar-collapse .nav-link:hover {
        background: rgba(255, 255, 255, 0.15) !important;
    }
    
    /* Pulsante Registrati: adatta al contenuto invece di full-width */
    .navbar-collapse .nav-item:last-child {
        width: auto !important;
        display: inline-block !important;
        margin-left: auto !important;
    }
    
    .navbar-collapse .nav-item:last-child .nav-link {
        width: auto !important;
        display: inline-flex !important;
    }
    
    /* Language switcher nel menu allineato a destra */
    .navbar-collapse .language-switcher {
        display: flex !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
        justify-content: flex-end !important;
    }
    
    /* Assicura che il menu non si estenda oltre lo schermo */
    @media (max-width: 480px) {
        .navbar-collapse {
            min-width: 200px !important;
            max-width: calc(100vw - 2rem) !important;
        }
    }
    
    /* Hero Section: Ridurre padding del glass-card per evitare che vada sotto l'header */
    .public-hero-section {
        padding: 80px 15px 40px 15px !important;
    }
    
    .public-hero-section .glass-card {
        padding: 30px 20px !important;
    }
    
    /* Titolo "Immagini di alta qualità": rimpicciolire */
    .public-hero-section .glass-card h1 {
        font-size: 2.3rem !important;
        margin-bottom: 15px !important;
    }
    
    .public-hero-section .glass-card p {
        font-size: 1rem !important;
        margin-bottom: 25px !important;
    }
    
    /* Barra di ricerca: ridurre padding interno per renderla più larga */
    .search-hero .search-box {
        padding: 12px 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .search-hero .search-box input {
        font-size: 0.95rem !important;
    }
    
    .search-hero .search-box button {
        padding: 8px 20px !important;
        font-size: 0.9rem !important;
    }
    
    /* Pagina scena: ridurre spazio tra header e scritta */
    .public-page .scene-hero-gradient {
        height: 120px !important;
    }
    
    .public-page .main-content-wrapper {
        margin-top: 0.5rem !important;
    }
    
    .public-page .d-flex.justify-content-between.align-items-center.mb-4 {
        margin-top: 1rem !important;
    }
    
    .scene-title {
        font-size: 1.25rem !important;
    }
}
