/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #3a36e0;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    color: #666;
}

/* Main content styles */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Upload section styles */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 3rem 2rem;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #3a36e0;
    background-color: #f0f8ff;
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-prompt svg {
    fill: #3a36e0;
    margin-bottom: 1rem;
}

.upload-prompt p {
    color: #666;
}

.file-info {
    margin-top: 1rem;
}

.file-info p {
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Processing message styles */
.processing-message {
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #3a36e0;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Examples section styles */
.examples-section {
    margin: 3rem auto;
    max-width: 1500px;
    padding: 0 1rem;
    width: 100%;
}

.examples-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #3a36e0;
}

.examples-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.example-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .example-card {
        min-width: 350px;
        max-width: 650px;
    }
}
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.before-after-container {
    position: relative;
    display: flex;
    flex-direction: row;
    flex: 1;
    height: 400px;
}

.before-image, .after-image {
    position: relative;
    flex: 1;
    width: 50%;
    height: 100%;
    padding-bottom: 0;
    overflow: hidden;
    min-height: 400px;
}

.before-image img, .after-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
}

.label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

/* Error handling for images */
.before-image img.error, .after-image img.error {
    background-color: #f0f0f0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.before-image img.error::before, .after-image img.error::before {
    content: "Image not available";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* Results section styles */
.results-section {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.results-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #3a36e0;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .examples-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }
    
    .before-after-container {
        flex-direction: column;
    }
    
    .before-image, .after-image {
        width: 100%;
        padding-bottom: 75%;
    }
    
    .image-comparison {
        flex-direction: column;
    }
    
    .image-container {
        width: 100%;
        margin: 0 0 1rem 0;
    }
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.image-container h3 {
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    /* background-color: #f0f2f5; */
    color: #333;
}

.image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background-color: #3a36e0;
    color: white;
}

.btn.primary:hover {
    background-color: #2a26c0;
}

.btn.secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn.secondary:hover {
    background-color: #d0d0d0;
}

/* Footer styles */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem 0;
    color: #666;
}

footer a {
    color: #3a36e0;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
} 