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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.server-info {
    font-size: 0.9em;
    opacity: 0.7;
    font-style: italic;
    margin-top: 5px;
}

.upload-section {
    padding: 40px 30px;
    background: #f8f9fa;
}

.file-input-wrapper {
    margin-bottom: 20px;
}

.file-input-label {
    display: block;
    padding: 20px;
    border: 3px dashed #3498db;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ecf0f1;
    font-size: 1.1em;
    color: #2c3e50;
}

.file-input-label:hover {
    background: #d6dbdf;
    border-color: #2980b9;
}

.upload-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

#fileInput {
    display: none;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px;
}

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

.result-section {
    padding: 30px;
    background: white;
}

.comparison-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.image-preview-section, .contact-info-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.image-preview-section h3, .contact-info-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.image-preview-container {
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 3px solid #3498db;
}

.contact-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #bdc3c7;
}

.info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.info-item label {
    font-weight: bold;
    min-width: 150px;
    color: #2c3e50;
}

.raw-text {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.raw-text pre {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background: #34495e;
    padding: 15px;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 20px;
    margin: 20px;
    border-radius: 8px;
    text-align: center;
}

.tips {
    background: #fff3cd;
    padding: 25px;
    border-top: 3px solid #ffc107;
}

.tips h3 {
    color: #856404;
    margin-bottom: 15px;
}

.tips ul {
    list-style-position: inside;
}

.tips li {
    margin-bottom: 8px;
    color: #856404;
}

.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .comparison-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-item label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .preview-image {
        max-height: 250px;
    }
}