* {
    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: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: #2c3e50;
    color: white;
    border-radius: 8px;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.header-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.patient-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.patient-info label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ecf0f1;
}

.patient-info input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.patient-info input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    display: inline-block;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    align-items: stretch;
}

.item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #3498db;
}

.item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    justify-content: space-between;
}

.item-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.image-placeholder {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.options label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    font-size: 0.85rem;
    background: #f8f9fa;
    margin-bottom: 4px;
}

.options label:hover {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateX(3px);
}

.options input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.1);
    accent-color: #3498db;
}

.section-total {
    text-align: right;
    margin-top: 20px;
    padding: 12px 20px;
    background: #3498db;
    color: white;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.results-section {
    background: #2c3e50;
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.results-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.result-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #bdc3c7;
}

.result-item span {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
}

.total-score {
    grid-column: 1 / -1;
    background: rgba(52, 152, 219, 0.3);
    font-size: 1.1rem;
    padding: 20px;
    border: 2px solid rgba(52, 152, 219, 0.5);
}

.total-score span {
    font-size: 1.8rem;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-info {
    background: #9b59b6;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .header-info {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .item {
        padding: 15px;
        min-height: auto;
    }
    
    .item-image {
        height: 120px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .form-section h2 {
        font-size: 1.2rem;
    }
    
    .item h3 {
        font-size: 0.9rem;
    }
    
    .options label {
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }
    
    header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .actions {
        display: none;
    }
    
    .form-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .results-section {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .result-item {
        background: #e9ecef !important;
        color: #333 !important;
    }
    
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.item {
    animation: fadeIn 0.5s ease-out;
}

/* Success/Error messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
    display: none;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
    display: none;
}

/* Progress indicator */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    transition: width 0.3s ease;
}

/* Completion indicators */
.form-section.completed {
    border-left: 4px solid #27ae60;
}

.form-section.completed h2::after {
    content: ' ✓';
    color: #27ae60;
    font-weight: bold;
}

.item.completed {
    border-color: #27ae60;
    background: #f8fff9;
}

.item.completed h3::after {
    content: ' ✓';
    color: #27ae60;
    font-weight: bold;
}