.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.header {
    background: linear-gradient(#3498db 100%);
    color: #ffffff;
    padding: 40px;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.main-content {
    padding: 40px;
}

.form-section {
    background: #ffffff;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e0e4e8;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h2::before {
    content: '🏥';
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group select,
.form-group input {
    padding: 12px 15px;
    border: 2px solid #d0d7de;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-group select:disabled,
.form-group input:disabled {
    background: #f1f3f5;
    color: #6c757d;
    cursor: not-allowed;
}

.calculate-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    display: block;
    margin: 0 auto;
    min-width: 200px;
}

.calculate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.calculate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-container {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.result-container.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.result-content {
    background: #ffffff;
    padding: 30px;
    border-left: 5px solid #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.calculation-result {
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.calculation-result.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.calculation-content {
    background: #e9f7ef;
    border: 2px solid #28a745;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.1);
}

.product-info,
.dosage-info,
.warning,
.no-dosage {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.dosage-info h3,
.dosage-info h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dosage-info h3::before { content: '💊'; }
.dosage-info h4::before { content: '🐾'; }

.dosage-text {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-line;
    background: rgba(255, 255, 255, 0.85);
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}
.loading.show { display: block; }
.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.footer {
    background: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: 25px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .container { margin: 10px; }
    .header { padding: 30px 20px; }
    .header h1 { font-size: 2rem; }
    .main-content { padding: 25px 20px; }
    .form-section { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .calculate-btn { width: 100%; }
}

@media (max-width: 480px) {
    body { padding: 10px; }
    .header h1 { font-size: 1.8rem; }
    .form-section { padding: 15px; }
    .result-content,
    .calculation-content { padding: 20px; }
}

/* Print */
@media print {
    body { background: #ffffff; padding: 0; }
    .container { box-shadow: none; }
    .header { background: #2c3e50 !important; color: #ffffff !important; }
    .calculate-btn { display: none; }
}
