* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 300;
}

main h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #2d3748;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Progress Indicator Styles */
.progress-container {
    margin: 40px 0;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

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

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #3182ce;
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: #38a169;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #3182ce;
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: #38a169;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 15px;
    position: relative;
    top: -28px;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3182ce, #38a169);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Tab Container Styles */
.tab-container {
    margin-bottom: 30px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-panel.active {
    display: block;
}

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

.step-description {
    text-align: center;
    color: #718096;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0;
}

.navigation-buttons .btn {
    flex: 1;
    max-width: 200px;
}

.navigation-buttons .btn-secondary {
    margin-right: auto;
}

.navigation-buttons .btn-primary,
.navigation-buttons .btn-success {
    margin-left: auto;
}

.selection-block {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.selection-block h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #4a5568;
    text-align: center;
}

.color-palettes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.color-palette {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.color-palette:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.color-palette.selected {
    border-color: #3182ce;
    background: #ebf8ff;
}

.color-palette h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.color-circles {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.color-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.room-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.room-type-option {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    overflow: hidden;
    position: relative;
}

.room-type-option:hover {
    border-color: #3182ce;
    background: #ebf8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.room-type-option:hover .room-thumbnail img {
    transform: scale(1.05);
}

.room-type-option.selected {
    border-color: #3182ce;
    background: #3182ce;
    color: white;
}

.room-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.room-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    opacity: 0.7;
}

.room-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.materials, .styles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.material-option, .style-option {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    background: white;
    overflow: hidden;
}

.material-thumbnail, .style-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-thumbnail img, .style-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.material-option:hover .material-thumbnail img,
.style-option:hover .style-thumbnail img {
    transform: scale(1.05);
}

.material-option:hover, .style-option:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

.material-option.selected, .style-option.selected {
    border-color: #3182ce;
    background: #3182ce;
    color: white;
}


.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2c5282;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
}

/* Results Section */
.results {
    margin-top: 40px;
}

.results-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-bottom: 30px;
    align-items: start;
}

.generated-image {
    text-align: center;
}

.generated-image img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* Generation Summary */
.generation-summary {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    height: fit-content;
}

.generation-summary h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 25px;
    text-align: center;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}

.summary-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.summary-room-thumbnail,
.summary-material-thumbnail,
.summary-style-thumbnail {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.summary-room-thumbnail img,
.summary-material-thumbnail img,
.summary-style-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.summary-room-thumbnail .summary-icon,
.summary-material-thumbnail .summary-icon,
.summary-style-thumbnail .summary-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    min-width: auto;
}

.summary-colors {
    display: flex;
    gap: 6px;
    min-width: 50px;
    justify-content: center;
}

.summary-colors .color-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.summary-details {
    flex: 1;
}

.summary-label {
    font-size: 0.85rem;
    color: #718096;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.summary-value {
    font-size: 1.05rem;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.3;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.loading {
    text-align: center;
    padding: 40px;
}

.loading p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #4a5568;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .selection-blocks {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .room-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .generation-summary {
        padding: 20px;
    }
    
    .summary-item {
        padding: 12px;
        gap: 12px;
    }
    
    .summary-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    .result-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}