:root {
    --primary-color: #06f;
    --secondary-color: #00e5ff;
    --accent-color: #ff00c8;
    --dark-bg: #0a0e17;
    --darker-bg: #060a12;
    --light-text: #e0e6ff;
    --glow-effect: 0 0 10px rgba(0, 229, 255, 0.7);
    --glow-strong: 0 0 15px rgba(0, 229, 255, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--light-text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body.modal-open {
    overflow: hidden;
}

/* Background elements */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    opacity: 0.4;
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle at center, var(--secondary-color), transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

.neural-network {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.neural-node {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse 5s infinite ease-in-out;
}

.neural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
    opacity: 0.15;
    animation: pulse-connection 2s infinite ease-in-out;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Logo */
header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6, 102, 255, 0.3), rgba(0, 229, 255, 0.3));
    box-shadow: var(--glow-effect);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--secondary-color);
    animation: pulse 3s infinite alternate;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--glow-effect);
    margin-bottom: 10px;
}

.accent {
    color: var(--accent-color);
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(224, 230, 255, 0.7);
    margin-bottom: 15px;
}

.ai-status {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    background-color: rgba(0, 229, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Search Box */
.search-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
}

#search-form {
    display: flex;
    align-items: center;
    background-color: rgba(10, 14, 23, 0.8);
    border-radius: 30px;
    padding: 8px 8px 8px 20px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    gap: 10px;
    /* Add consistent spacing */
    flex-wrap: nowrap;
    /* Prevent wrapping */

}

#search-form:focus-within {
    border-color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

.ai-icon {
    color: var(--secondary-color);
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.pulse {
    position: absolute;
    top: 50%;
    left: 32px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 229, 255, 0.1);
    z-index: 1;
    animation: pulse-search 2s infinite;
    pointer-events: none;
    opacity: 0;
}

.search-animation {
    position: absolute;
    right: 220px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#search-box {
    flex: 1;
    min-width: 0;
    /* Prevent flex item from overflowing */
    background: transparent;
    border: none;
    outline: none;
    color: var(--light-text);
    font-size: 1rem;
    padding: 10px 0;
}

#search-box::placeholder {
    color: rgba(224, 230, 255, 0.5);
    font-size: 0.9rem;
}

#voice-search {
    flex: 0 0 40px;
    /* Don't grow, don't shrink, fixed width */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 229, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

#voice-search:hover {
    background-color: rgba(0, 229, 255, 0.2);
}

#voice-search svg {
    width: 20px;
    height: 20px;
    fill: var(--secondary-color);
}

#search-button {
    flex: 0 0 auto;
    /* Don't grow, don't shrink, size to content */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 24px;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

#search-button:hover {
    box-shadow: var(--glow-effect);
    transform: translateY(-2px);
}

.button-text {
    margin-right: 8px;
}

#search-options-toggle {
    flex: 0 0 40px;
    /* Don't grow, don't shrink, fixed width */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 229, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

#search-options-toggle:hover {
    background-color: rgba(0, 229, 255, 0.2);
}

.voice-waves {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 20px;
    opacity: 0;
    pointer-events: none;
}

.wave {
    width: 3px;
    height: 100%;
    background-color: var(--secondary-color);
    margin: 0 2px;
    border-radius: 2px;
    animation: wave 1.2s infinite ease-in-out;
}

.wave:nth-child(2) {
    animation-delay: 0.1s;
}

.wave:nth-child(3) {
    animation-delay: 0.2s;
}

.wave:nth-child(4) {
    animation-delay: 0.3s;
}

.wave:nth-child(5) {
    animation-delay: 0.4s;
}

.wave:nth-child(6) {
    animation-delay: 0.5s;
}

.wave:nth-child(7) {
    animation-delay: 0.6s;
}

.wave:nth-child(8) {
    animation-delay: 0.7s;
}

.search-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background-color: var(--darker-bg);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: none;
}

.search-options.active {
    display: block;
}

.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.options-header h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
}

#close-options {
    font-size: 1.5rem;
    color: rgba(224, 230, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s ease;
}

#close-options:hover {
    color: var(--secondary-color);
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(224, 230, 255, 0.8);
    font-size: 0.9rem;
}

.pill-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-option {
    background-color: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 20px;
    padding: 6px 15px;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pill-option:hover {
    background-color: rgba(0, 229, 255, 0.2);
}

.pill-option.active {
    background-color: rgba(0, 229, 255, 0.3);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
}

#color-analysis {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: -8px;
    background-color: rgba(0, 229, 255, 0.1);
    border-radius: 34px;
    transition: 0.4s;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--light-text);
    border-radius: 50%;
    transition: 0.4s;
}

#color-analysis:checked+.toggle-label {
    background-color: var(--secondary-color);
}

#color-analysis:checked+.toggle-label:before {
    transform: translateX(26px);
}

/* Slider */
.slider-container {
    width: 100%;
}

#ai-slider {
    width: 100%;
    height: 4px;
    background: rgba(0, 229, 255, 0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

#ai-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.7);
}

#ai-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.7);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(224, 230, 255, 0.7);
}

/* Feature Cards */
.ai-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 50px;
}

.feature-card {
    background-color: rgba(10, 14, 23, 0.7);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    transition: all 0.3s ease;
    width: 250px;
}

.feature-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--glow-effect);
    transform: translateY(-5px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6, 102, 255, 0.1), rgba(0, 229, 255, 0.1));
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

.feature-desc {
    color: rgba(224, 230, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Enhanced AI Metrics */
.ai-metrics {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.metric-card {
    text-align: center;
    padding: 15px;
    padding-bottom: 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    width: 160px;
    cursor: pointer;
}

.metric-card:hover {
    transform: translateY(-5px);
    background-color: rgba(0, 229, 255, 0.05);
    box-shadow: var(--glow-effect);
}

.metric-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.metric-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.4));
}

.metric-ring circle {
    fill: none;
    stroke-width: 12;
    transition: stroke-dashoffset 1.5s ease-in-out, stroke 0.3s ease;
}

.metric-bg {
    stroke: rgba(0, 229, 255, 0.1);
}

.metric-progress {
    stroke: var(--secondary-color);
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-dasharray: 339.29;
}

.metric-card:hover .metric-progress {
    stroke: var(--accent-color);
}

.metric-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.metric-card:hover .metric-value {
    color: var(--accent-color);
    transform: translate(-50%, -50%) scale(1.05);
    text-shadow: 0 0 8px rgba(255, 0, 200, 0.5);
}

.metric-label {
    font-size: 1rem;
    color: rgba(224, 230, 255, 0.8);
    margin-bottom: 6px;
}

.metric-description {
    font-size: 0.8rem;
    color: rgba(224, 230, 255, 0.6);
    max-width: 140px;
    margin: 0 auto;
    height: 32px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.metric-card:hover .metric-description {
    opacity: 1;
    transform: translateY(0);
}

.pulse-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    opacity: 0;
}

.metric-card:hover .pulse-ring {
    animation: pulse-metric 2s infinite;
}

@keyframes pulse-metric {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    70% {
        transform: scale(1.1);
        opacity: 0;
    }

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

/* Image Categories */
.image-categories {
    margin-bottom: 40px;
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--light-text);
}

.category-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-pill {
    display: flex;
    align-items: center;
    background-color: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 25px;
    padding: 8px 20px;
    color: var(--light-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-pill:hover {
    background-color: rgba(0, 229, 255, 0.2);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--glow-effect);
}

.category-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-ring {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
}

.loader-circle {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(0, 229, 255, 0.2);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loader-lines {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.loader-line {
    width: 3px;
    height: 20px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    animation: wave 1.2s infinite ease-in-out;
}

.loader-line:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-line:nth-child(3) {
    animation-delay: 0.4s;
}

.loader-text {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background-color: rgba(0, 229, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background-color: var(--secondary-color);
    width: 0;
    animation: progress 3s ease;
}

/* Search Results */
.search-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.image-box {
    background-color: var(--darker-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-box:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

.result-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.image-overlay {
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
}

.photographer {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--light-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-tag {
    display: flex;
    justify-content: space-between;
    color: rgba(224, 230, 255, 0.6);
    font-size: 0.85rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 0;
    display: none;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--secondary-color);
    opacity: 0.7;
}

.no-results-icon svg {
    width: 100%;
    height: 100%;
}

.no-results-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

.no-results-message {
    color: rgba(224, 230, 255, 0.7);
    max-width: 400px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Show More Button */
.show-more-btn {
    display: block;
    width: 180px;
    margin: 20px auto 40px;
    background: linear-gradient(135deg, rgba(6, 102, 255, 0.3), rgba(0, 229, 255, 0.3));
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    color: var(--secondary-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.show-more-btn:hover {
    background: linear-gradient(135deg, rgba(6, 102, 255, 0.5), rgba(0, 229, 255, 0.5));
    box-shadow: var(--glow-effect);
    transform: translateY(-3px);
}

.show-more-btn span {
    margin-right: 8px;
}


/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: none;
}

.image-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(6, 10, 18, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background-color: var(--darker-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 229, 255, 0.2);
    display: flex;
    flex-direction: column;
    /* overflow: hidden; */
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(0, 229, 255, 0.2);
    color: var(--secondary-color);
}

.modal-image-container {
    flex: 1;
    max-height: 70vh;
    overflow: hidden;
    position: relative;
}

#modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    width: 100%;
    padding: 20px;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
    }

    .modal-info {
        width: 300px;
        max-height: 70vh;
        border-left: 1px solid rgba(0, 229, 255, 0.1);
    }
}

.modal-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--light-text);
}

.modal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-stat {
    display: flex;
    align-items: center;
    color: rgba(224, 230, 255, 0.7);
    font-size: 0.9rem;
}

.modal-stat svg {
    margin-right: 8px;
    color: var(--secondary-color);
}

.ai-analysis {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(0, 229, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.1);
}

.ai-analysis h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.analysis-item {
    margin-bottom: 10px;
}

.analysis-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(224, 230, 255, 0.7);
    margin-bottom: 5px;
}

.analysis-value {
    font-size: 0.95rem;
    color: var(--light-text);
}

.color-palette {
    display: flex;
}

.color-swatch {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    margin: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.color-swatch:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.color-percentage {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: var(--light-text);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-swatch:hover .color-percentage {
    opacity: 1;
}

.color-analysis-loader .loader-text {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.download-btn,
.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 8px;
    background-color: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--light-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover,
.share-btn:hover {
    background-color: rgba(0, 229, 255, 0.2);
    border-color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

.download-btn svg,
.share-btn svg {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Modal Scrollbar Styling */
.modal-info::-webkit-scrollbar {
    width: 8px;
}

.modal-info::-webkit-scrollbar-track {
    background: rgba(0, 229, 255, 0.05);
    border-radius: 4px;
}

.modal-info::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-info::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.3);
}

/* Firefox scrollbar styling */
.modal-info {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 255, 0.2) rgba(0, 229, 255, 0.05);
}

/* AI Assistant */
.ai-assistant-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-effect);
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
}

.ai-assistant-bubble:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-strong);
}

.assistant-icon {
    color: white;
}

.ai-chat-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    height: 500px;
    background-color: var(--darker-bg);
    border-radius: 15px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 50;
    display: none;
}

.ai-chat-panel.active {
    display: flex;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: rgba(0, 229, 255, 0.05);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.chat-title {
    flex: 1;
}

.chat-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 229, 255, 0.1);
    border: none;
    color: rgba(224, 230, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background-color: rgba(0, 229, 255, 0.2);
    color: var(--light-text);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
}

.message.user {
    align-self: flex-end;
    background-color: rgba(6, 102, 255, 0.2);
    border-bottom-right-radius: 5px;
    color: var(--light-text);
}

.message.system {
    align-self: flex-start;
    background-color: rgba(0, 229, 255, 0.1);
    border-bottom-left-radius: 5px;
    color: var(--light-text);
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-avatar {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
}

.chat-input {
    padding: 15px;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-input-field {
    flex: 1;
    background-color: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    color: var(--light-text);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

#chat-input-field:focus {
    border-color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

#chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#chat-send:hover {
    box-shadow: var(--glow-effect);
    transform: scale(1.05);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
}

.footer-content {
    margin-bottom: 20px;
}

.footer-logo {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--light-text);
}

.footer-logo .accent {
    color: var(--accent-color);
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.footer-bottom {
    color: rgba(224, 230, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

@keyframes pulse-search {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }

    50% {
        opacity: 0.4;
        transform: translateY(-50%) scale(1.5);
    }

    100% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
}

@keyframes wave {

    0%,
    100% {
        height: 5px;
    }

    50% {
        height: 15px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes progress {
    0% {
        width: 0;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes typing {

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

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-20px) translateX(10px);
    }

    50% {
        transform: translateY(0) translateX(20px);
    }

    75% {
        transform: translateY(20px) translateX(10px);
    }

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

@keyframes pulse-connection {

    0%,
    100% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {

    .search-result-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }

    .ai-chat-panel {
        width: 300px;
        height: 450px;
        bottom: 20px;
        right: 20px;
    }

    .ai-assistant-bubble {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {

    .search-result-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat-panel {
        width: calc(100% - 40px);
        height: 400px;
    }

    .modal-info {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}

/* Search Container Responsive Styles */
@media (max-width: 768px) {
    .search-container {
        padding: 0 15px;
        margin-bottom: 30px;
    }

    #search-form {
        padding: 8px;
    }

    .search-animation {
        display: none;
    }

    #voice-search {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }

    #search-options-toggle {
        width: 36px;
        height: 36px;
        margin-left: 8px;
    }

    #search-button {
        padding: 8px 15px;
    }
}

@media (max-width: 576px) {
    .search-container {
        padding: 0 10px;
        margin-bottom: 20px;
    }

    #search-form {
        padding: 6px;
    }

    .ai-icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    #search-box {
        font-size: 0.9rem;
        padding: 8px 0;
    }

    #search-box::placeholder {
        font-size: 0.7rem;
    }

    #voice-search {
        width: 32px;
        height: 32px;
        margin-right: 6px;
    }

    #voice-search svg {
        width: 16px;
        height: 16px;
    }

    #search-button {
        padding: 6px 12px;
    }

    .button-text {
        display: none;
    }

    #search-options-toggle {
        width: 32px;
        height: 32px;
        margin-left: 6px;
    }

    #search-options-toggle svg {
        width: 16px;
        height: 16px;
    }

    .search-options {
        padding: 15px;
    }

    .pill-options {
        gap: 8px;
    }

    .pill-option {
        padding: 4px 12px;
        font-size: 0.9rem;
    }

    .voice-waves {
        left: 50px;
        height: 16px;
    }

    .wave {
        width: 2px;
        margin: 0 1px;
    }
}

@media (max-width: 380px) {
    .search-container {
        padding: 0 5px;
    }

    #search-form {
        padding: 4px;
    }

    .ai-icon {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }

    #search-box {
        font-size: 0.85rem;
    }

    #search-box::placeholder {
        font-size: 0.60rem;
    }

    #voice-search,
    #search-options-toggle {
        width: 28px;
        height: 28px;
    }

    #voice-search svg,
    #search-options-toggle svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    #search-form {
        padding: 6px;
        gap: 6px;
        /* Reduce spacing on mobile */
    }

    #voice-search,
    #search-options-toggle {
        flex: 0 0 32px;
        /* Smaller fixed size on mobile */
        width: 32px;
        height: 32px;
    }

    #search-options-toggle svg {
        width: 16px;
        height: 16px;
    }

    .search-options {
        padding: 15px;
    }

    .pill-options {
        gap: 8px;
    }

    .pill-option {
        padding: 4px 12px;
        font-size: 0.9rem;
    }

    .voice-waves {
        left: 50px;
        height: 16px;
    }

    .wave {
        width: 2px;
        margin: 0 1px;
    }

    #search-button {
        padding: 6px 12px;
    }

    .button-text {
        display: none;
        /* Hide text, show only icon */
    }

}

@media (max-width: 360px) {
    #search-form {
        padding: 4px;
        gap: 4px;
    }

    #voice-search,
    #search-options-toggle {
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
    }

    #search-button {
        padding: 4px 10px;
    }

    #voice-search svg,
    #search-options-toggle svg {
        width: 14px;
        height: 14px;
    }

    #search-box::placeholder {
        font-size: 0.60rem;
    }
}

/* Header & Logo Responsive Styles */
@media (max-width: 768px) {
    .logo-container {
        margin-bottom: 15px;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
        margin-right: 12px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 20px;
        margin-bottom: 12px;
    }

    .ai-status-indicator {
        padding: 4px 10px;
    }

    .status-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .logo-container {
        margin-bottom: 12px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
        padding: 0 15px;
        margin-bottom: 10px;
    }

    .ai-status {
        margin-top: 8px;
    }

    .ai-status-indicator {
        padding: 3px 8px;
    }

    .pulse-dot {
        width: 6px;
        height: 6px;
        margin-right: 6px;
    }

    .status-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .logo-container {
        margin-bottom: 10px;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
        padding: 0 10px;
        margin-bottom: 15px;
    }

    .ai-status-indicator {
        padding: 3px 6px;
    }

    .status-text {
        font-size: 0.75rem;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .loader {
        padding: 30px 0;
        margin-bottom: 25px;
    }

    .loader-ring {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .loader-text {
        font-size: 0.95rem;
    }

    .loader-progress {
        width: 180px;
    }
}

@media (max-width: 576px) {
    .loader {
        padding: 25px 0;
        margin-bottom: 20px;
    }

    .loader-ring {
        width: 50px;
        height: 50px;
    }

    .loader-circle {
        border-width: 2.5px;
    }

    .loader-text {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .loader-progress {
        width: 150px;
        height: 3px;
    }

    .loader-line {
        width: 2.5px;
        height: 16px;
    }
}

@media (max-width: 360px) {
    .loader {
        padding: 20px 0;
        margin-bottom: 15px;
    }

    .loader-ring {
        width: 40px;
        height: 40px;
    }

    .loader-circle {
        border-width: 2px;
    }

    .loader-text {
        font-size: 0.85rem;
    }

    .loader-progress {
        width: 120px;
        height: 2.5px;
    }

    .loader-line {
        width: 2px;
        height: 14px;
    }
}

/* Large devices (tablets, less than 992px) */
@media (max-width: 991px) {
    .ai-metrics {
        gap: 25px;
        margin-bottom: 40px;
    }

    .metric-ring {
        width: 110px;
        height: 110px;
    }

    .metric-value {
        font-size: 1.3rem;
    }

    .metric-label {
        font-size: 0.95rem;
    }
}

/* Medium devices (tablets, less than 768px) */
@media (max-width: 767px) {
    .ai-metrics {
        gap: 20px;
        margin-bottom: 35px;
    }

    .metric-ring {
        width: 100px;
        height: 100px;
    }

    .metric-ring circle {
        stroke-width: 10;
    }

    .metric-value {
        font-size: 1.2rem;
    }

    .metric-label {
        font-size: 0.9rem;
    }
}

/* Small devices (landscape phones, less than 576px) */
@media (max-width: 575px) {
    .ai-metrics {
        gap: 12px;
        margin-bottom: 30px;
        /* Remove flex-direction: column */
        /* Remove align-items: center */
        justify-content: center;
    }

    .metric-card {
        /* Remove width: 100% */
        /* Adjust max-width for better fit in row */
        max-width: 140px;
        padding: 5px;
    }

    .metric-ring {
        width: 80px;
        height: 80px;
        margin-bottom: 8px;
    }

    .metric-ring circle {
        stroke-width: 8;
    }

    .metric-value {
        font-size: 1rem;
    }

    .metric-label {
        font-size: 0.8rem;
    }
}

/* Extra small devices (phones, less than 380px) */
@media (max-width: 379px) {
    .ai-metrics {
        gap: 10px;
        margin-bottom: 25px;
    }

    .metric-card {
        max-width: 100px;
        padding: 3px;
    }

    .metric-ring {
        width: 70px;
        height: 70px;
        margin-bottom: 6px;
    }

    .metric-ring circle {
        stroke-width: 6;
    }

    .metric-value {
        font-size: 0.9rem;
    }

    .metric-label {
        font-size: 0.75rem;
    }

    .search-heading {
        font-size: 1.2rem;
    }

}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 18px;
    }

    .category-pills {
        gap: 12px;
    }

    .category-pill {
        padding: 7px 18px;
        font-size: 0.9rem;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .image-categories {
        margin-bottom: 35px;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .category-pills {
        gap: 10px;
    }

    .category-pill {
        padding: 6px 16px;
        font-size: 0.85rem;
    }

    .category-icon {
        font-size: 1rem;
        margin-right: 6px;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .image-categories {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .category-pills {
        gap: 8px;
    }

    .category-pill {
        padding: 5px 14px;
        font-size: 0.8rem;
    }

    .category-icon {
        font-size: 0.9rem;
        margin-right: 5px;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .image-categories {
        margin-bottom: 25px;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .category-pills {
        gap: 6px;
    }

    .category-pill {
        padding: 4px 12px;
        font-size: 0.75rem;
    }

    .category-icon {
        font-size: 0.85rem;
        margin-right: 4px;
    }
}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .app-footer {
        padding: 25px 0;
        margin-top: 40px;
    }

    .footer-content {
        margin-bottom: 18px;
    }

    .footer-logo {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .footer-bottom {
        font-size: 0.85rem;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .app-footer {
        padding: 20px 0;
        margin-top: 35px;
    }

    .footer-content {
        margin-bottom: 15px;
    }

    .footer-logo {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .app-footer {
        padding: 15px 0;
        margin-top: 30px;
    }

    .footer-content {
        margin-bottom: 12px;
    }

    .footer-logo {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .footer-bottom {
        font-size: 0.75rem;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .app-footer {
        padding: 12px 0;
        margin-top: 25px;
    }

    .footer-content {
        margin-bottom: 10px;
    }

    .footer-logo {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .footer-bottom {
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1rem;
    }
}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .ai-features {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 40px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 12px;
    }

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

    .feature-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .feature-desc {
        font-size: 0.9rem;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .ai-features {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 35px;
    }

    .feature-card {
        padding: 18px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }

    .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .feature-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .feature-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .ai-features {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 30px;
    }

    .feature-card {
        padding: 15px;
    }

    .feature-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 8px;
    }

    .feature-icon svg {
        width: 18px;
        height: 18px;
    }

    .feature-title {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }

    .feature-desc {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .ai-features {
        margin-bottom: 25px;
    }

    .feature-card {
        padding: 12px;
    }

    .feature-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
    }

    .feature-icon svg {
        width: 16px;
        height: 16px;
    }

    .feature-title {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .feature-desc {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .search-result-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        margin-bottom: 35px;
    }

    .result-img {
        height: 160px;
    }

    .image-overlay {
        padding: 12px;
    }

    .photographer {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .ai-tag {
        font-size: 0.8rem;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .search-result-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 12px;
        margin-bottom: 30px;
    }

    .result-img {
        height: 150px;
    }

    .image-overlay {
        padding: 10px;
    }

    .photographer {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .ai-tag {
        font-size: 0.75rem;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .search-result-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 25px;
    }

    .result-img {
        height: 140px;
    }

    .image-overlay {
        padding: 8px;
    }

    .photographer {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .ai-tag {
        font-size: 0.7rem;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .search-result-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 20px;
    }

    .result-img {
        height: 200px;
    }

    .image-overlay {
        padding: 10px;
    }

    .photographer {
        font-size: 0.85rem;
        margin-bottom: 2px;
    }

    .ai-tag {
        font-size: 0.65rem;
    }
}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .no-results {
        padding: 35px 0;
    }

    .no-results-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 18px;
    }

    .no-results-title {
        font-size: 1.4rem;
    }

    .no-results-message {
        max-width: 350px;
        font-size: 0.9rem;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .no-results {
        padding: 30px 0;
    }

    .no-results-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 15px;
    }

    .no-results-title {
        font-size: 1.3rem;
    }

    .no-results-message {
        max-width: 300px;
        font-size: 0.85rem;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .no-results {
        padding: 25px 0;
    }

    .no-results-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .no-results-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .no-results-message {
        max-width: 280px;
        font-size: 0.8rem;
        padding: 0 15px;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .no-results {
        padding: 20px 0;
    }

    .no-results-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 10px;
    }

    .no-results-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .no-results-message {
        max-width: 250px;
        font-size: 0.75rem;
    }
}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .modal-content {
        width: 95%;
        max-width: 900px;
    }

    .modal-info {
        width: 280px;
    }

    .modal-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .modal-stats {
        gap: 12px;
        margin-bottom: 15px;
    }

    .modal-stat {
        font-size: 0.85rem;
    }

    .color-swatch {
        width: 40px;
        height: 40px;
        margin: 6px;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
        flex-direction: column;
    }

    .modal-image-container {
        max-height: 50vh;
    }

    .modal-info {
        width: 100%;
        max-height: 35vh;
        padding: 15px;
        border-top: 1px solid rgba(0, 229, 255, 0.1);
        border-left: none;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }

    .ai-analysis {
        padding: 12px;
        margin-bottom: 15px;
    }

    .color-palette {
        justify-content: center;
    }

    .color-swatch {
        width: 35px;
        height: 35px;
        margin: 5px;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-image-container {
        max-height: 45vh;
    }

    .modal-info {
        max-height: 55vh;
        padding: 12px;
    }

    .modal-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .modal-stats {
        gap: 10px;
        margin-bottom: 12px;
    }

    .modal-stat {
        font-size: 0.8rem;
    }

    .modal-stat svg {
        margin-right: 6px;
        width: 16px;
        height: 16px;
    }

    .ai-analysis {
        padding: 10px;
        margin-bottom: 12px;
    }

    .ai-analysis h4 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .analysis-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }

    .analysis-value {
        font-size: 0.85rem;
    }

    .color-swatch {
        width: 32px;
        height: 32px;
        margin: 4px;
    }

    .color-percentage {
        font-size: 11px;
        padding: 2px 6px;
        bottom: -22px;
    }

    .modal-actions {
        gap: 8px;
    }

    .download-btn,
    .share-btn {
        padding: 6px 0;
        font-size: 0.85rem;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .modal-image-container {
        max-height: 40vh;
    }

    .modal-info {
        max-height: 60vh;
        padding: 10px;
    }

    .modal-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .modal-stats {
        gap: 8px;
        margin-bottom: 10px;
    }

    .modal-stat {
        font-size: 0.75rem;
    }

    .modal-stat svg {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }

    .ai-analysis {
        padding: 8px;
        margin-bottom: 10px;
    }

    .ai-analysis h4 {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .analysis-label {
        font-size: 0.75rem;
    }

    .analysis-value {
        font-size: 0.8rem;
    }

    .color-swatch {
        width: 28px;
        height: 28px;
        margin: 3px;
    }

    .color-percentage {
        font-size: 10px;
        padding: 2px 5px;
        bottom: -20px;
    }

    .download-btn,
    .share-btn {
        padding: 5px 0;
        font-size: 0.8rem;
    }

    .download-btn svg,
    .share-btn svg {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }
}

/* Large devices (less than 992px) */
@media (max-width: 991px) {
    .ai-assistant-bubble {
        width: 55px;
        height: 55px;
        bottom: 25px;
        right: 25px;
    }

    .ai-chat-panel {
        width: 320px;
        height: 480px;
        bottom: 25px;
        right: 25px;
    }

    .chat-header {
        padding: 12px;
    }

    .chat-close {
        width: 28px;
        height: 28px;
    }

    .message {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .message-avatar {
        width: 22px;
        height: 22px;
    }

    .chat-input {
        padding: 12px;
    }

    #chat-input-field {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    #chat-send {
        width: 38px;
        height: 38px;
    }
}

/* Medium devices (less than 768px) */
@media (max-width: 767px) {
    .ai-assistant-bubble {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .ai-chat-panel {
        width: 300px;
        height: 450px;
        bottom: 20px;
        right: 20px;
    }

    .chat-header {
        padding: 10px;
    }

    .chat-close {
        width: 26px;
        height: 26px;
    }

    .chat-messages {
        padding: 12px;
        gap: 12px;
    }

    .message {
        font-size: 0.85rem;
        padding: 8px 12px;
        max-width: 85%;
    }

    #chat-input-field {
        font-size: 0.85rem;
    }

    #chat-send {
        width: 36px;
        height: 36px;
    }
}

/* Small devices (less than 576px) */
@media (max-width: 575px) {
    .ai-assistant-bubble {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    .ai-chat-panel {
        width: calc(100% - 30px);
        height: 400px;
        bottom: 15px;
        right: 15px;
        border-radius: 12px;
    }

    .chat-header {
        padding: 8px 12px;
    }

    .chat-title {
        font-size: 0.9rem;
    }

    .chat-close {
        width: 24px;
        height: 24px;
    }

    .chat-messages {
        padding: 10px;
        gap: 10px;
    }

    .message {
        font-size: 0.8rem;
        padding: 6px 10px;
        max-width: 90%;
    }

    .message-avatar {
        width: 20px;
        height: 20px;
    }

    .chat-input {
        padding: 8px 10px;
        gap: 8px;
    }

    #chat-input-field {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    #chat-send {
        width: 34px;
        height: 34px;
    }
}

/* Extra small devices (less than 380px) */
@media (max-width: 379px) {
    .ai-assistant-bubble {
        width: 40px;
        height: 40px;
        bottom: 12px;
        right: 12px;
    }

    .ai-chat-panel {
        width: calc(100% - 24px);
        height: 380px;
        bottom: 12px;
        right: 12px;
        border-radius: 10px;
    }

    .chat-header {
        padding: 6px 10px;
    }

    .chat-title {
        font-size: 0.85rem;
    }

    .chat-close {
        width: 22px;
        height: 22px;
    }

    .chat-messages {
        padding: 8px;
        gap: 8px;
    }

    .message {
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    .message-avatar {
        width: 18px;
        height: 18px;
    }

    .chat-input {
        padding: 6px 8px;
        gap: 6px;
    }

    #chat-input-field {
        padding: 5px 8px;
        font-size: 0.75rem;
        border-radius: 15px;
    }

    #chat-send {
        width: 32px;
        height: 32px;
    }
}

.enhanced-analysis-container {
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 10px;
}

.analysis-section {
    margin-bottom: 0;
    /* Remove margin since we're using gap */
    padding: 15px;
    background: rgba(0, 229, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(0, 229, 255, 0.3);
    flex-shrink: 0;
    /* Prevent shrinking */
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.section-icon {
    font-size: 1.1rem;
    margin-right: 8px;
    flex-shrink: 0;
}

.ai-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
    flex-shrink: 0;
}

.analysis-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Enhanced Color Palette - Improved layout */
.enhanced-color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 8px;
    margin-top: 10px;
    max-width: 100%;
}

.enhanced-color-swatch {
    position: relative;
    width: 100%;
    height: 55px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-width: 55px;
}

.enhanced-color-swatch:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.color-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 4px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.enhanced-color-swatch:hover .color-info {
    transform: translateY(0);
}

.color-hex {
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 1;
    margin-bottom: 2px;
}

.color-percent {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1;
}

.color-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
    font-size: 0.9rem;
}

.ai-analysis {
    flex: 1;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
}

.ai-analysis h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive adjustments for better mobile experience */
@media (max-width: 768px) {
    .enhanced-color-palette {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 6px;
    }

    .enhanced-color-swatch {
        height: 45px;
        min-width: 45px;
    }

    .analysis-section {
        padding: 12px;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .analysis-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .enhanced-color-palette {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .enhanced-color-swatch {
        height: 40px;
        min-width: 40px;
    }

    .analysis-section {
        padding: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .section-icon {
        margin-right: 5px;
    }
}

/* Remove scrollbar styles since we're not using scrolling anymore */
.enhanced-analysis-container::-webkit-scrollbar {
    display: none;
}

#modal-title {
    display: none !important;
}