/* ========================================
   CSS Variables - Black & White Theme
   ======================================== */
:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray: #666666;
    --color-light-gray: #f5f5f5;
    --color-border: #e0e0e0;
    --color-accent: #000000;
}

/* ========================================
   Global Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif !important;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #ffffff;
    color: #000000A6;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif !important;
}

h1 {
    font-family: 'Archivo Black', sans-serif !important;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    background: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Archivo Black', 'Roboto', sans-serif;
    color: #000000;
    letter-spacing: -0.02em;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Archivo Black', 'Roboto', sans-serif;
    color: #000000;
    letter-spacing: -0.02em;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: #ffffff;
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Archivo Black', 'Roboto', sans-serif;
    color: #000000;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Archivo Black', 'Roboto', sans-serif;
    color: #000000;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero p {
    color: #000000A6;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ========================================
   Step Numbers
   ======================================== */
.step-number {
    display: inline-block;
    color: #000000;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* ========================================
   Upload Section
   ======================================== */
.upload-section {
    margin-bottom: 3rem;
}

.upload-section h2 {
    text-align: center;
    margin: 0 0 48px 0;
    color: #000000;
    font-size: 32px;
    font-weight: 600;
    font-family: 'Archivo Black', sans-serif !important;
    position: relative;
    z-index: 1;
}

.upload-section h2::before {
    content: "1.";
    display: inline-block;
    margin-right: 0.5rem;
    color: #000000;
    font-weight: 700;
}

.upload-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #000000, #000000);
    border-radius: 2px;
}

.upload-area {
    padding: 3rem 2rem;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.upload-area:hover {
    border-color: #000000;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upload-label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.upload-icon img {
    display: block;
    margin: 0 auto;
    transition: all 0.2s ease;
}

.upload-area:hover .upload-icon img {
    transform: scale(1.05);
}

.upload-area p {
    font-size: 1.125rem;
    color: #000000;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.upload-hint {
    color: #000000A6;
    font-size: 0.9rem;
}

/* Preview Section */
.preview-section {
    text-align: center;
    margin-top: 2rem;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

#imageCanvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* ========================================
   Buttons
   ======================================== */
.primary-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.primary-btn:hover {
    background-color: #333333;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.secondary-btn:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ========================================
   Analysis Section
   ======================================== */
.analysis-section {
    text-align: center;
    padding: 3rem 0;
}

.analysis-section h2 {
    text-align: center;
    margin: 0 0 48px 0;
    color: #000000;
    font-size: 32px;
    font-weight: 600;
    font-family: 'Archivo Black', 'Roboto', sans-serif;
    position: relative;
    z-index: 1;
}

.analysis-section h2::before {
    content: "2.";
    display: inline-block;
    margin-right: 0.5rem;
    color: #000000;
    font-weight: 700;
}

.analysis-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #000000, #000000);
    border-radius: 2px;
}

.analysis-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid #e0e0e0;
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#analysisStatus {
    font-size: 1.125rem;
    color: #666666;
}

/* ========================================
   Results Section
   ======================================== */
.results-section {
    margin-top: 2rem;
}

.results-section h2 {
    text-align: center;
    margin: 0 0 48px 0;
    color: #000000;
    font-size: 32px;
    font-weight: 600;
    font-family: 'Archivo Black', 'Roboto', sans-serif;
    position: relative;
    z-index: 1;
}

.results-section h2::before {
    content: "3.";
    display: inline-block;
    margin-right: 0.5rem;
    color: #000000;
    font-weight: 700;
}

.results-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #000000, #000000);
    border-radius: 2px;
}

.info-card {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

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

.info-item h3 {
    color: #666666;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
}

/* ========================================
   Color Palette Section
   ======================================== */
.palette-section {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.palette-category h4 {
    margin-bottom: 1rem;
    color: #666666;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.color-swatches {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-swatch:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: #000000;
}

.color-swatch::after {
    content: attr(data-color);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #666666;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ========================================
   Fashion Tips Section
   ======================================== */
.tips-section {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tips-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #000000;
    margin-bottom: 1.5rem;
}

.necklines-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.neckline-tag {
    background-color: #000000;
    border: 2px solid #000000;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    color: #ffffff;
}

/* ========================================
   Products Section
   ======================================== */
.products-section {
    margin-bottom: 3rem;
}

.product-category {
    margin-bottom: 2.5rem;
}

.product-category h4 {
    color: #666666;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #000000;
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.product-card h4 {
    font-size: 0.75rem;
    color: #666666;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-card p {
    font-size: 0.875rem;
    color: #000000;
    margin-bottom: 0.5rem;
}

.product-card strong {
    color: #000000;
}

.product-card a {
    display: inline-block;
    margin-top: 0.5rem;
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border: 2px solid #000000;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.product-card a:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery-section {
    margin-bottom: 3rem;
}

.outfit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.outfit-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.outfit-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.outfit-card:hover img {
    transform: scale(1.1);
}

.outfit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 1rem;
    color: white;
    font-size: 0.875rem;
}

/* ========================================
   Result Actions
   ======================================== */
.result-actions {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #999999;
}

.footer a {
    color: #ffffff !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .palette-grid,
    .info-row {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .outfit-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading and Error States for Outfit Gallery */
.loading-outfits,
.error-outfits {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 300px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed var(--color-border);
    margin: 2rem 0;
}

.loading-outfits p {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-black);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: modernPulse 2s ease-in-out infinite;
}

.loading-outfits p::before {
    content: "✨";
    font-size: 1.4rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

.error-outfits p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-gray);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-outfits p::before {
    content: "⚠️";
    font-size: 1.3rem;
}

@keyframes modernPulse {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes sparkle {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
}

