/* Typography Scale */
:root {
    /* Font sizes - concise scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 2rem;      /* 32px */
    --text-4xl: 2.5rem;    /* 40px */
    
    /* Font weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Line heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* Disabled button colors */
    --disabled-bg: linear-gradient(135deg, #48484a 0%, #3a3a3c 100%);
    --disabled-color: #ffffff;
    --disabled-border: #48484a;
    --disabled-opacity: 0.7;
    
    /* Common border styles */
    --border-default: 1px solid #48484a;
    --border-success: 1px solid rgba(48, 209, 88, 0.2);
    --border-primary: 1px solid rgba(0, 122, 255, 0.2);
}

/* Unified Disabled Button Styling */
button:disabled,
.action-btn:disabled,
.size-btn:disabled {
    background: var(--disabled-bg) !important;
    color: var(--disabled-color) !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: var(--disabled-opacity);
    border: 1px solid var(--disabled-border);
    position: relative;
    animation: disabledPulse 3s ease-in-out infinite;
}

button:disabled::before,
.action-btn:disabled::before,
.size-btn:disabled::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.05) 2px,
        rgba(255, 255, 255, 0.05) 4px
    );
    border-radius: inherit;
    pointer-events: none;
}

button:disabled:hover,
.action-btn:disabled:hover,
.size-btn:disabled:hover {
    background: var(--disabled-bg) !important;
    color: var(--disabled-color) !important;
    transform: none !important;
    opacity: var(--disabled-opacity);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Critical CSS for above-the-fold content */
.header__brand h1,
.header__headline,
.header__subline {
    font-display: swap;
}

/* Performance optimizations */
img {
    loading: lazy;
    decoding: async;
}

/* Reduce layout shift */
.upload-area,
.generate-btn {
    min-height: 52px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #ffffff;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 768px;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* Responsive container */
@media (min-width: 768px) {
    .container {
        padding: 32px 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 40px 32px;
    }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 32px;
    padding: 0 8px;
}

/* Header Brand */
.header__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.header__brand h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.02em;
    margin: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #007aff 0%, #5ac8fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header__badge {
    background: linear-gradient(135deg, #007aff 0%, #5ac8fa 100%);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* Header Hero */
.header__hero {
    margin-bottom: 24px;
}

.header__headline {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: #ffffff;
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
    line-height: var(--leading-tight);
}

.header__subline {
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    color: #8e8e93;
    line-height: var(--leading-normal);
    margin: 0 0 20px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Header Benefits */
.header__benefits {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.benefit:hover {
    background: rgba(0, 122, 255, 0.15);
    transform: translateY(-1px);
}

.benefit__icon {
    font-size: var(--text-base);
}

.benefit__text {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: #ffffff;
}

/* Social Proof */
.header__social-proof {
    margin-bottom: 16px;
}

.social-proof__stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stat {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: #8e8e93;
    padding: 6px 12px;
    background: #2c2c2e;
    border-radius: 8px;
    border: 1px solid #48484a;
    transition: all 0.2s ease;
}

.stat:hover {
    background: #3a3a3c;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Responsive header */
@media (min-width: 768px) {
    header {
        margin-bottom: 48px;
    }
    
    .header__brand {
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .header__brand h1 {
        font-size: var(--text-4xl);
    }
    
    .header__badge {
        padding: 6px 16px;
        font-size: var(--text-sm);
    }
    
    .header__hero {
        margin-bottom: 32px;
    }
    
    .header__headline {
        font-size: var(--text-3xl);
        margin-bottom: 16px;
    }
    
    .header__subline {
        font-size: var(--text-lg);
        margin-bottom: 24px;
    }
    
    .header__benefits {
        gap: 24px;
        margin-bottom: 24px;
    }
    
    .benefit {
        padding: 12px 16px;
    }
    
    .benefit__icon {
        font-size: var(--text-lg);
    }
    
    .benefit__text {
        font-size: var(--text-base);
    }
    
    .social-proof__stats {
        gap: 24px;
    }
    
    .stat {
        font-size: var(--text-base);
        padding: 8px 16px;
    }
}

/* Main content */
main {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 20px 16px;
    border: 1px solid #38383a;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    main {
        padding: 32px 24px;
        border-radius: 20px;
        margin-bottom: 48px;
    }
}

/* Upload section */
.upload-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 48px;
    }
}

.upload-card {
    /* border: 1px solid #48484a; */
    /* border-radius: 12px; */
    /* padding: 16px 12px; */
    text-align: center;
    transition: all 0.2s ease;
    /* background: #2c2c2e; */
    margin-top: 2rem;

    &:first-child {
        margin-top: 1rem;
    }
}

.upload-card:hover {
    border-color: #007aff;
    background: #1c1c1e;
}

.upload-card h3 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    letter-spacing: -0.01em;
}

/* Product Collection Styles */
.product-collection {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #48484a;
}

.collection-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: var(--text-base);
    font-weight: var(--font-normal);
}

.collection-count {
    font-size: var(--text-sm);
    color: #8e8e93;
    background: #2c2c2e;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.product-cards {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-card {
    border: var(--border-default);
    border-radius: 12px;
    padding: 1rem;
    background: #1c1c1e;
    transition: all 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #007aff;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 24px;
}

.product-card-title {
    font-weight: var(--font-semibold);
    color: #ffffff;
    margin: 0;
    font-size: var(--text-sm);
    word-break: break-word;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-actions {
    display: flex;
    gap: 0.75rem;
}

.product-card-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8e8e93;
    transition: all 0.2s ease;
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1) contrast(2);
}

.product-card-btn:hover {
    background: #2c2c2e;
    color: #ffffff;
}

.product-card-btn.edit {
    color: #007aff;
}

.product-card-btn.remove {
    color: #ff3b30;
}

.product-card-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.product-card-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #48484a;
    flex-shrink: 0;
}

.product-card-details {
    flex: 1;
    min-width: 0;
}

.selected-clothing-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.selected-clothing-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: var(--text-xs);
    color: #8e8e93;
    text-align: left;
}

.clothing-type-icon {
    font-size: var(--text-xs);
}

.no-clothing-selected {
    color: #636366;
    font-style: italic;
    font-size: var(--text-sm);
}

.add-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: 2px dashed #48484a;
    background: transparent;
    color: #8e8e93;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

.add-product-btn:hover {
    border-color: #007aff;
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
}

.product-input-section {
    border: var(--border-default);
    border-radius: 12px;
    padding: 1rem;
    background: #2c2c2e;
    margin-bottom: 2rem;
}

.current-product-preview {
    margin-top: 1rem;
    border: 1px solid #48484a;
    border-radius: 12px;
    padding: 1rem;
    background: #1c1c1e;
}

.product-actions {
    display: none;
}

@media (min-width: 768px) {
    .upload-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .upload-card h3 {
        font-size: var(--text-xl);
        margin-bottom: 20px;
    }
}

/* Product input tabs */
.product-input-tabs {
    display: flex;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #48484a;
    background: #3a3a3c;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: #8e8e93;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #007aff;
    color: #ffffff;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

@media (min-width: 768px) {
    .product-input-tabs {
        margin-bottom: 20px;
    }
}

/* Input sections */
.input-section {
    margin-bottom: 16px;
}

/* Upload options */
.upload-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-option h4 {
    margin-bottom: 8px;
    color: #8e8e93;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .input-section {
        margin-bottom: 20px;
    }
    
    .upload-options {
        gap: 20px;
    }
    
    .upload-option h4 {
        margin-bottom: 10px;
        font-size: var(--text-sm);
    }
}

.upload-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 12px 0;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #48484a;
}

.upload-divider span {
    padding: 0 12px;
    color: #8e8e93;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    background: #2c2c2e;
}

@media (min-width: 768px) {
    .upload-divider {
        margin: 16px 0;
    }
    
    .upload-divider span {
        padding: 0 16px;
        font-size: var(--text-sm);
    }
}

/* Upload area */
.upload-area {
    border: 2px dashed #48484a;
    border-radius: 12px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #1c1c1e;
    /* Mobile optimizations */
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-area:hover {
    border-color: #007aff;
    background: #1a1a1c;
}

.upload-area.dragover {
    border-color: #007aff;
    background: #0a1a2e;
    transform: scale(1.01);
}

@media (min-width: 768px) {
    .upload-area {
        padding: 40px 20px;
        border-radius: 16px;
    }
}

.upload-content {
    pointer-events: none;
}

.upload-content p {
    color: #ffffff;
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    margin-bottom: 4px;
}

.upload-icon {
    font-size: var(--text-4xl);
    margin-bottom: 12px;
    opacity: 0.6;
}

.upload-hint {
    color: #8e8e93;
    font-size: var(--text-sm);
    margin-top: 4px;
    font-weight: var(--font-normal);
}

.upload-tips {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 8px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.upload-tips small {
    color: #8e8e93;
    font-size: var(--text-xs);
    line-height: var(--leading-tight);
}

.upload-area:hover .upload-tips {
    opacity: 1;
}

@media (min-width: 768px) {
    .upload-icon {
        font-size: var(--text-4xl);
        margin-bottom: 16px;
    }
    
    .upload-content p {
        font-size: var(--text-lg);
    }
    
    .upload-hint {
        font-size: var(--text-base);
    }
}

/* Preview containers */
.preview-container {
    position: relative;
    margin-top: 16px;
}

.image-selection-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.preview-container img {
    max-width: 100%;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #48484a;
    display: block;
}

/* Selection canvas and overlay */
#selectionCanvas {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    cursor: crosshair;
    z-index: 2;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff453a;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-btn:hover {
    background: #ff3b30;
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .preview-container {
        margin-top: 20px;
    }
    
    .preview-container img {
        border-radius: 16px;
    }
    
    .remove-btn {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Clothing Controls */
.clothing-controls {
    margin-top: 12px;
    padding: 12px;
    background: #2c2c2e;
    border-radius: 12px;
    border: 1px solid #48484a;
}

.detection-options h4 {
    color: #ffffff;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

.detection-methods {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #1c1c1e;
    border: 1px solid #48484a;
    border-radius: 8px;
    color: #8e8e93;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

.method-btn.active {
    background: #007aff;
    border-color: #007aff;
    color: #ffffff;
}

.method-btn:hover:not(.active) {
    background: #3a3a3c;
    border-color: #5a5a5c;
    color: #ffffff;
}

.method-icon {
    font-size: var(--text-2xl);
}

/* Detected Items */
.detected-items h5 {
    margin: 0 0 12px 0;
    font-size: var(--text-xs);
    color: #8e8e93;
    font-weight: var(--font-medium);
}

.detection-loading {
    font-size: var(--text-xs);
    padding: 20px;
    text-align: center;
}

.analysis-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Use shared loader-spinner class */
.analysis-loader .loader-spinner {
    width: 32px;
    height: 32px;
}

.analysis-text h5 {
    margin: 0 0 8px 0;
    font-size: var(--text-base);
    color: #ffffff;
}

.analysis-progress {
    margin: 0;
    font-size: var(--text-xs);
    color: #8e8e93;
}

/* Clothing Actions */
.clothing-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #48484a;
}

.clothing-actions .action-btn {
    width: 100%;
    padding: 12px 16px;
    background: #007aff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.clothing-actions .action-btn:hover:not(:disabled) {
    background: #0056cc;
    transform: translateY(-1px);
}


.items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clothing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #1c1c1e;
    border: 1px solid #48484a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-wrap: balance;
}

.clothing-item:hover {
    background: #3a3a3c;
    border-color: #007aff;
}

.clothing-item.selected {
    background: #007aff;
    border-color: #007aff;
    color: #ffffff;
}

.clothing-item.selected .item-description {
    color: rgba(255, 255, 255, 0.5);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 16px;

    width: 100%;
}

/* Checkbox styling for multiple selection */
.clothing-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #007aff;
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    
}

.item-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: grayscale(1) contrast(2);
}

.item-details {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.item-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: var(--leading-tight);
}

.item-description {
    font-size: var(--text-xs);
    color: #8e8e93;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: var(--leading-tight);
}

/* Manual Selection */
.manual-instructions {
    text-align: center;
}

.manual-instructions p {
    margin: 0 0 16px 0;
    color: #8e8e93;
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
}

.selection-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.secondary {
    background: #48484a;
    color: #ffffff;
}

.action-btn.secondary:hover {
    background: #5a5a5c;
}

.action-btn.primary {
    background: #007aff;
    color: #ffffff;
}

.action-btn.primary:hover:not(:disabled) {
    background: #0056cc;
}

.action-btn-success {
    background: linear-gradient(135deg, #30d158 0%, #32d760 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(48, 209, 88, 0.3);
}

.action-btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #28c946 0%, #30d158 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(48, 209, 88, 0.4);
}


@media (min-width: 768px) {
    .clothing-controls {
        margin-top: 20px;
        padding: 20px;
        border-radius: 16px;
    }
    
    .detection-options h4 {
        font-size: var(--text-lg);
        margin-bottom: 16px;
    }
    
    .detection-methods {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .method-btn {
        padding: 16px 12px;
        font-size: var(--text-base);
    }
    
    .detected-items h5 {
        font-size: var(--text-base);
    }
    
    .items-list {
        gap: 12px;
    }
    
    .clothing-item {
        padding: 16px;
    }
    
    .item-name {
        font-size: var(--text-base);
    }
    
    .item-description {
        font-size: var(--text-sm);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: var(--leading-tight);
    }
    
    .manual-instructions p {
        font-size: var(--text-base);
    }
    
    .action-btn {
        padding: 14px 20px;
        font-size: var(--text-base);
    }
}

/* Selection Preview */
.selection-preview {
    margin-top: 16px;
    padding: 16px;
    background: #1c1c1e;
    border: 1px solid #48484a;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.selection-preview h5 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.preview-wrapper {
    text-align: center;
}

.selection-preview img {
    /* max-width: 150px; */
    /* max-height: 150px; */
    border-radius: 8px;
    border: 1px solid #48484a;
    margin-bottom: 12px;
}

.preview-actions {
    display: flex;
    justify-content: center;
}

.action-btn.small {
    padding: 8px 16px;
    font-size: var(--text-xs);
}

@media (min-width: 768px) {
    .selection-preview {
        margin-top: 20px;
        padding: 20px;
        border-radius: 16px;
    }
    
    .selection-preview h5 {
        font-size: var(--text-base);
        margin-bottom: 16px;
    }
    
    .selection-preview img {
        /* max-width: 200px; */
        /* max-height: 200px; */
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .action-btn.small {
        padding: 10px 20px;
        font-size: var(--text-sm);
    }
}

/* URL input */
.url-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.url-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.url-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 16px;
    border: 1px solid #48484a;
    border-radius: 12px;
    font-size: var(--text-base);
    background: #1c1c1e;
    color: #ffffff;
    transition: all 0.2s ease;
}

.url-input-wrapper input:focus {
    outline: none;
    border-color: #007aff;
}

.url-input-wrapper input::placeholder {
    color: #8e8e93;
}

.url-input-wrapper input:focus {
    outline: none;
    border-color: #007aff;
}

.paste-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #2c2c2e;
    border: 1px solid #48484a;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
    min-height: 24px !important;
}

.paste-btn:active{
    transform: translateY(-50%) scale(1) !important;
}

.paste-btn:hover {
    background: #3a3a3c;
    border-color: #007aff;
}

.paste-btn:focus-visible {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

.paste-icon {
    font-size: var(--text-sm);
    color: #8e8e93;
    transition: color 0.2s ease;
    filter: grayscale(1) contrast(2);
}

.paste-btn:hover .paste-icon {
    color: #007aff;
}

/* Hide paste button after successful paste */
.paste-btn.hidden {
    display: none;
}

.url-input-container button {
    padding: 16px;
    background: #007aff;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    min-height: 44px;
}

.url-input-container button:hover:not(:disabled) {
    background: #0056b3;
    /* transform: translateY(-1px); */
}


@media (min-width: 768px) {
    .url-input-container {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .url-input-wrapper {
        flex: 1;
    }
    
    .url-input-wrapper input {
        padding: 12px 40px 12px 16px;
        border-radius: 10px;
    }
    
    .paste-btn {
        width: 24px;
        height: 24px;
        right: 6px;
    }
    
    .paste-icon {
        font-size: var(--text-xs);
    }
    
    .url-input-container button {
        padding: 12px 24px;
        border-radius: 8px;
        min-height: auto;
    }
}

/* Generate section */
.generate-section {
    text-align: center;
    margin-bottom: 24px;
}

/* Generate help message */
.generate-help {
    margin-top: 12px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.help-text {
    color: #8e8e93;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin: 0 0 8px 0;
    opacity: 0.8;
}

.urgency-text {
    color: #30d158;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin: 0;
    padding: 6px 12px;
    background: rgba(48, 209, 88, 0.1);
    border: 1px solid rgba(48, 209, 88, 0.2);
    border-radius: 8px;
    display: inline-block;
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

@keyframes urgencyPulse {
    0%, 100% { 
        background: rgba(48, 209, 88, 0.1);
        transform: scale(1);
    }
    50% { 
        background: rgba(48, 209, 88, 0.15);
        transform: scale(1.02);
    }
}

@media (min-width: 768px) {
    .generate-section {
        margin-bottom: 48px;
        padding: 0;
    }
    
    .generate-help {
        margin-top: 20px;
    }
    
    .help-text {
        font-size: var(--text-base);
    }
}

/* Size tracker */
.size-tracker {
    background: #2c2c2e;
    border: 1px solid #48484a;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0;
    text-align: center;
}

.tracker-text {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: #ffffff;
}

#clothingName {
    color: #007aff;
    font-weight: var(--font-bold);
}

#currentSize {
    color: #30d158;
    font-weight: var(--font-bold);
}

@media (min-width: 768px) {
    .size-tracker {
        border-radius: 16px;
        padding: 20px 24px;
        margin: 24px 0;
    }
    
    .tracker-text {
        font-size: var(--text-lg);
    }
}

/* Size adjustment buttons */
.size-adjustment-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
    padding: 0 8px;
    flex-wrap: wrap;
}

.size-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
    min-height: 52px;
}

.smaller-btn {
    background: #ff453a;
    color: #ffffff;
}

.smaller-btn:hover {
    background: #ff3b30;
    transform: translateY(-1px);
}

.bigger-btn {
    background: #30d158;
    color: #ffffff;
}

.bigger-btn:hover {
    background: #28cd4b;
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .size-adjustment-buttons {
        flex-direction: row;
        gap: 16px;
        margin: 24px 0;
        padding: 0;
    }
    
    .size-btn {
        width: auto;
        min-width: 180px;
        border-radius: 16px;
    }
}


.btn-icon {
    font-size: var(--text-lg);
}

.btn-text {
    font-size: var(--text-sm);
}

.generate-btn {
    background: #007aff;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-btn:hover:not(:disabled) {
    background: #0056cc;
    transform: translateY(-1px);
}


@media (min-width: 768px) {
    .generate-btn {
        padding: 20px 40px;
        font-size: var(--text-xl);
        border-radius: 16px;
        min-width: 320px;
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Result section */
.result-section {
    text-align: center;
    margin-bottom: 32px;
    padding: 0 8px;
}

.result-section h3 {
    margin-bottom: 24px;
    color: #ffffff;
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    letter-spacing: -0.01em;
}

.result-container {
    margin-bottom: 24px;
}

.result-container img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 16px;
    border: 1px solid #48484a;
}

@media (min-width: 768px) {
    .result-section {
        margin-bottom: 48px;
        padding: 0;
    }
    
    .result-section h3 {
        margin-bottom: 32px;
        font-size: var(--text-3xl);
    }
    
    .result-container {
        margin-bottom: 32px;
    }
    
    .result-container img {
        border-radius: 20px;
    }
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    padding: 0 8px;
}

.action-btn {
    padding: 16px 24px;
    border: 1px solid #48484a;
    border-radius: 12px;
    cursor: pointer;
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    background: #2c2c2e;
    color: #ffffff;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: #007aff;
    border-color: #007aff;
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .result-actions {
        flex-direction: row;
        gap: 16px;
        padding: 0;
    }
    
    .action-btn {
        padding: 12px 24px;
        border-radius: 16px;
        min-height: auto;
        width: auto;
    }
}

/* Unified Alert System */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.alert {
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideInRight 0.3s ease;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: var(--text-sm);
}

.alert-icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
    line-height: 1.4;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: var(--text-xl);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.alert-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.alert-actions {
    padding: 0 20px 16px 20px;
    text-align: center;
}

.alert-retry-btn {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.alert-retry-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Alert Types */
.alert-error {
    background: #2c1a1a;
    color: #ff453a;
    border: 1px solid #ff453a;
}

.alert-success {
    background: #1a2c1a;
    color: #32d74b;
    border: 1px solid #32d74b;
}

.alert-info {
    background: #1a1a2c;
    color: #64d2ff;
    border: 1px solid #64d2ff;
}

.alert-warning {
    background: #2c2c1a;
    color: #ffd60a;
    border: 1px solid #ffd60a;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .alert-container {
        top: 24px;
        right: 24px;
        max-width: 450px;
    }
    
    .alert-content {
        padding: 20px 24px;
        font-size: var(--text-base);
    }
    
    .alert-icon {
        font-size: var(--text-xl);
    }
    
    .alert-actions {
        padding: 0 24px 20px 24px;
    }
}

@media (max-width: 480px) {
    .alert-container {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Legacy Error Section - Keep for backward compatibility but hide */
.error-section {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    color: #8e8e93;
    font-size: var(--text-sm);
    padding: 0 8px;
}

/* Start Over Section */
.start-over-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #1c1c1e;
}

.start-over-btn {
    background: linear-gradient(135deg, #ff3b30 0%, #ff453a 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.start-over-btn:hover {
    background: linear-gradient(135deg, #ff453a 0%, #ff6961 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 59, 48, 0.3);
}

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

.start-over-hint {
    margin: 0;
    font-size: var(--text-sm);
    color: #8e8e93;
}

.footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer__powered {
    margin: 0;
    line-height: 1.4 !important;
    color: #ffffff;
    font-weight: var(--font-semibold);
    text-decoration: none;

    & a{
        color: #ffffff;
        text-decoration: underline;
    }
}

.footer__trust {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.trust-item {
    font-size: var(--text-xs);
    color: #8e8e93;
    padding: 4px 8px;
    background: #2c2c2e;
    border-radius: 6px;
    border: 1px solid #48484a;
    transition: all 0.2s ease;
}

.trust-item:hover {
    background: #3a3a3c;
    color: #ffffff;
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    footer {
        font-size: var(--text-base);
        padding: 0;
    }
    
    .footer__content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 24px;
    }
    
    .footer__trust {
        gap: 16px;
    }
    
    .trust-item {
        font-size: var(--text-sm);
        padding: 6px 12px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Blur placeholder effect */
.blur-placeholder {
    /* filter: blur(8px); */
    transition: filter 0.3s ease;
}

/* Loader overlay */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 28, 30, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.loader-content {
    text-align: center;
    color: #ffffff;
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #48484a;
    border-top: 3px solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.loader-content p {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: #8e8e93;
}

@media (min-width: 768px) {
    .loader-overlay {
        border-radius: 16px;
    }
    
    .loader-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
        margin: 0 auto 16px;
    }
    
    .loader-content p {
        font-size: var(--text-base);
    }
}


.result-container {
    position: relative;
}

/* Apple-style animations and interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to key elements */
.upload-card {
    animation: fadeInUp 0.6s ease-out;
}

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

.generate-btn {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.result-section {
    animation: fadeIn 0.8s ease-out;
}

.preview-container {
    animation: scaleIn 0.4s ease-out;
}

/* Enhanced focus states for accessibility */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

/* Subtle hover feedback */
.upload-area {
    will-change: transform;
}

.upload-area:active {
    transform: scale(0.98);
}

/* Button press feedback */
button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.generate-btn:active {
    transform: scale(0.98);
}

/* Progress Indicator */
.progress-container {
    margin-bottom: 24px;
    padding: 0 8px;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #48484a;
    background: #1c1c1e;
    color: #8e8e93;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    transition: all 0.3s ease;
    margin-bottom: 6px;
}

.step-label {
    font-size: var(--text-xs);
    color: #8e8e93;
    font-weight: var(--font-medium);
    text-align: center;
    transition: color 0.3s ease;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #48484a;
    margin: 0 16px;
    position: relative;
    top: -13px;
    transition: background 0.3s ease;
}

/* Progress states */
.progress-step.active .step-number {
    background: #007aff;
    border-color: #007aff;
    color: #ffffff;
}

.progress-step.active .step-label {
    color: #007aff;
}

.progress-step.completed .step-number {
    background: #30d158;
    border-color: #30d158;
    color: #ffffff;
}

.progress-step.completed .step-label {
    color: #30d158;
}

.progress-step.completed + .progress-line {
    background: #30d158;
}

@media (min-width: 768px) {
    .progress-container {
        margin-bottom: 4px;
        padding: 0;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: var(--text-base);
        margin-bottom: 8px;
    }
    
    .step-label {
        font-size: var(--text-sm);
    }
    
    .progress-line {
        margin: 0 24px;
        top: -17px;
    }
}

/* Smooth transitions for state changes */
* {
    transition-property: background-color, border-color, color, opacity, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease-out;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    button:disabled,
    .action-btn:disabled,
    .size-btn:disabled {
        animation: none !important;
        opacity: var(--disabled-opacity);
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .upload-card {
        border-width: 2px;
    }
    
    .upload-area {
        border-width: 3px;
    }
    
    button {
        border: 2px solid currentColor;
    }
}

/* Dark mode is already implemented as the default theme */

/* Ensure sufficient color contrast */
/* Background: #000000 (pure black) with white text = 21:1 ratio ✓ */
/* Cards: #1c1c1e with white text = 16.94:1 ratio ✓ */
/* Secondary text: #8e8e93 on black = 4.56:1 ratio ✓ */
/* Primary blue: #007aff on black = 8.59:1 ratio ✓ */

/* Focus management for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading state announcements */
.loading-spinner[aria-label] {
    color: transparent;
}

/* Success states and micro-interactions */
.upload-success {
    background: rgba(48, 209, 88, 0.1);
    border-color: #30d158;
}

.upload-complete {
    opacity: 0.9;
    cursor: pointer;
}

.upload-complete:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.upload-success .upload-content::before {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #30d158;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    animation: successPop 0.4s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Image validation feedback */
.image-feedback {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.image-feedback.positive {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.image-feedback.warning {
    background: rgba(255, 159, 10, 0.1);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.image-feedback.negative {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

/* Loading progress enhancement */
.loading-progress {
    margin-top: 16px;
    padding: 12px;
    background: #2c2c2e;
    border-radius: 8px;
    border: 1px solid #48484a;
}

.progress-text {
    color: #8e8e93;
    font-size: var(--text-sm);
    margin-bottom: 8px;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #48484a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #007aff;
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

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

@keyframes disabledPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.995);
    }
}

/* Onboarding and Help */
.onboarding-hint {
    margin-top: 16px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.hint-content {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.hint-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.hint-text {
    flex: 1;
    color: #8e8e93;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.hint-close {
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    font-size: var(--text-xl);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.hint-close:hover {
    color: #ffffff;
}


@media (min-width: 768px) {
    .onboarding-hint {
        margin-top: 20px;
    }
    
    .hint-content {
        padding: 16px 20px;
    }
    
    .hint-text {
        font-size: var(--text-base);
    }
    
}

/* Android and Mobile-specific improvements */
@media (max-width: 768px) {
    .upload-area {
        min-height: 140px;
        padding: 20px 12px;
    }
    
    .upload-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .upload-tips {
        font-size: var(--text-xs);
        line-height: 1.4;
    }
    
    .upload-tips small {
        display: block;
        margin: 2px 0;
    }
    
    /* Better touch targets for mobile */
    .upload-area:active {
        transform: scale(0.95);
        background: #0a0a0c;
    }
    
    /* Improve button spacing on mobile */
    .action-btn, .size-btn {
        min-height: 48px;
        padding: 12px 20px;
    }
}

/* Android-specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    .upload-area {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Android Chrome specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .upload-area {
        -webkit-tap-highlight-color: rgba(0, 122, 255, 0.1);
    }
}

/* Upload option buttons */
.upload-options {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #48484a;
    border-radius: 8px;
    background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
    color: #ffffff;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    justify-content: center;
}

.upload-option-btn:hover {
    border-color: #007aff;
    background: linear-gradient(135deg, #1a1a1c 0%, #0a0a0c 100%);
    transform: translateY(-1px);
}

.upload-option-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #0a0a0c 0%, #000000 100%);
}

.upload-option-btn .btn-icon {
    font-size: 16px;
}

.camera-btn:hover {
    border-color: #34c759;
    box-shadow: 0 0 0 1px rgba(52, 199, 89, 0.2);
}

.gallery-btn:hover {
    border-color: #ff9500;
    box-shadow: 0 0 0 1px rgba(255, 149, 0, 0.2);
}

/* Mobile optimizations for upload buttons */
@media (max-width: 768px) {
    .upload-options {
        flex-direction: column;
        gap: 8px;
        margin: 12px 0;
    }
    
    .upload-option-btn {
        min-width: auto;
        width: 100%;
        padding: 14px 16px;
        font-size: var(--text-base);
    }
}
