:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --text-color: #1E293B;
    --light-text: #64748B;
    --background: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --success-color: #10B981;
    --error-color: #EF4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    background-color: var(--background);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    color: var(--light-text);
    font-size: 1.125rem;
}

.upload-section, .analysis-section {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.03);
}

.upload-icon {
    fill: var(--light-text);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--light-text);
    font-size: 1.125rem;
}

.browse-text {
    color: var(--primary-color);
    font-weight: 500;
}

.preview-container {
    text-align: center;
    margin-top: 1.5rem;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

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

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

.secondary {
    background-color: var(--background);
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

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

.prompt-container {
    margin-bottom: 1.5rem;
}

.prompt-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#customPrompt {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

.detail-level {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.detail-level span {
    margin-right: 1rem;
    font-weight: 500;
}

select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    font-size: 1rem;
    cursor: pointer;
}

#analyzeBtn {
    margin-bottom: 1.5rem;
    width: 100%;
}

.results {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 50px;
    height: 50px;
}

.path {
    stroke: var(--primary-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.result-content {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    line-height: 1.7;
}

.result-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.result-content p {
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    color: var(--light-text);
    margin-top: 3rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .upload-section, .analysis-section {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

