/* =============================================================================
   Fashion Ensemble AI - Custom Styles
   Mobile-first with Tailwind utilities
   ============================================================================= */

/* Base Resets */
* {
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
}

/* =============================================================================
   CARDS
   ============================================================================= */

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.item-card {
    background: #fff;
    border-radius: 1rem;
    padding: 0.75rem;
    border: 2px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #E8D5C4;
}

.item-card.selected {
    border-color: #1A1A1A;
    background: linear-gradient(180deg, #FFFBF7 0%, #FFF 100%);
}

.item-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #1A1A1A;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* =============================================================================
   PRODUCT IMAGES
   ============================================================================= */

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 0.75rem;
    background: #FAFAFA;
}

@media (min-width: 640px) {
    .product-image {
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .product-image {
        height: 220px;
    }
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn-primary {
    background: linear-gradient(135deg, #1A1A1A 0%, #333 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    min-height: 48px; /* Touch-friendly */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
}

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

.btn-secondary {
    background: transparent;
    color: #1A1A1A;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid #1A1A1A;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
}

.btn-secondary:hover {
    background: #1A1A1A;
    color: white;
}

/* =============================================================================
   FORM ELEMENTS
   ============================================================================= */

.text-input {
    width: 100%;
    background: white;
    border: 2px solid #E8E0D8;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    min-height: 48px;
}

.text-input:focus {
    outline: none;
    border-color: #1A1A1A;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.text-input::placeholder {
    color: #AAA;
}

/* =============================================================================
   UPLOAD OPTIONS (New Clean UI)
   ============================================================================= */

.upload-options {
    padding: 1rem 0;
}

.upload-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.upload-option-btn:hover {
    border-color: #ccc;
    background: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-option-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.upload-option-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-option-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.upload-option-hint {
    font-size: 0.75rem;
    color: #888;
}

.upload-preview {
    padding: 1rem 0;
    text-align: center;
}

/* Legacy dropzone (keeping for backwards compat) */
.dropzone {
    border: 2px dashed #DDD;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #1A1A1A;
    background: #FAFAFA;
}

.dropzone.has-image {
    padding: 1rem;
}

.dropzone img {
    max-height: 150px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

/* =============================================================================
   PILLS / CHIPS
   ============================================================================= */

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid #E0E0E0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.pill:hover {
    border-color: #1A1A1A;
}

.pill.active {
    background: #1A1A1A;
    color: white;
    border-color: #1A1A1A;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #2D2D2D 0%, #1A1A1A 100%);
    color: white;
    padding: 0.4rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .status-pill {
        padding: 0.5rem 1.25rem;
        font-size: 0.8rem;
        gap: 8px;
    }
}

.status-pill.warning {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
}

.status-pill.success {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

/* =============================================================================
   BADGES
   ============================================================================= */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-bold {
    background: linear-gradient(135deg, #FFB347 0%, #FFCC33 100%);
    color: #333;
}

.badge-safe {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-uploaded {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: #1565C0;
}

/* =============================================================================
   SYNC QUOTIENT (Match Quality Score)
   ============================================================================= */

.sync-quotient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.02em;
}

/* Excellent match: 8-10 (green) */
.sync-quotient.sq-excellent {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
}

/* Good match: 5-7.9 (amber) */
.sync-quotient.sq-good {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
}

/* Fair match: <5 (orange) */
.sync-quotient.sq-fair {
    background: linear-gradient(135deg, #FFEDD5 0%, #FED7AA 100%);
    color: #C2410C;
}

/* Label styling */
.sync-quotient .sq-label {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.8;
    margin-right: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* =============================================================================
   SECTION HEADERS
   ============================================================================= */

.section-header {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #1A1A1A;
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E8D5C4;
}

@media (min-width: 768px) {
    .section-header {
        font-size: 1.75rem;
    }
}

/* =============================================================================
   HORIZONTAL SCROLL
   ============================================================================= */

.horizontal-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #CCC;
    border-radius: 3px;
}

.horizontal-scroll > * {
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* =============================================================================
   SELECTION COUNTER
   ============================================================================= */

.selection-counter {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 500;
    color: #2E7D32;
}

/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast.success {
    border-left: 4px solid #22C55E;
}

.toast.info {
    border-left: 4px solid #3B82F6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =============================================================================
   ENSEMBLE PREVIEW
   ============================================================================= */

.ensemble-preview {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* =============================================================================
   SHOPPING LINKS
   ============================================================================= */

.shop-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #F9F9F9;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.shop-link:hover {
    background: #F0F0F0;
    transform: translateX(4px);
}

.shop-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* =============================================================================
   RESPONSIVE GRID
   ============================================================================= */

.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.4s ease;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.touch-target {
    min-width: 48px;
    min-height: 48px;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================================================
   SEE MORE CARD
   ============================================================================= */

.see-more-card {
    background: linear-gradient(135deg, #FAFAFA 0%, #F5F5F5 100%);
    border: 2px dashed #E0E0E0;
    transition: all 0.3s ease;
}

.see-more-card:hover {
    border-color: #1A1A1A;
    background: linear-gradient(135deg, #FFF 0%, #FAFAFA 100%);
    transform: translateY(-4px);
}

.see-more-card svg {
    transition: transform 0.3s ease;
}

.see-more-card:hover svg:not(.animate-spin) {
    transform: scale(1.1);
}

/* Loading spinner animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* =============================================================================
   STYLE THEME SELECTOR
   ============================================================================= */

/* Style Selector Container */
.style-selector {
    margin: 0;
}

.style-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

/* Primary Buttons Row */
.style-primary {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Style Buttons */
.style-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    min-height: 48px;
}

.style-btn:hover {
    border-color: #ccc;
    background: #fafafa;
}

.style-btn.active {
    border-color: #1A1A1A;
    background: #f5f5f5;
    color: #1A1A1A;
}

.style-btn.active::before {
    content: '✓ ';
    font-size: 0.8rem;
}

/* Expand Trigger Button */
.style-expand-trigger {
    background: linear-gradient(135deg, #fef9f3, #fff);
    border-style: dashed;
    border-color: #d4a574;
    color: #8b6914;
}

.style-expand-trigger:hover {
    background: linear-gradient(135deg, #fdf5eb, #fef9f3);
}

.style-expand-trigger.expanded {
    border-style: solid;
    background: #fef9f3;
}

.style-icon {
    font-size: 1rem;
}

.style-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    margin-left: 0.25rem;
}

.style-expand-trigger.expanded .style-arrow {
    transform: rotate(180deg);
}

/* Trends Panel */
.style-trends-panel {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trends Grid */
.trends-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .trends-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .trends-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Trend buttons slightly smaller */
.trends-grid .style-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    min-width: auto;
}

/* Trend Description (shown when SS26 trend selected) */
.trend-description {
    margin-top: 0.75rem;
    padding: 0.75rem 0.875rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border-left: 2px solid #E8D5C4;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.trend-description-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.35rem;
}

.trend-icon {
    font-size: 0.85rem;
    opacity: 0.8;
}

.trend-description-text {
    font-size: 0.75rem;
    font-weight: 300;
    color: #666;
    line-height: 1.45;
    margin-bottom: 0.5rem;
}

.trend-description-tip {
    font-size: 0.7rem;
    font-weight: 400;
    color: #888;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.trends-grid .style-btn.active::before {
    content: '';
}

/* =============================================================================
   INPUT TABS
   ============================================================================= */

.input-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e5e5;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #555;
    background: #fafafa;
}

.tab-btn.active {
    color: #1A1A1A;
    border-bottom-color: #1A1A1A;
}

.tab-btn svg {
    flex-shrink: 0;
}

.tab-content {
    padding-top: 0.5rem;
}

.tab-content.hidden {
    display: none;
}

/* Ensemble Builder container */
.ensemble-builder {
    max-width: 640px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .ensemble-builder {
        max-width: 720px;
    }
}

/* =============================================================================
   SLIM HELPER SELECTORS (Contextual Gender/Occasion)
   ============================================================================= */

.helper-selectors {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed #e0e0e0;
}

.helper-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.helper-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.helper-divider {
    font-size: 0.8rem;
    color: #999;
    padding: 0 0.25rem;
}

.helper-group {
    display: inline-flex;
}

/* Describe tab helpers */
.describe-helpers {
    padding-bottom: 0.5rem;
}

.helper-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.helper-prefix {
    font-size: 0.85rem;
    color: #666;
}

/* Slim toggle container */
.slim-toggle {
    display: inline-flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* Slim pill buttons */
.slim-pill {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border: 1px solid #ddd;
    border-radius: 16px;
    background: white;
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.slim-pill:hover {
    border-color: #bbb;
    background: #fafafa;
}

.slim-pill.active {
    border-color: #1A1A1A;
    background: #1A1A1A;
    color: white;
}

/* Outline small button */
.btn-outline-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-outline-sm:hover {
    border-color: #bbb;
    background: #f8f9fa;
}

/* =============================================================================
   COMPACT SELECTOR CARDS
   ============================================================================= */

.compact-card {
    padding: 0.875rem 1rem;
}

.compact-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compact-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    min-width: 60px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .compact-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .compact-label {
        min-width: auto;
    }

    .slim-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .slim-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* =============================================================================
   AUTH & MODALS
   ============================================================================= */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Google Sign In Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Usage Badge */
.usage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem 0.4rem;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 500;
    color: #555;
}

@media (min-width: 768px) {
    .usage-badge {
        gap: 0.35rem;
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }
}

.usage-badge.low {
    background: #fef3c7;
    color: #92400e;
}

.usage-badge.exceeded {
    background: #fee2e2;
    color: #991b1b;
}

.usage-badge.unlimited {
    background: #dbeafe;
    color: #1e40af;
}

.usage-count {
    font-weight: 700;
    font-size: 0.75rem;
}

.usage-label {
    font-weight: 400;
    opacity: 0.8;
    font-size: 0.55rem;
}

@media (min-width: 768px) {
    .usage-count {
        font-size: 1rem;
    }
    .usage-label {
        font-size: inherit;
    }
}

/* Pricing Card */
.pricing-card {
    position: relative;
    padding: 1.25rem;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: white;
}

.pricing-card.featured {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff 0%, #fff 100%);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: #8b5cf6;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
}

.pricing-header {
    margin-bottom: 1rem;
}

.pricing-header h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.pricing-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.pricing-savings {
    font-size: 0.85rem;
    color: #22c55e;
    font-weight: 500;
}

.pricing-usd {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-top: 0.25rem;
}

.pricing-usd span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #64748b;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.pricing-features li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li::before {
    content: '✓';
    color: #22c55e;
    font-weight: 700;
}

/* =============================================================================
   HISTORY MODAL
   ============================================================================= */

.history-modal {
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.history-content {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
}

.history-loading,
.history-empty,
.history-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .history-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .history-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.history-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.history-card:hover {
    border-color: #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-card-image {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}

.history-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.history-card:hover .history-card-image img {
    transform: scale(1.05);
}

.history-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.history-card-info {
    padding: 0.75rem;
}

.history-card-query {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.history-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card-actions {
    display: flex;
    gap: 0.25rem;
}

.history-action {
    padding: 0.35rem;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.history-action:hover {
    background: #f0f0f0;
    color: #333;
}

.history-action.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #e5e5e5;
}
