/* ==========================================
   HEALTH.CSS
   ========================================== */
.health-main {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    min-height: calc(100vh - 180px);
}

/* Allow scrolling if content exceeds viewport */


.health-main .input-card {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.health-main .results-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.fade-in {
    opacity: 1;
    transform: scale(1);
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    /* Redukováno z 3.5rem pro úsporu místa */
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    background: rgba(16, 185, 129, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-align: center;
    width: 100%;
}

.intro-emoji {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.intro-text {
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.upload-area span:first-child {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
}

.upload-area:hover {
    border-color: var(--color-primary);
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.btn-new-analysis {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-close-results {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: 0.2s;
    line-height: 1;
}

.btn-close-results:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: rotate(90deg);
}

@media (max-width: 600px) {
    .results-header h2 {
        font-size: 1.2rem;
    }

    .btn-new-analysis span {
        display: none;
    }

    .btn-new-analysis::after {
        content: '🔄';
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.results-card {
    animation: slideUpFade 0.6s ease-out;
    border-top: 5px solid var(--color-primary);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-error);
    color: #fca5a5;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    animation: shake 0.4s ease-in-out;
}

.btn-close-error {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}