/* Оновлений index.css */
body {
    margin: 0;
    padding: 0;
    font-family: 'KOLIBRI', Arial, sans-serif;
    background-color: #f5f5f5;
    overflow: hidden;
}

.main-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9f0 100%);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 128, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
}

.header-footer {
    padding: 15px 20px;
    display: flex;
   /* justify-content: space-around;*/
    justify-content: flex-end; /* Вирівнювання меню праворуч */
    background: rgba(0, 128, 0, 0.05);
    border-bottom: 1px solid rgba(0, 128, 0, 0.1);
    visibility: hidden;
}

.header-footer.visible {
    visibility: visible;
}

.header-footer button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    font-size: 14px;
    color: #2d5016;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.header-footer button:hover {
    background: rgba(0, 128, 0, 0.1);
    transform: translateY(-2px);
}

.menu-selector {
    position: relative;
    display: inline-block;
}

.menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    /*left: 0;*/
    right: 0; /* Вирівнювання випадаючого меню праворуч від кнопки меню */
    background-color: white;
    min-width: 160px;
    max-width: 200px;
    max-height: 250px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1001;
    padding: 10px 0;
    border: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 128, 0, 0.3) transparent;
}

.menu-dropdown::-webkit-scrollbar {
    width: 6px;
}

.menu-dropdown::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.menu-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(0, 128, 0, 0.3);
    border-radius: 3px;
}

.menu-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 128, 0, 0.5);
}

.menu-dropdown button {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 8px 20px;
    font-size: 14px;
    color: #333;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-dropdown button:hover {
    background: rgba(0, 128, 0, 0.1);
}

.menu-selector:hover .menu-dropdown {
    display: block;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    box-sizing: border-box;
    min-height: 0; /* Важливо для адаптивності */
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 8px rgba(0, 128, 0, 0.2));
}

h1 {
    color: #2e7d32;
    font-size: 28px;
    margin-bottom: 35px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-field {
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
}

.input-field input {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    border-radius: 4px;
}

.input-field input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.signin-btn {
    width: 100%;
    max-width: 320px;
    padding: 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    background-color: green;
    color: white;
}

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

.footer {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    flex-wrap: wrap;
    background: rgba(0, 128, 0, 0.05);
    border-top: 1px solid rgba(0, 128, 0, 0.1);
}

.footer button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 13px;
    color: #558b2f;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.footer button:hover {
    background: rgba(0, 128, 0, 0.1);
    color: #33691e;
}

.language-selector {
    position: relative;
    display: inline-block;
    
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
   /*  right: 0; Вирівнювання випадаючого меню праворуч від кнопки меню */
    transform: translateX(-50%);
    background-color: white;
    min-width: 160px;
    max-width: 200px;
    max-height: 250px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1001;
    padding: 10px 0;
    border: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 128, 0, 0.3) transparent;
}

.language-dropdown::-webkit-scrollbar {
    width: 6px;
}

.language-dropdown::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.language-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(0, 128, 0, 0.3);
    border-radius: 3px;
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 128, 0, 0.5);
}

.language-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 20px;
    font-size: 14px;
    color: #333;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.language-dropdown button:hover {
    background: rgba(0, 128, 0, 0.1);
}

.language-selector:hover .language-dropdown {
    display: block;
}

/* Стилі для скроллбара в Webkit-браузерах */
.language-dropdown::-webkit-scrollbar {
    width: 6px;
}

.language-dropdown::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.language-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(0, 128, 0, 0.3);
    border-radius: 3px;
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 128, 0, 0.5);
}

.language-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 20px;
    font-size: 14px;
    color: #333;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.language-dropdown button:hover {
    background: rgba(0, 128, 0, 0.1);
}

.language-selector:hover .language-dropdown {
    display: block;
}

/* Карточки що виводяться для USER */
.user-health-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.health-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #4CAF50;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.health-card.below-normal {
    border-left-color: #2196F3;
}

.health-card.normal {
    border-left-color: #4CAF50;
}

.health-card.above-normal {
    border-left-color: #F44336;
}

.health-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.health-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
    flex: 1;
    margin-right: 8px;
}

.health-card-reliability {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.health-card-value {
    font-size: 24px;
    font-weight: bold;
    margin: 8px 0;
    color: #333;
    text-align: center;
    flex-shrink: 0;
}

.health-card-units {
    font-size: 14px;
    color: #666;
    margin-left: 4px;
    font-weight: normal;
}

.health-card-norms {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: center;
    flex-shrink: 0;
}

.health-card-date {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
    flex-shrink: 0;
}

/* Для довших назв параметрів */
.health-card-title {
    word-wrap: break-word;
    hyphens: auto;
}

/* Адаптація для мобільних пристроїв */
@media (max-width: 768px) {
    .user-health-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .health-card {
        min-height: 110px;
        padding: 12px;
    }
    
    .health-card-value {
        font-size: 22px;
    }
}

/* Для дуже великих екранів - обмежуємо максимальну ширину */
@media (min-width: 1200px) {
    .user-health-summary {
        grid-template-columns: repeat(auto-fit, minmax(280px, 280px));
        justify-content: center;
    }
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 480px) {
    .language-dropdown,
    .menu-dropdown {
        min-width: 140px;
        max-width: 160px;
        max-height: 200px;
        padding: 8px 0;
    }
    
    .language-dropdown button,
    .menu-dropdown button {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    /* Для вертикальної орієнтації на мобільних */
    @media (max-height: 600px) {
        .language-dropdown,
        .menu-dropdown {
            max-height: 150px;
        }
    }
}

/* Для горизонтальної орієнтації на мобільних */
@media (max-height: 400px) and (orientation: landscape) {
    .language-dropdown,
    .menu-dropdown {
        max-height: 120px;
        min-width: 130px;
    }
    
    .language-dropdown button,
    .menu-dropdown button {
        padding: 5px 12px;
        font-size: 11px;
    }
}

/* Планшети */
@media (min-width: 768px) and (max-width: 1024px) {
    .language-dropdown,
    .menu-dropdown {
        min-width: 180px;
        max-width: 220px;
        max-height: 280px;
    }
    
    .language-dropdown button,
    .menu-dropdown button {
        padding: 10px 20px;
        font-size: 15px;
    }
}

/* Великі екрани */
@media (min-width: 1025px) {
    .language-dropdown,
    .menu-dropdown {
        min-width: 200px;
        max-width: 250px;
        max-height: 300px;
    }
    
    .language-dropdown button,
    .menu-dropdown button {
        padding: 10px 25px;
        font-size: 16px;
    }
}

/* Спеціальні адаптації для високих екранів */
@media (min-height: 800px) {
    .language-dropdown,
    .menu-dropdown {
        max-height: 350px;
    }
}

/* Адаптація для дуже малих екранів */
@media (max-width: 320px) {
    .language-dropdown,
    .menu-dropdown {
        min-width: 120px;
        max-width: 140px;
        max-height: 180px;
        padding: 5px 0;
    }
    
    .language-dropdown button,
    .menu-dropdown button {
        padding: 5px 12px;
        font-size: 11px;
    }
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 480px) {
    .content {
        padding: 20px 15px;
    }
    
    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .input-field {
        max-width: 280px;
        margin-bottom: 15px;
    }
    
    .input-field input {
        padding: 12px;
        font-size: 14px;
    }
    
    .signin-btn {
        max-width: 280px;
        padding: 14px;
        font-size: 14px;
    }
    
    .footer {
        padding: 12px 15px;
    }
    
    .footer button {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Для горизонтальної орієнтації */
@media (max-height: 500px) {
    .content {
        padding: 20px;
        justify-content: flex-start;
        overflow-y: auto;
    }
    
    .logo {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }
}

/* Планшети та більші екрани */
@media (min-width: 768px) {
    .content {
        padding: 40px;
    }
    
    .logo {
        width: 140px;
        height: 140px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .input-field {
        max-width: 360px;
    }
}

/* Анімації */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.language-dropdown button[selected],
.menu-dropdown button[selected] {
    font-weight: bold;
    background-color: #f0f0f0;
    border-left: 3px solid #9BC7A6;
}

.language-item-selected {
    font-weight: bold !important;
    background-color: rgba(76, 175, 80, 0.1) !important;
    color: #2e7d32 !important;
    border-left: 3px solid #4CAF50 !important;
}

.language-item-selected:hover {
    background-color: rgba(76, 175, 80, 0.2) !important;
}

