/* Primary Brand Font - Active */
@font-face {
    font-family: '汉仪永字山河隶 95J';
    src: url('/fonts/HYYongZiShanHeLi95J_v4.woff2?v=2026') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
    /* Use 'block' to ensure custom font always displays (waits up to 3s) */
}

/* Optional Fonts - Uncomment if needed */
/*
@font-face {
    font-family: '汉仪永字山河隶 95F';
    src: url('/fonts/HYYongZiShanHeLi95F_v4.woff2?v=2026') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: '汉仪永字山河隶 85J';
    src: url('/fonts/HYYongZiShanHeLi85J_v4.woff2?v=2026') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: '汉仪永字山河隶 85W';
    src: url('/fonts/HYYongZiShanHeLi85W_v4.woff2?v=2026') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
*/

:root {
    --primary-color: #7c3aed;
    --primary-hover: #6d28d9;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.45);
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(226, 232, 240, 0.3);
    --glass-effect: blur(25px);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(-45deg,
            #e0c3fc,
            /* Mauve (Purple) */
            #c7b3ff,
            /* Lavender (Purple) */
            #a8c0ff,
            /* Periwinkle (Blue/Purple) */
            #8ec5fc,
            /* Sky Blue (Blue) */
            #b3e5fc,
            /* Light Blue (Blue) */
            #b2ebf2,
            /* Cyan (Blue/Green) */
            #c5e1a5,
            /* Light Green (Green) */
            #34d399,
            /* Emerald Green */
            #d1c4e9,
            /* Lilac (Purple) */
            #e0c3fc
            /* Back to Mauve */
        );
    background-size: 400% 400%;
    /* Speed up animation to 10s to make flow more obvious */
    animation: gradientBG 10s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

h1 {
    font-family: '汉仪永字山河隶 95J', sans-serif !important;
    color: #FFFFFF;
    /* Pure White for maximum visibility */
    text-align: center;
}

body.fonts-ready {
    opacity: 1;
}

#login-bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    /* Moved further back */
    object-fit: fill;
    /* Filter removed for performance */
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    /* Lightened from 0.15 for better contrast */
    z-index: -1;
    /* Above video, below content */
    pointer-events: none;
}

/* Specific background for Login Page */
body.login-page {
    background: transparent;
    animation: none;
}

body.login-page::before,
body.login-page::after {
    display: none;
}

/* User Profile Sidebar Styles */
.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.user-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.5rem;
}

/* Floating orbs for dreamy effect */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #667eea 0%, #764ba2 100%);
    top: -250px;
    right: -250px;
    animation-delay: -10s;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4facfe 0%, #00f2fe 100%);
    bottom: -200px;
    left: -200px;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, -100px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* Ensure content is above background effects */
.login-container,
.gallery-layout {
    position: relative;
    z-index: 1;
}

/* Login Page Redesign */
/* Login Page Redesign */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    gap: 12rem;
    /* Increased gap */
    position: relative;
    /* Removed background: #f0f2f5 to allow body gradient to show */
}

/* Left: Independent Image Section */
.login-image-section {
    width: 650px;
    height: 650px;
    /* 5:4 Aspect Ratio (Landscape) */
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.25),
        0 0 100px rgba(139, 92, 246, 0.2);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    background: transparent;
    border: none;
    box-shadow: none;
}

.login-image-section:hover {
    transform: none;
    box-shadow: none;
}

.login-decoration-image {
    display: none;
    /* Hide since it's now the background */
}

/* Right: Independent Form Section */
/* Liquid Glass Aesthetic - Champagne Pearl Style */
.login-form-section {
    width: 360px;
    padding: 1.5rem;

    background: rgba(255, 255, 255, 0.08);
    /* Minimal opacity for background flow */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border-radius: 1.25rem;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 253, 245, 0.2);
    /* Warm Champagne border tint */

    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Decorative background elements for form card - Made very subtle or removed for clean look */
.login-form-section::before,
.login-form-section::after {
    display: none;
}

/* Ensure logo is nicely positioned above */
.login-form-section .brand-logo {
    margin-bottom: 1rem;
    /* Compact logo margin */
    justify-content: center;
}

.login-form-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
    /* Minimal spacing */
}

/* Specific overrides for smaller inputs on login page */
.login-form-container .form-input {
    padding: 0.6rem 0.9rem;
    /* Very compact */
    font-size: 0.85rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    /* Cleaner almost white */
    border: 1px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.login-form-container .form-input:focus {
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05), 0 0 0 2px rgba(124, 58, 237, 0.2);
    transform: translateY(-1px);
}

.login-form-container .btn-primary {
    padding: 0.7rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    width: 100%;

    /* Gradient Button */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 8px 16px -8px rgba(124, 58, 237, 0.5);
    letter-spacing: 0.05em;
}

.login-form-container .btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px -8px rgba(124, 58, 237, 0.6);
}

.login-form-container .form-group {
    margin-bottom: 0.75rem;
    /* Super tight */
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 3.5rem;
    color: var(--text-color);
    align-self: center;
    margin-bottom: 3rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Specific styles for Login page Brand - Champagne Pearl (Warm Contrast) */
.brand-text-main {
    font-size: 3.85rem;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 0.25rem;
    font-family: '汉仪永字山河隶 95J', sans-serif !important;
    color: #FFFFFF;
    /* Pure White for maximum visibility */
    letter-spacing: 0.12em;
    filter: drop-shadow(0 2px 4px rgba(60, 40, 30, 0.1));
    /* Warm organic depth */
}

.brand-logo svg {
    width: 48px;
    height: 48px;
    stroke-width: 2.5;
    /* Ensure icon follows gradient or specific color */
    stroke: #7c3aed;
}

.login-header {
    margin-bottom: 2rem;
    text-align: center;
    /* Center the welcome message too for consistency */
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: left;
    /* Restored gradient text */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 200%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.login-subtitle {
    color: #94A3B8;
    /* var(--text-secondary) */
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #333;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #7c3aed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    transform: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    cursor: pointer;
}

.forgot-password {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: #1a1a1a;
    /* Black button as per design */
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    animation: none;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-login {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.btn-google {
    width: 100%;
    padding: 0.875rem;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #d1d5db;
}

.icon-google {
    width: 20px;
    height: 20px;
}

.signup-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.signup-link a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Login */
@media (max-width: 1100px) {
    .login-container {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
        height: auto;
        min-height: 100vh;
        justify-content: center;
    }

    .login-image-section {
        width: 100%;
        max-width: 450px;
        height: 300px;
        /* Reduced height for mobile */
        border-radius: 1.5rem;
    }

    .login-form-section {
        width: 100%;
        max-width: 450px;
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .login-image-section {
        height: 200px;
    }

    .login-container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .login-form-section {
        padding: 1.5rem;
    }

    .brand-logo {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Gallery Page */
.gallery-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-effect);
    -webkit-backdrop-filter: var(--glass-effect);
    border-right: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 2rem 2rem 1rem 2rem;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.sidebar-filters {
    flex: 1;
    overflow-y: auto;
    padding: 0 2rem 1rem 2rem;
}

.sidebar-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    cursor: pointer;
    user-select: none;
}

.filter-header:hover .filter-title {
    color: var(--primary-color);
}

.filter-header:hover .filter-icon {
    color: var(--primary-color);
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    transition: color 0.2s ease;
}

.filter-icon {
    color: var(--text-secondary);
    transition: transform 0.3s ease, color 0.2s ease;
    transform: rotate(-90deg);
    /* Default closed (pointing right) */
}

.filter-icon.expanded {
    transform: rotate(0deg);
    /* Open (pointing down) */
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin-bottom 0.4s ease;
    opacity: 0;
    margin-bottom: 0;
}

.filter-options.expanded {
    max-height: 3000px;
    /* Increased to allow all styles to show */
    opacity: 1;
    margin-bottom: 1.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(124, 58, 237, 0.08);
    transform: translateX(5px);
}

.filter-checkbox {
    accent-color: var(--primary-color);
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.gallery-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    /* Reduced from 2rem */
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 3rem 1rem 1rem 1rem;
    /* Reduced bottom padding */
    background: transparent;
    border-radius: 1rem;
    min-height: 250px;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 0;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gallery-title {
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    font-family: '汉仪永字山河隶 95J', sans-serif !important;
    color: #FFFFFF;
    /* Pure White for maximum visibility */
    filter: drop-shadow(0 4px 12px rgba(60, 40, 30, 0.15));
    margin-bottom: 1.5rem;
    white-space: nowrap;
    background: none;
    -webkit-text-fill-color: initial;
}



.result-count {
    font-size: 4rem;
    font-weight: 800;
    /* Reverted to original vibrant blue-purple-pink gradient */
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 50%, #db2777 100%);
    background-size: 200% 200%;
    /* For flowing animation */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));

    margin-bottom: 0.5rem;
    padding: 0;
    backdrop-filter: none;
    border-radius: 0;
    display: inline-block;
    box-shadow: none;
    transition: all 0.3s ease;
    line-height: 1;
    margin-left: 0.5rem;
    animation: gradient-flow 8s ease infinite;
    /* Color flow animation */
}

.gallery-marquee {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    /* Increased visibility */
    display: flex;
    align-items: center;
    pointer-events: none;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 1rem;
    animation: scroll 60s linear infinite;
    width: max-content;
}

.marquee-item {
    height: 220px;
    /* Increased size */
    width: auto;
    border-radius: 0.5rem;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}



/* Search Bar Styles */
.search-container {
    position: relative;
    z-index: 2;
    /* Ensure it's clickable and above marquee */
    width: 100%;
    max-width: 500px;
    margin-top: 1rem;
    /* Reduced from 2rem */
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    /* Left padding for icon */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    /* Pill shape */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}



.pattern-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-effect);
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
}

.pattern-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(124, 58, 237, 0.2),
        0 0 50px rgba(79, 172, 254, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.pattern-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pattern-card:hover .pattern-image {
    transform: scale(1.05);
}

.pattern-info {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.5);
}

.pattern-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    color: var(--text-color);
}

.pattern-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(79, 172, 254, 0.15) 100%);
    color: #6d28d9;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.2);
    transition: all 0.2s ease;
}

.tag:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(79, 172, 254, 0.25) 100%);
    transform: scale(1.05);
}

/* Scrollbar styling for dreamy effect */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5568d3 0%, #653a8b 100%);
}

/* Modal Styles - Classic Solid Aesthetic */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    /* Solid overlay for focus */
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background: #d8d8d8;
    /* Restored solid classic gray */
    margin: 2% auto;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* 关键修复：左右布局 */
.modal-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    /* Image takes remaining space, Info fixed width */
    gap: 2rem;
    padding: 2rem;
    align-items: center;
}

.modal-image-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.3;
}

.modal-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

.modal-tags {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-tag-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tag-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

/* Responsive Modal */
@media (max-width: 968px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-image-container img {
        max-height: 50vh;
    }
}

/* Make pattern cards clickable */
.pattern-card {
    cursor: pointer;
}

.pattern-card .pattern-image {
    cursor: pointer;
}

/* Update: Subtitle Styles - Cloud Silver Clarity */
.gallery-subtitle {
    font-size: 1.65rem;
    font-weight: 900;
    color: #FFFFFF;
    /* Pure White - Same as title */
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    filter: drop-shadow(0 4px 12px rgba(60, 40, 30, 0.15));
    /* Match title shadow for consistency */
    opacity: 1 !important;
}

/* Prevent wrapping */


/* Adjustments for logo text container */
.brand-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered alignment */
}

/* Removed redundant/conflicting color overrides */

.brand-text-sub {
    font-size: 1.05rem;
    font-weight: 900;
    color: #FFFFFF;
    /* Pure White - Same as title */
    margin-top: 0;
    letter-spacing: 0.08em;
    white-space: nowrap;
    filter: drop-shadow(0 2px 4px rgba(60, 40, 30, 0.1));
    /* Match title shadow for consistency */
    opacity: 1 !important;
}

/* Prevent wrapping on login page card */


/* Color Circle Utility */
.color-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-circle.red {
    background-color: #ef4444;
}

.color-circle.yellow {
    background-color: #f59e0b;
}

.color-circle.blue {
    background-color: #3b82f6;
}

.color-circle.green {
    background-color: #10b981;
}

.color-circle.purple {
    background-color: #8b5cf6;
}

.color-circle.orange {
    background-color: #f97316;
}

.color-circle.pink {
    background-color: #ff85a2;
}

.color-circle.black {
    background-color: #000000;
}

.color-circle.white {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
}

.color-circle.gray {
    background-color: #71717a;
}

.color-circle.brown {
    background-color: #78350f;
}

/* ========================================
   Batch Operation Styles
   ======================================== */

/* Batch Operation Panel */
.batch-operation-panel {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fef3f2 0%, #fef2f2 100%);
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid #fecaca;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Batch Buttons */
.batch-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.batch-btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.batch-btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.batch-btn-danger:active {
    transform: translateY(0);
}

/* Batch Checkbox Label */
.batch-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.batch-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.5);
}

.batch-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Image Card Selection Checkbox */
.pattern-card {
    position: relative;
}

.selection-checkbox-container {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pattern-card.multi-select-mode .selection-checkbox-container {
    opacity: 1;
}

.selection-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid white;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.selection-checkbox:checked {
    background: #db2777;
    border-color: #db2777;
}

.selection-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.selection-checkbox:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(219, 39, 119, 0.2);
}

/* Selected Card State */
.pattern-card.selected {
    outline: 3px solid #db2777;
    outline-offset: -3px;
    box-shadow: 0 0 0 4px rgba(219, 39, 119, 0.2);
}

/* Floating Action Bar */
.floating-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fab-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fab-count {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.fab-actions {
    display: flex;
    gap: 0.75rem;
}

.fab-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.fab-btn-primary {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    color: white;
}

.fab-btn-primary:hover {
    background: linear-gradient(135deg, #be185d 0%, #9f1239 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.3);
}

.fab-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.fab-btn-secondary:hover {
    background: #e2e8f0;
}

.fab-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fab-content {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .fab-actions {
        width: 100%;
    }

    .fab-btn {
        flex: 1;
    }
}