/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Upload Section */
.upload-section {
    padding: 60px 40px;
}

.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-color);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-zone h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.upload-zone p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.file-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 15px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove:hover {
    background: var(--error-color);
    color: white;
}

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

.preview-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 20px;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-section p {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.loading-subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* Result Section */
.result-section {
    text-align: center;
    padding: 40px 20px;
}

.result-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
}

.result-label {
    font-weight: 600;
    color: var(--text-light);
}

.result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.result-bar-container {
    width: 100%;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.result-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--error-color));
    width: 0%;
    transition: width 1s ease;
    border-radius: 10px;
}

.result-explanation {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    color: var(--error-color);
    margin-bottom: 20px;
}

.error-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.error-section p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Features Section */
.features-section {
    padding: 60px 40px;
    background: var(--bg-color);
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
}

/* How it works Section */
.how-it-works-section {
    padding: 60px 40px;
}

.how-it-works-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.steps {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.step p {
    color: var(--text-light);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: white;
    margin-top: 40px;
}

.footer p {
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .upload-section {
        padding: 40px 20px;
    }

    .upload-zone {
        padding: 40px 20px;
    }

    .upload-zone h2 {
        font-size: 1.2rem;
    }

    .features-section,
    .how-it-works-section {
        padding: 40px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
    }

    .result-card {
        padding: 30px 20px;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

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

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

/* Status colors */
.status-ai {
    color: var(--error-color);
}

.status-real {
    color: var(--success-color);
}

.status-uncertain {
    color: var(--warning-color);
}
