* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-content h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.upload-content p {
    color: #666;
    font-size: 1rem;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.image-preview {
    position: relative;
    text-align: center;
    margin-top: 20px;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

.analyze-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border-left: 5px solid #667eea;
}

.results h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.result-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.result-status {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 15px;
    border-radius: 10px;
}

.result-status.normal {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.result-status.pneumonia {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.confidence-meter {
    margin-top: 20px;
}

.confidence-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
}

.confidence-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa726 50%, #66bb6a 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
    width: 0%;
}

.confidence-text {
    text-align: center;
    font-weight: 600;
    color: #555;
}

.info-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 25px;
}

.info-section h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    color: #856404;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.info-section li:before {
    content: "⚠️";
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .analyze-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
