/* Analyzer Page Styles */

/* Minimal Navigation */
.minimal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 101;
}

.nav-logo:hover {
    color: #8B4513;
}

.nav-logo svg {
    color: #8B4513;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.03);
}

.nav-link.active {
    background: #1a1a1a;
    color: white;
}

.nav-auth-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-auth-button:hover {
    background: #333;
    transform: translateY(-1px);
}

.nav-auth-button svg {
    flex-shrink: 0;
}

/* Navigation Right Buttons Container */
.nav-right-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 101;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 102;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

body.dark-mode .theme-toggle {
    color: #e0e0e0;
}

body.dark-mode .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-toggle .sun-icon {
    display: block;
}

body.dark-mode .theme-toggle .moon-icon {
    display: none;
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a1a1a;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Combinations Hero Section */
.combinations-hero {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(139, 69, 19, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
}

.combinations-hero h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.combinations-hero p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Legacy Analyzer Hero - Keep for compatibility */
.analyzer-hero {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(139, 69, 19, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
}

.analyzer-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.analyzer-hero h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.analyzer-hero p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .minimal-nav {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        position: relative;
    }
    
    .nav-right-buttons {
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        width: 100%;
        z-index: 1000;
        pointer-events: none;
    }
    
    .nav-links.active {
        display: flex;
        pointer-events: auto;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 0;
        text-align: left;
        pointer-events: auto;
        cursor: pointer;
        position: relative;
        z-index: 1;
    }
    
    .nav-link:hover {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .nav-auth-button {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        padding: 0.75rem 1.2rem;
        pointer-events: auto;
        cursor: pointer;
        position: relative;
        z-index: 1;
    }
    
    .theme-toggle {
        pointer-events: auto !important;
        cursor: pointer !important;
        position: relative;
        z-index: 102 !important;
    }
    
    .combinations-hero {
        padding: 1.5rem 1rem 0.5rem;
    }
    
    .combinations-hero h1 {
        font-size: 2rem;
    }
    
    .analyzer-hero {
        padding: 1.5rem 1rem 0.5rem;
    }
}

/* Mode Toggle Section */
.mode-toggle-section {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 20px;
}

.mode-toggle-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    text-align: center;
}

.mode-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mode-btn svg {
    color: #666;
    transition: color 0.3s ease;
}

.mode-btn span {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.mode-btn small {
    font-size: 0.85rem;
    color: #999;
}

.mode-btn:hover {
    border-color: #8B4513;
    background: rgba(139, 69, 19, 0.02);
}

.mode-btn.active {
    border-color: #8B4513;
    background: rgba(139, 69, 19, 0.05);
}

.mode-btn.active svg {
    color: #8B4513;
}

.mode-btn.active::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: #8B4513;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Combination Selection Section */
.combination-selection-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.combination-selector {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.combination-selector h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.combination-selector p {
    color: #666;
    margin-bottom: 1.5rem;
}

.combination-search {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.combination-search input {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.combination-search input:focus {
    outline: none;
    border-color: #8B4513;
}

.combination-hint,
.search-hint {
    font-size: 0.85rem;
    color: #999;
    text-align: center;
}

.combinations-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #8B4513 #f0f0f0;
}

.combinations-grid-large::-webkit-scrollbar {
    width: 8px;
}

.combinations-grid-large::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.combinations-grid-large::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 10px;
}

.combinations-grid-large::-webkit-scrollbar-thumb:hover {
    background: #6B3410;
}

.colorhunt-selector {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.colorhunt-selector h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.colorhunt-selector p {
    color: #666;
    margin-bottom: 1.5rem;
}

.selected-colorhunt-preview {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 2rem;
}

.selected-colorhunt-preview h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

#selectedColorhuntDisplay {
    margin-bottom: 1.5rem;
}

.load-more-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.load-more-btn:hover {
    background: #6B3410;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#loadMoreColorhuntAnalyzer {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

#loadMoreColorhuntAnalyzer:hover {
    background: #6B3410;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

#loadMoreColorhuntAnalyzer:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.load-more-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding: 0;
    text-align: center;
}

.selected-combination-preview {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.selected-combination-preview h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

#selectedCombinationDisplay {
    margin-bottom: 1.5rem;
}

.combination-card-select {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.combination-card-select:hover {
    border-color: #8B4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.combination-card-select.selected {
    border-color: #8B4513;
    background: rgba(139, 69, 19, 0.05);
}

.combination-card-select .combo-number {
    font-weight: 600;
    color: #8B4513;
    font-size: 0.9rem;
}

.combo-colors-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.combo-colors-display .color-square {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.selected-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.selected-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selected-color-item .color-info {
    text-align: center;
}

.selected-color-item strong {
    font-size: 0.85rem;
    color: #1a1a1a;
}

.selected-combination-preview h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 0.5rem;
}

/* Style preferences for combination mode */
.style-preferences-combination {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.style-preferences-combination h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-align: center;
}

.style-preferences-combination p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.style-preferences-colorhunt {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.style-preferences-colorhunt h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-align: center;
}

.style-preferences-colorhunt p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* ColorHunt Mode Section */
.colorhunt-mode-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Wardrobe Mode Section */
.wardrobe-mode-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.wardrobe-mode-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    text-align: center;
}

.wardrobe-mode-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.wardrobe-mode-info p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.style-preferences-wardrobe {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.style-preferences-wardrobe h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    text-align: center;
}

.style-preferences-wardrobe p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-align: center;
}



@media (max-width: 768px) {
    .mode-toggle {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .mode-btn {
        padding: 1rem;
    }
    
    .mode-btn span {
        font-size: 0.9rem;
    }
    
    .mode-btn small {
        font-size: 0.75rem;
    }
    
    .combinations-grid-large {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

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

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.button-container {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.button-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

.button-group .analyze-btn {
    position: relative;
    z-index: 11;
}

.generation-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

.upload-area {
    width: 100%;
    max-width: 600px;
    height: clamp(200px, 50vw, 300px);
    border: 3px dashed #ccc;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: clamp(10px, 3vw, 20px);
}

.upload-area:hover {
    border-color: #666;
    background: #f9f9f9;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #666;
    text-align: center;
}

.upload-placeholder svg {
    color: #999;
}

.upload-tip {
    font-size: 0.9rem;
    color: #999;
}

.analyze-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.analyze-btn:hover:not(:disabled) {
    background: #444;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.analyze-btn:active:not(:disabled) {
    transform: translateY(0);
}

.analyze-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

#previewImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Compact Results Section */
.results-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: clamp(10px, 3vw, 20px);
    margin-top: clamp(15px, 4vw, 30px);
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel {
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    .results-section {
        grid-template-columns: 1fr;
    }
    
    .left-panel {
        gap: 15px;
    }
    
    .style-options {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .style-option {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}
.style-preferences {
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.style-preferences h2 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.style-preferences p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 1rem;
}

.style-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    transition: all 0.2s ease;
    position: relative;
}

.style-option:hover {
    border-color: #8B4513;
    background: #f0f8ff;
    transform: translateY(-1px);
}

.style-option input[type="radio"] {
    display: none;
}

.style-option input[type="radio"]:checked + .style-label {
    color: #8B4513;
    font-weight: 600;
}

.style-option input[type="radio"]:checked {
    background: #8B4513;
    border-color: #8B4513;
}

.style-option:has(input[type="radio"]:checked) {
    background: #8B4513;
    border-color: #8B4513;
    color: white;
}

.style-option:has(input[type="radio"]:checked) .style-label {
    color: white;
    font-weight: 600;
}

.style-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.detected-colors {
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.detected-colors h2 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.color-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.color-item:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    background: #e9ecef;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 3px solid white;
    flex-shrink: 0;
}

.color-info {
    flex: 1;
    min-width: 0;
}

.color-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-value {
    display: none;
}

.recommended-combinations {
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.recommended-combinations h2 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.combinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: clamp(8px, 2vw, 10px);
    margin-top: 1rem;
}

.combination-pair {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border: 1px solid #f5f5f5;
}

.combination-pair:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.color-strip {
    height: 70px;
    display: flex;
    overflow: hidden;
}

.color-strip .color-square {
    flex: 1 1 0;
    width: auto;
    height: 100%;
    min-width: 0;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.combo-details {
    padding: 10px;
    background: white;
}

.combination-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    padding: 3px 6px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.combo-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 6px;
}

.combo-color {
    font-size: 0.7rem;
    color: #333;
    background: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    position: relative;
    display: inline-block;
}

.combo-divider {
    color: #999;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    margin: 0 1px;
}

.no-combinations-found {
    text-align: center;
    padding: 30px 15px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.no-combinations-found p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

body.dark-mode .loading {
    background: rgba(30, 30, 30, 0.95);
}

body.dark-mode .loading p,
body.dark-mode .loading-text {
    color: #e0e0e0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

body.dark-mode .spinner {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #8B4513;
}

/* Generation loading state */
.generating {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.generating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.generating::before {
    content: 'Generating your outfit...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #8B4513;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.hidden {
    display: none !important;
}

/* Tablet responsive */
@media screen and (max-width: 1024px) {
    .analyzer-container {
        padding: 1.5rem;
    }
    
    .upload-section {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .color-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .combinations-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .nav-link {
        text-align: center;
        padding: 12px 20px;
    }

    .button-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .analyze-btn {
        width: 100%;
        max-width: 350px;
        padding: 14px 28px;
        font-size: 1rem;
        min-height: 46px;
    }

    .analyzer-container {
        padding: 1rem;
    }

    .upload-section {
        gap: 1rem;
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: center;
    }
    
    .upload-area {
        width: 100%;
        max-width: 400px;
    }

    .color-item {
        gap: 12px;
        padding: 12px;
    }
    
    .color-swatch {
        width: 45px;
        height: 45px;
    }
    
    .color-name {
        font-size: 0.9rem;
    }

    .combination-number {
        font-size: 0.8rem;
    }

    .combo-color {
        font-size: 0.65rem;
        padding: 2px 4px;
        max-width: 80px;
    }
    
    .color-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.8rem;
    }
    
    .combinations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detected-colors h2,
    .recommended-combinations h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .detected-colors p,
    .recommended-combinations p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

@media screen and (max-width: 480px) {
    /* Mobile phones */
    .analyzer-container {
        padding: 0.5rem;
    }
    
    .main-nav {
        gap: 8px;
    }

    .nav-link {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .button-container {
        gap: 8px;
    }
    
    .button-group {
        gap: 6px;
    }
    
    .analyze-btn {
        padding: 11px 18px;
        font-size: 0.85rem;
        min-height: 44px;
        width: 100%;
    }
    
    .generation-section {
        gap: 6px;
    }
    
    #generateButton {
        width: 100%;
        min-height: 44px;
    }
    
    .gallery-button {
        padding: 11px 14px;
        font-size: 0.75rem;
        min-height: 44px;
    }

    .upload-section {
        gap: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .upload-area {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-text {
        font-size: 0.9rem;
    }
    
    .color-swatch {
        width: 40px;
        height: 40px;
    }

    .color-name {
        font-size: 0.8rem;
    }
    
    .color-item {
        padding: 10px;
        gap: 10px;
    }
    
    .color-list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .detected-colors h2,
    .recommended-combinations h2 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .detected-colors p,
    .recommended-combinations p {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .combinations-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .combination-pair {
        padding: 1rem;
    }
    
    .combo-color {
        font-size: 0.6rem;
        padding: 2px 3px;
        max-width: 70px;
    }
    
    .button-container {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .analyze-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .generation-section {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    #generateButton {
        width: 100%;
        max-width: 300px;
    }
    
    /* Additional mobile optimizations */
    .upload-area {
        padding: 1rem;
    }
    
    .upload-icon {
        font-size: 1.8rem;
    }
    
    .upload-text {
        font-size: 0.8rem;
    }
    
    .loading p {
        font-size: 0.9rem;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}

/* Extra small devices (320px and below) */
@media screen and (max-width: 320px) {
    .analyzer-container {
        padding: 0.25rem;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .upload-area {
        padding: 0.8rem;
    }
    
    .upload-icon {
        font-size: 1.5rem;
    }
    
    .upload-text {
        font-size: 0.7rem;
    }
    
    .color-swatch {
        width: 35px;
        height: 35px;
    }
    
    .color-name {
        font-size: 0.7rem;
    }
    
    .color-item {
        padding: 8px;
        gap: 8px;
    }
    
    .combination-pair {
        padding: 0.8rem;
    }
    
    .combo-color {
        font-size: 0.5rem;
        padding: 1px 2px;
        max-width: 60px;
    }
    
    .analyze-button,
    .generate-button {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .button-container {
        gap: 8px;
    }
}

/* Login Required Modal */
.login-modal-content {
    max-width: 450px;
    text-align: center;
    padding: 2.5rem;
}

.login-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.login-modal-body svg {
    margin-bottom: 0.5rem;
}

.login-modal-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0.5rem 0;
}

.login-modal-body p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.login-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
}

.login-modal-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.login-modal-btn.primary {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.login-modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.login-modal-btn.secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.login-modal-btn.secondary:hover {
    border-color: #8B4513;
    color: #8B4513;
    background: rgba(139, 69, 19, 0.05);
}

.modal {
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.visible {
    z-index: 1000;
}

#imagePopupModal {
    z-index: 1001 !important;
    position: fixed !important;
}

#imagePopupModal:not(.hidden) {
    display: flex !important;
}

#galleryModal {
    z-index: 1000;
}

#loginRequiredModal {
    z-index: 999;
}

.modal-content.image-popup-content {
    background: #f8f9fa;
    margin: auto;
    padding: 0;
    border: none;
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    border-radius: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.image-popup-content h2 {
    margin: 0;
    padding: 1.2rem 2rem;
    background: white;
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.image-popup-content img {
    max-width: 100%;
    max-height: 65vh;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    margin: 0;
    padding: 2rem;
    background: white;
    display: block;
    box-shadow: none;
    transition: transform 0.3s ease;
    border: none;
}

.image-popup-content img:hover {
    transform: none;
}

.image-actions {
    padding: 1rem 2rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    background: white;
    flex-shrink: 0;
}

.persistence-banner {
    background: linear-gradient(135deg, #fff8f0 0%, #fdf5eb 100%);
    border-top: 1px solid rgba(139, 69, 19, 0.15);
    border-bottom: 1px solid rgba(139, 69, 19, 0.15);
    padding: 1rem 1.5rem;
    text-align: left;
    flex-shrink: 0;
}

.persistence-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
}

.persistence-banner-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.persistence-banner-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    color: #8B4513;
}

.persistence-banner-text {
    flex: 1;
    min-width: 200px;
}

.persistence-banner-text strong {
    display: block;
    color: #8B4513;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.persistence-banner-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.persistence-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

@media (min-width: 600px) {
    .persistence-banner-actions {
        width: auto;
        margin-left: auto;
    }
}

.persistence-cta-btn {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.persistence-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.persistence-dismiss-btn {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.persistence-dismiss-btn:hover {
    border-color: #8B4513;
    color: #8B4513;
}

body.dark-mode .persistence-banner {
    background: linear-gradient(135deg, #2a2218 0%, #1e1a14 100%);
    border-color: rgba(205, 133, 63, 0.2);
}

body.dark-mode .persistence-banner-text strong {
    color: #cd853f;
}

body.dark-mode .persistence-banner-text p {
    color: #a0a0a0;
}

body.dark-mode .persistence-banner-icon svg {
    color: #cd853f;
}

body.dark-mode .persistence-dismiss-btn {
    border-color: #444;
    color: #a0a0a0;
}

body.dark-mode .persistence-dismiss-btn:hover {
    border-color: #cd853f;
    color: #cd853f;
}

@media (max-width: 600px) {
    .image-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.8rem 1.5rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .image-actions {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 0.8rem 1rem 1rem;
    }
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    color: #1a1a1a;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: none;
    min-height: 48px;
    padding: 0.8rem 1.2rem;
}

.download-btn:hover {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.download-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Search button styles */
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: white;
    color: #4CAF50;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    transition: all 0.2s ease;
    box-shadow: none;
    /* Mobile touch improvements */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.search-btn:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Mobile touch improvements */
.search-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* Prevent double-tap zoom on mobile */
@media (hover: none) and (pointer: coarse) {
    .search-btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
    
    .search-btn:active {
        background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
        transform: scale(0.98);
    }
}

.search-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.search-btn:disabled:hover {
    transform: none;
    background: white;
    color: #4CAF50;
    border-color: #e0e0e0;
}

/* Favorite button styles */
.favorite-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: white;
    color: #f44336;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    min-height: 48px;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.favorite-btn:hover {
    background: #f44336;
    color: white;
    border-color: #f44336;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.15);
}

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

.favorite-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Image actions container */
.close-modal {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    color: #999;
    font-size: 1.5rem;
    font-weight: 400;
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: #1a1a1a;
    text-decoration: none;
    transform: rotate(90deg);
}

/* Modal animation improvements */
.modal:not(.hidden) .modal-content.image-popup-content {
    transform: scale(1);
}

/* Responsive design for image popup */
@media screen and (max-width: 768px) {
    .modal-content.image-popup-content {
        width: 95%;
        max-width: 90vw;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .image-popup-content h2 {
        font-size: 1.2rem;
        padding: 1.2rem 1.5rem;
    }
    
    .image-popup-content img {
        padding: 1.5rem;
        max-height: 55vh;
    }
    
    .image-actions {
        padding: 0.8rem 1.5rem 1.2rem;
        grid-template-columns: 1fr;
    }
    
    .download-btn,
    .search-btn,
    .favorite-btn {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .close-modal {
        top: 1rem;
        right: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .modal-content.image-popup-content {
        margin: 0.5rem;
        border-radius: 16px;
        max-height: 96vh;
    }
    
    .image-popup-content h2 {
        font-size: 1.1rem;
        padding: 1rem 1.2rem;
    }
    
    .image-popup-content img {
        padding: 1rem;
        max-height: 50vh;
    }
    
    .image-actions {
        padding: 0.6rem 1.2rem 1rem;
    }
    
    .download-btn,
    .search-btn,
    .favorite-btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }
}

.color-item.interactive {
    cursor: pointer;
    padding: 0; /* Remove padding from the container */
}

.color-item-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px; /* Add padding to the label instead */
    width: 100%;
    cursor: pointer;
}

/* Hide checkboxes completely */
.color-item.interactive input[type="checkbox"] {
    display: none;
}

/* Make entire color item clickable and show selection state */
.color-item.interactive {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-item.interactive:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

.color-item.interactive.selected {
    background: linear-gradient(135deg, #f5f3f0 0%, #fefefe 100%);
    border: 2px solid #8B4513;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    transform: translateX(5px);
    position: relative;
}

.color-item.interactive.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    background: #8B4513;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 15;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.clothing-type {
    font-size: 0.8rem;
    color: #555;
    text-transform: capitalize;
}

/* Style for the selected combination card */
.combination-pair.selected {
    box-shadow: 0 0 0 3px #8B4513, 0 4px 12px rgba(139, 69, 19, 0.3);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f5f3f0 0%, #fefefe 100%);
    border: 2px solid #8B4513;
}

.combination-pair.selected::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #8B4513;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 15;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.combination-pair {
    cursor: pointer;
    position: relative;
}

/* Tooltip for truncated text */
.combo-color {
    position: relative;
}

.combo-color:hover::after {
    content: attr(data-full-name);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.combo-color:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
    z-index: 1100;
    pointer-events: none;
}

.color-item.selected-filter {
    background-color: #d4edda; /* A light green to indicate filtering */
    box-shadow: inset 0 0 0 2px #155724;
    transition: all 0.2s ease-in-out;
}

.color-item:not(.selected-filter) {
    background-color: white;
    box-shadow: none;
    transition: all 0.2s ease-in-out;
}

/* Shopping search button styles */
.shopping-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin: 20px auto;
    width: fit-content;
}

.shopping-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.shopping-search-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive design for search button and mobile improvements */
@media (max-width: 768px) {
    .shopping-search-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-height: 48px; /* Larger touch target for mobile */
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .search-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Mobile modal improvements */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 5% auto;
        max-width: 95%;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .download-btn, .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .download-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Mobile image popup */
    .image-popup {
        padding: 10px;
    }
    
    .image-popup img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    /* Mobile loading states */
    .search-btn:disabled {
        opacity: 0.8;
        transform: none;
    }
    
    .search-btn:disabled:hover {
        transform: none;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .search-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-height: 44px;
    }
    
    .download-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        margin: 2% auto;
        max-width: 98%;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        margin: 1% auto;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .modal-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .download-btn, .search-btn {
        width: auto;
        flex: 1;
    }
}

/* General mobile improvements for analyzer page */
@media (max-width: 768px) {
    /* Header responsive */
    header {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    header h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    header .subtitle {
        font-size: 1.1rem;
    }
    
    /* Upload area mobile */
    .upload-area {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
    }
    
    .upload-area p {
        font-size: 0.9rem;
    }
    
    /* Color grid mobile */
    .color-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        margin: 1rem 0;
    }
    
    .color-item {
        padding: 15px 10px;
        border-radius: 12px;
    }
    
    .color-item h4 {
        font-size: 0.8rem;
    }
    
    .color-item p {
        font-size: 0.7rem;
    }
    
    /* Generate button mobile */
    .generate-button {
        padding: 15px 25px;
        font-size: 1rem;
        width: 100%;
        margin: 1rem 0;
    }
    
    /* Results mobile */
    .results-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .results-container h2 {
        font-size: 1.3rem;
    }
    
    .results-container p {
        font-size: 0.9rem;
    }
    
    /* Loading states mobile */
    .loading-spinner {
        width: 30px;
        height: 30px;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    header {
        padding: 1.5rem 0.5rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .upload-area {
        padding: 1.5rem 0.5rem;
    }
    
    .color-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .color-item {
        padding: 12px 8px;
    }
    
    .generate-button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        margin: 1% auto;
        max-width: 98%;
        max-height: 98vh;
    }
}

/* Gallery Button */
.gallery-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6B8E23 0%, #556B2F 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 142, 35, 0.3);
}

.gallery-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 35, 0.4);
    background: linear-gradient(135deg, #556B2F 0%, #6B8E23 100%);
}

.gallery-button svg {
    flex-shrink: 0;
}

.gallery-button span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Gallery Modal */
.gallery-modal-content {
    background: #f8f9fa;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-modal-content .close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.gallery-modal-content .close-modal:hover {
    color: #1a1a1a;
    transform: rotate(90deg);
}

.gallery-modal-content h2 {
    margin: 0;
    padding: 1.5rem 2rem 1rem;
    background: white;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.gallery-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    padding: 0 2rem 1.5rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 2rem;
    background: #f8f9fa;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8B4513 #f0f0f0;
}

.gallery-grid::-webkit-scrollbar {
    width: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 10px;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
    background: #6B3410;
}

.gallery-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.gallery-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.gallery-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
    text-align: center;
}

.gallery-empty svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.gallery-empty p {
    font-size: 1.3rem;
    font-weight: 500;
    color: #666;
    margin: 10px 0;
}

.gallery-empty span {
    font-size: 0.95rem;
    color: #999;
    font-style: italic;
}

.gallery-item {
    background: white;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.favorited-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(244, 67, 54, 0.95);
    color: white;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
    z-index: 10;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.gallery-item-image {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    object-position: center;
    cursor: pointer;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    pointer-events: auto;
    position: relative;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
}

.gallery-item-info {
    padding: 15px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-between;
    border-radius: 0 0 16px 16px;
}

.gallery-item-time {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.gallery-item-time svg {
    width: 14px;
    height: 14px;
}

.gallery-item-actions {
    display: flex;
    gap: 6px;
}

.gallery-item-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    white-space: nowrap;
    min-height: 36px;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.gallery-item-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.gallery-btn-view {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

.gallery-btn-view:hover {
    background: #A0522D;
    border-color: #A0522D;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.3);
}

.gallery-btn-download {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.gallery-btn-download:hover {
    background: #45a049;
    border-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.gallery-btn-delete {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.gallery-btn-delete:hover {
    background: #da190b;
    border-color: #da190b;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3);
}

/* Mobile responsive for gallery */
@media (max-width: 768px) {
    .gallery-button {
        padding: 12px 16px;
        font-size: 0.85rem;
        flex: 1;
        justify-content: center;
        min-height: 48px;
        display: flex;
    }
    
    .button-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .analyze-btn {
        width: 100%;
        min-height: 48px;
        flex: 1;
    }
    
    .generation-section {
        width: 100%;
        flex-direction: column;
    }
    
    #generateButton {
        width: 100%;
        min-height: 48px;
    }
    
    .gallery-modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .gallery-modal-content .close-modal {
        top: 1rem;
        right: 1rem;
    }
    
    .gallery-modal-content h2 {
        padding: 1.2rem 1.2rem 0.8rem;
        font-size: 1.3rem;
    }
    
    .gallery-description {
        padding: 0 1.2rem 1rem;
        font-size: 0.85rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 1.5rem 1.2rem;
    }
    
    .gallery-item-image {
        max-height: 280px;
    }
    
    .gallery-item-info {
        padding: 12px;
        gap: 8px;
    }
    
    .gallery-item-actions {
        gap: 5px;
    }
    
    .gallery-item-btn {
        padding: 8px 4px;
        font-size: 0.65rem;
        min-height: 40px;
        flex: 1;
    }
    
    .gallery-item-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 1rem;
    }
    
    .gallery-item {
        min-height: auto;
    }
    
    .gallery-item-image {
        max-height: 240px;
    }
    
    .gallery-item-info {
        padding: 10px;
        gap: 6px;
    }
    
    .gallery-item-btn {
        padding: 6px 3px;
        font-size: 0.6rem;
        min-height: 36px;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .minimal-nav {
    background: rgba(30, 30, 30, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .nav-logo {
    color: #e0e0e0;
}

body.dark-mode .nav-logo:hover {
    color: #cd853f;
}

body.dark-mode .nav-link {
    color: #a0a0a0;
}

body.dark-mode .nav-link:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .nav-link.active {
    background: #cd853f;
    color: white;
}

body.dark-mode .nav-auth-button {
    background: #242424;
    color: #e0e0e0;
}

body.dark-mode .nav-auth-button:hover {
    background: #2a2a2a;
}

body.dark-mode .mobile-menu-toggle span {
    background: #e0e0e0;
}

body.dark-mode .analyzer-hero,
body.dark-mode .combinations-hero {
    background: linear-gradient(180deg, rgba(139, 69, 19, 0.1) 0%, rgba(18, 18, 18, 0) 100%);
}

body.dark-mode .analyzer-hero h1,
body.dark-mode .combinations-hero h1 {
    color: #e0e0e0;
}

body.dark-mode .analyzer-hero p,
body.dark-mode .combinations-hero p {
    color: #a0a0a0;
}

body.dark-mode .analyzer-container {
    background: #121212;
}

body.dark-mode .mode-toggle-section h3 {
    color: #e0e0e0;
}

body.dark-mode .mode-btn {
    background: #1e1e1e;
    border-color: #333333;
    color: #a0a0a0;
}

body.dark-mode .mode-btn:hover {
    border-color: #cd853f;
    color: #cd853f;
}

body.dark-mode .mode-btn.active {
    background: #cd853f;
    border-color: #cd853f;
    color: white;
}

body.dark-mode .mode-btn span {
    color: inherit;
}

body.dark-mode .upload-section,
body.dark-mode .combination-select-section,
body.dark-mode .wardrobe-select-section {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .upload-area {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .upload-area:hover {
    border-color: #cd853f;
    background: #2a2a2a;
}

body.dark-mode .upload-icon {
    color: #a0a0a0;
}

body.dark-mode .upload-text {
    color: #e0e0e0;
}

body.dark-mode .upload-hint {
    color: #a0a0a0;
}

body.dark-mode .btn-primary {
    background: #cd853f;
    color: white;
}

body.dark-mode .btn-primary:hover {
    background: #deb887;
}

body.dark-mode .btn-secondary {
    background: #242424;
    color: #e0e0e0;
    border-color: #333333;
}

body.dark-mode .btn-secondary:hover {
    background: #2a2a2a;
    border-color: #444444;
}

body.dark-mode .result-section {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .result-section h2 {
    color: #e0e0e0;
}

body.dark-mode .outfit-preview {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .outfit-info h3 {
    color: #e0e0e0;
}

body.dark-mode .outfit-info p {
    color: #a0a0a0;
}

body.dark-mode .combination-card-select {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .combination-card-select:hover {
    background: #2a2a2a;
    border-color: #cd853f;
}

body.dark-mode .combination-card-select.selected {
    border-color: #cd853f;
    background: #2a2a2a;
}

body.dark-mode .combo-number {
    color: #e0e0e0;
}

body.dark-mode .selected-combination-preview {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .selected-combination-display h3 {
    color: #e0e0e0;
}

body.dark-mode .gallery-grid {
    background: #121212;
}

body.dark-mode .gallery-item {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .gallery-item:hover {
    border-color: #cd853f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .gallery-item-info h3 {
    color: #e0e0e0;
}

body.dark-mode .gallery-item-info p {
    color: #a0a0a0;
}

body.dark-mode .gallery-item-btn {
    background: #242424;
    color: #e0e0e0;
    border-color: #333333;
}

body.dark-mode .gallery-item-btn:hover {
    background: #2a2a2a;
    border-color: #cd853f;
}

body.dark-mode .modal {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal-content {
    background: #1e1e1e;
}

body.dark-mode .modal-close {
    background: #242424;
    color: #e0e0e0;
}

body.dark-mode .modal-close:hover {
    background: #2a2a2a;
}

body.dark-mode .error-message {
    background-color: rgba(220, 38, 38, 0.2) !important;
    color: #ff6b6b !important;
    border: 1px solid rgba(220, 38, 38, 0.4) !important;
}

body.dark-mode .error-message h3 {
    color: #ff6b6b !important;
}

body.dark-mode .error-message p {
    color: #ff9999 !important;
}

body.dark-mode .error-message p:last-child {
    color: #a0a0a0 !important;
}

body.dark-mode .modal-content.image-popup-content {
    background: #1e1e1e;
}

body.dark-mode .image-popup-content h2 {
    background: #1e1e1e;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .image-popup-content img {
    background: #242424;
}

body.dark-mode .image-actions {
    background: #1e1e1e;
}

/* Image Popup Modal Button Dark Mode */
body.dark-mode .download-btn {
    background: #242424;
    color: #e0e0e0;
    border-color: #333333;
}

body.dark-mode .download-btn:hover {
    background: #2a2a2a;
    color: #ffffff;
    border-color: #cd853f;
}

body.dark-mode .search-btn {
    background: #242424;
    color: #4CAF50;
    border-color: #333333;
}

body.dark-mode .search-btn:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

body.dark-mode .search-btn:disabled {
    background: #242424;
    color: #666;
    border-color: #333333;
}

body.dark-mode .search-btn:disabled:hover {
    background: #242424;
    color: #666;
    border-color: #333333;
}

body.dark-mode .favorite-btn {
    background: #242424;
    color: #f44336;
    border-color: #333333;
}

body.dark-mode .favorite-btn:hover {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

/* Gallery Modal Dark Mode */
body.dark-mode .gallery-modal-content {
    background: #1e1e1e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-mode .gallery-modal-content h2 {
    background: #1e1e1e;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .gallery-description {
    background: #1e1e1e;
    color: #a0a0a0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .gallery-grid {
    background: #121212;
}

body.dark-mode .gallery-loading {
    color: #a0a0a0;
}

body.dark-mode .gallery-loading .spinner {
    border-color: #2a2a2a;
    border-top-color: #cd853f;
}

body.dark-mode .gallery-empty {
    color: #a0a0a0;
}

body.dark-mode .gallery-empty-state {
    color: #a0a0a0;
}

body.dark-mode .gallery-empty-state h3 {
    color: #e0e0e0;
}

body.dark-mode .gallery-empty p {
    color: #a0a0a0;
}

body.dark-mode .gallery-empty span {
    color: #666;
}

body.dark-mode .gallery-modal-content .close-modal {
    color: #a0a0a0;
}

body.dark-mode .gallery-modal-content .close-modal:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.1);
}

/* Login Required Modal Dark Mode */
body.dark-mode .login-modal-content {
    background: #1e1e1e;
}

body.dark-mode .login-modal-body h2 {
    color: #e0e0e0;
}

body.dark-mode .login-modal-body p {
    color: #a0a0a0;
}

body.dark-mode .login-modal-btn.secondary {
    background: #242424;
    color: #e0e0e0;
    border-color: #333333;
}

body.dark-mode .login-modal-btn.secondary:hover {
    border-color: #cd853f;
    color: #cd853f;
    background: rgba(205, 133, 63, 0.1);
}

body.dark-mode .loading-state {
    color: #a0a0a0;
}

body.dark-mode .spinner {
    border-color: #2a2a2a;
    border-top-color: #cd853f;
}

body.dark-mode .empty-state {
    color: #a0a0a0;
}

body.dark-mode .empty-state h2 {
    color: #e0e0e0;
}

/* ColorHunt Palettes Dark Mode */
body.dark-mode .colorhunt-mode-section {
    background: transparent;
}

body.dark-mode .style-preferences-colorhunt {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .style-preferences-colorhunt h3 {
    color: #e0e0e0;
}

body.dark-mode .style-preferences-colorhunt p {
    color: #a0a0a0;
}

body.dark-mode .colorhunt-selector {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .colorhunt-selector h2 {
    color: #e0e0e0;
}

body.dark-mode .colorhunt-selector p {
    color: #a0a0a0;
}

body.dark-mode #colorhuntSearchInputAnalyzer {
    background: #242424;
    border-color: #333333;
    color: #e0e0e0;
}

body.dark-mode #colorhuntSearchInputAnalyzer:focus {
    border-color: #cd853f;
    background: #2a2a2a;
}

body.dark-mode #colorhuntSearchInputAnalyzer::placeholder {
    color: #666;
}

body.dark-mode .combination-search .search-hint {
    color: #a0a0a0;
}

body.dark-mode .combinations-grid-large {
    background: #242424;
    border-radius: 8px;
}

body.dark-mode .selected-colorhunt-preview {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .selected-colorhunt-preview h3 {
    color: #e0e0e0;
}

body.dark-mode #selectedColorhuntDisplay {
    color: #a0a0a0;
}

body.dark-mode #loadMoreColorhuntAnalyzer {
    background: #cd853f;
    color: white;
    box-shadow: 0 2px 4px rgba(205, 133, 63, 0.3);
}

body.dark-mode #loadMoreColorhuntAnalyzer:hover {
    background: #deb887;
    box-shadow: 0 4px 8px rgba(205, 133, 63, 0.4);
}

body.dark-mode .combo-colors-display {
    background: transparent;
}

body.dark-mode .color-square {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .style-preferences-colorhunt {
    border-top-color: #333333;
}

body.dark-mode .style-options {
    background: transparent;
}

body.dark-mode .style-option {
    background: #242424;
    border-color: #333333;
    color: #a0a0a0;
}

body.dark-mode .style-option:hover {
    background: #2a2a2a;
    border-color: #cd853f;
}

body.dark-mode .style-label {
    color: #e0e0e0;
}

body.dark-mode .style-option input[type="radio"]:checked + .style-label {
    color: #cd853f;
}

body.dark-mode .style-option:has(input[type="radio"]:checked) {
    background: #2a2a2a;
    border-color: #cd853f;
}

body.dark-mode .style-option:has(input[type="radio"]:checked) .style-label {
    color: #cd853f;
}

/* Additional white background elements */
body.dark-mode .mode-btn {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .combination-selector {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .combination-selector h2 {
    color: #e0e0e0;
}

body.dark-mode .combination-selector p {
    color: #a0a0a0;
}

body.dark-mode .style-preferences {
    background: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .style-preferences h2 {
    color: #e0e0e0;
}

body.dark-mode .style-preferences p {
    color: #a0a0a0;
}

body.dark-mode .detected-colors {
    background: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .detected-colors h2 {
    color: #e0e0e0;
}

body.dark-mode .selected-combination-preview {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .selected-combination-preview h3 {
    color: #e0e0e0;
}

body.dark-mode .upload-section {
    background: transparent;
}

body.dark-mode .combination-search {
    background: transparent;
}

body.dark-mode .combination-search input {
    background: #242424;
    border-color: #333333;
    color: #e0e0e0;
}

body.dark-mode .combination-search input:focus {
    border-color: #cd853f;
    background: #2a2a2a;
}

body.dark-mode .combination-search .search-hint {
    color: #a0a0a0;
}

body.dark-mode .combinations-grid-large {
    background: #242424;
    border-radius: 8px;
}

body.dark-mode .wardrobe-mode-info {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .wardrobe-mode-info h2 {
    color: #e0e0e0;
}

body.dark-mode .wardrobe-mode-info p {
    color: #a0a0a0;
}

body.dark-mode .style-preferences-wardrobe {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .style-preferences-wardrobe h3 {
    color: #e0e0e0;
}

body.dark-mode .style-preferences-wardrobe p {
    color: #a0a0a0;
}

body.dark-mode .result-section {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .upload-area {
    background: #242424;
    border-color: #333333;
}

body.dark-mode .upload-area:hover {
    background: #2a2a2a;
    border-color: #cd853f;
}

body.dark-mode .combinations-list {
    background: #242424;
}

body.dark-mode .upload-placeholder {
    color: #a0a0a0;
}

body.dark-mode .combination-hint,
body.dark-mode .search-hint {
    color: #a0a0a0;
}

body.dark-mode .upload-text {
    color: #e0e0e0;
}

body.dark-mode .upload-hint {
    color: #a0a0a0;
}

body.dark-mode .upload-icon {
    color: #a0a0a0;
}

body.dark-mode .recommended-combinations {
    background: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .recommended-combinations h2 {
    color: #e0e0e0;
}

body.dark-mode .combination-pair {
    background: #242424;
    border-color: #333333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .combination-pair:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.dark-mode .combo-details {
    background: #242424;
}

body.dark-mode .combination-number {
    color: #e0e0e0;
    background: #1e1e1e;
}

body.dark-mode .combo-color {
    color: #e0e0e0;
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .combo-divider {
    color: #666;
}

body.dark-mode .color-item {
    background: #242424;
    border-color: #333333;
    color: #e0e0e0;
}

body.dark-mode .color-item:hover {
    background: #2a2a2a;
    border-color: #cd853f;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .color-item.interactive:hover {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .color-item.interactive.selected {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 2px solid #cd853f;
    box-shadow: 0 4px 15px rgba(205, 133, 63, 0.3);
    transform: translateX(5px);
}

body.dark-mode .color-item.interactive.selected::after {
    background: #cd853f;
    color: white;
}

body.dark-mode .combination-select-section {
    background: #1e1e1e;
}

body.dark-mode .wardrobe-select-section {
    background: #1e1e1e;
}

@media (max-width: 768px) {
    body.dark-mode .nav-links {
        background: #1e1e1e;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.dark-mode .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}