/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Main color scheme - dark mode photography studio look */
    --primary-color: #7638fa;
    --secondary-color: #00e6b3;
    --accent-color: #eb2859;
    --background-color: #121212;
    --card-bg-color: #1e1e1e;
    --text-color: #f5f5f5;
    --text-secondary: #b3b3b3;
    --shadow-color: rgba(0, 0, 0, 0.35);
    --glow-color: rgba(118, 56, 250, 0.5);

    /* UI Elements */
    --border-radius: 12px;
    --button-radius: 30px;
    --transition-speed: 0.3s;

    /* Gradients */
    --header-gradient: linear-gradient(135deg, #7638fa 0%, #00e6b3 100%);
    --button-gradient: linear-gradient(to right, var(--primary-color), #9370DB);
    --primary-button-gradient: linear-gradient(to right, var(--secondary-color), #00bfff);
    --card-gradient: linear-gradient(145deg, #1e1e1e, #2a2a2a);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all var(--transition-speed) ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.05) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.025) 2%, transparent 0%);
    background-size: 100px 100px;
    background-position: 0 0;
    min-height: 100vh;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulseOnce {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px var(--glow-color);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

@keyframes highlightEffect {
    0% {
        background-color: rgba(118, 56, 250, 0);
    }

    50% {
        background-color: rgba(118, 56, 250, 0.2);
    }

    100% {
        background-color: rgba(118, 56, 250, 0);
    }
}

@keyframes subtleBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
    /* Use !important to ensure override */
}

.visible {
    animation: fadeIn 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 50px;
    background: var(--header-gradient);
    border-radius: var(--border-radius);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: gradientShift 15s ease infinite;
    background-size: 200% 200%;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><rect fill="rgba(255,255,255,0.05)" width="50" height="50"/><rect fill="rgba(255,255,255,0.05)" width="50" height="50" x="50" y="50"/></svg>');
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 1;
}

header h1 {
    margin-bottom: 15px;
    font-size: 3.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

header p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Navigation Bar */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 20px;
}

.nav-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    color: var(--text-color);
    background: var(--header-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    pointer-events: none;

}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: rgba(118, 56, 250, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-btn i {
    font-size: 1.1rem;
}

/* View Sections */
.view-section {
    animation: fadeIn 0.5s ease;
}

/* Main Content Styles */
.prompt-container {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.prompt-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.9rem;
}

.prompt-container input[type="text"] {
    width: 85%;
    max-width: 600px;
    padding: 16px 20px;
    border: 2px solid rgba(118, 56, 250, 0.3);
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: var(--button-radius);
    font-size: 1.05rem;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(118, 56, 250, 0.1);
    transition: all 0.3s ease;
}

.prompt-container input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 5px 25px var(--glow-color), 0 0 0 2px rgba(118, 56, 250, 0.2);
}

.prompt-container input[type="text"]::placeholder,
.prompt-container textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.prompt-container textarea {
    width: 85%;
    max-width: 600px;
    padding: 16px 20px;
    border: 2px solid rgba(118, 56, 250, 0.3);
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: var(--border-radius);
    font-size: 1.05rem;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(118, 56, 250, 0.1);
    transition: all 0.3s ease;
    resize: none;
    /* Auto-resized by JS */
    min-height: 50px;
    margin-top: 0;
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.prompt-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 5px 25px var(--glow-color), 0 0 0 2px rgba(118, 56, 250, 0.2);
}

#enhanced-prompt-container {
    margin-top: 25px;
    animation: fadeIn 0.5s ease;
}

/* Style Buttons Container */
.style-buttons {
    margin-bottom: 35px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 15px;
    /* Space between buttons */
}

/* Preset Wrapper */
.preset-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
    margin-bottom: 12px;
    vertical-align: middle;
    white-space: nowrap;
    /* Prevent internal wrapping */
}

.style-btn {
    position: relative;
    background: rgba(30, 30, 30, 0.6);
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: var(--button-radius);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s ease;
}

.style-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-image: var(--button-gradient);
    transition: width 0.4s ease;
    z-index: -1;
}

.style-btn:hover::before {
    width: 100%;
}

.style-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(118, 56, 250, 0.2);
    color: white;
}

.style-btn.active {
    border-color: var(--secondary-color);
    background-image: var(--button-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(118, 56, 250, 0.2);
}

.booth-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: var(--card-gradient);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.camera-container {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

#camera {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
}

.camera-frame {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid var(--secondary-color);
    border-radius: calc(var(--border-radius) + 5px);
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 20px var(--glow-color);
    opacity: 0.8;
}

.controls {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn,
.upload-btn {
    padding: 15px 28px;
    background-image: var(--button-gradient);
    color: white;
    border: none;
    border-radius: var(--button-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 140px;
}

.btn::after,
.upload-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after,
.upload-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.btn:hover,
.upload-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.btn:active,
.upload-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background: linear-gradient(to right, #4a4a4a, #2d2d2d);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(0, 230, 179, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.icon-btn:hover {
    background: rgba(0, 230, 179, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 230, 179, 0.2);
}

.icon-btn:active {
    transform: translateY(0);
}

/* Separate Delete Button */
.preset-delete-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ff3b30;
    /* Bright Red */
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    opacity: 0.6;
    padding: 0;
}

.preset-delete-btn:hover {
    background: transparent;
    color: #ff0000;
    /* Even brighter on hover */
    transform: scale(1.2);
    box-shadow: none;
    opacity: 1;
}

.primary-btn {
    background-image: var(--primary-button-gradient);
    font-weight: 600;
    min-width: 180px;
}

/* Results Section */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.photo-container {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--card-bg-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.photo-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--glow-color);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-container:hover img {
    transform: scale(1.05);
}

.placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    padding: 20px;
    background: var(--card-gradient);
    flex-direction: column;
    gap: 15px;
}

.placeholder::before {
    content: "📷";
    font-size: 2.5rem;
    opacity: 0.7;
}

/* Loading Animation */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(118, 56, 250, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 15px var(--glow-color);
}

.loading p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Camera Error Message */
.camera-error {
    background: linear-gradient(145deg, #2a1a2e, #1a0e1e);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 20px 0;
    color: #ff6b81;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 51, 102, 0.2);
}

.camera-error .error-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.camera-error h3 {
    color: #ff6b81;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.camera-error ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.camera-error li {
    margin: 8px 0;
}

/* Status Message Area */
/* Status Message / Toast Notification */
.status-message {
    position: fixed;
    top: 90px;
    /* Below nav */
    right: 20px;
    padding: 15px 25px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    border-left: 4px solid var(--primary-color);
    transform: translateX(120%);
    /* Start off-screen */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.status-message:not(.hidden) {
    transform: translateX(0);
    /* Slide in */
}

/* Override existing success/error styles for toast look */
.status-message.error {
    background: linear-gradient(to right, #2a0e1e, #1a0a14);
    border-left-color: #ff6b81;
    color: #ffc2c2;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.status-message.success {
    background: linear-gradient(to right, #0e2a14, #0a1a0e);
    border-left-color: #5cdb95;
    color: #a8ffcd;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

/* Gallery Toggle */
.gallery-toggle-container {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 5px;
    margin: 20px auto 0;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(118, 56, 250, 0.4);
    font-weight: 600;
}

.toggle-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

footer p {
    position: relative;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-container {
        grid-template-columns: 1fr;
    }

    .loading {
        grid-column: 1;
    }

    .booth-container {
        padding: 20px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .btn,
    .upload-btn {
        padding: 12px 20px;
        min-width: 120px;
    }
}

@media (max-width: 500px) {
    header h1 {
        font-size: 2rem;
    }

    .controls {
        gap: 10px;
    }

    .btn,
    .upload-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Flash Effect CSS */
.flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

.flash-animation {
    animation: flash 0.75s ease-out;
}

@keyframes flash {
    0% {
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Additional UI enhancement classes */
.highlight {
    animation: highlightEffect 1s ease;
}

.pulse-once {
    animation: pulseOnce 1s ease-in-out;
}

.processing {
    position: relative;
    overflow: hidden;
}

.processing::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--primary-color));
    animation: gradientShift 2s linear infinite;
    background-size: 200% 200%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}



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

.gallery-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1;
    /* Square tiles */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.badge-container {
    display: flex;
    flex-direction: column;
    /* Stack badges */
    gap: 5px;
    align-items: flex-start;
}

/* Base Badge Style - update to be more generic if needed, or keeping current */
.gallery-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.badge-transformed {
    background: rgba(118, 56, 250, 0.3);
    border: 1px solid var(--primary-color);
    color: #d4bfff;
}

.badge-original {
    background: rgba(0, 230, 179, 0.3);
    border: 1px solid var(--secondary-color);
    color: #bffff2;
}

.badge-preset {
    background: rgba(40, 150, 235, 0.3);
    /* Blueish */
    border: 1px solid #2896EB;
    color: #bfdfff;
}





/* Selection Toolbar */
.selection-toolbar {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    animation: fadeIn 0.3s ease;
}

.selection-count {
    font-weight: 600;
    color: var(--text-color);
}

.selection-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.preset-filter {
    background: var(--card-bg-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.preset-filter option {
    background: var(--card-bg-color);
    color: var(--text-color);
    padding: 10px;
}

.delete-btn {
    color: #ff6b6b !important;
    border: 1px solid rgba(255, 107, 107, 0.3) !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

.delete-btn:hover {
    background: rgba(255, 107, 107, 0.2) !important;
}

/* Selection State on Gallery Items */
.gallery-item {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    /* Prevent iOS context menu on long press */
}

.gallery-item.selected {
    border: 3px solid var(--secondary-color);
    transform: scale(0.95);
}

.gallery-item .selection-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid white;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    z-index: 10;
}

/* Show check circle on hover or when selected */
.gallery-item:hover .selection-overlay,
.gallery-item.selected .selection-overlay {
    display: flex;
}

.gallery-item.selected .selection-overlay {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.gallery-item.selected .selection-overlay::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}