body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

header {
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.lang-select {
    width: 65px !important;
    min-width: 65px !important;
    max-width: 65px !important;
    flex-shrink: 0;
    padding: 4px 6px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #e9ecef;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}

#ui-title {
    margin: 0 0 16px 0;
    font-size: 0.95rem;        /* Размер шрифта в точности как у кнопки */
    font-weight: 700;
    line-height: 1.3;
    color: #1a252c;
    text-align: center;
    white-space: nowrap;       /* По умолчанию держит всю строку целиком */
    overflow: visible;         
}

/* При уменьшении ширины окна приложения (или экрана ниже 420px) разрешаем перенос строк */
@media (max-width: 420px) {
    #ui-title {
        white-space: normal;
        word-break: break-word;
    }
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    text-align: center;
}

select#queueSelect {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    margin-bottom: 15px;
    cursor: pointer;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;        /* Эталонный размер шрифта */
    font-weight: 600;
    color: #fff;
    background-color: #3498db;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

button:hover {
    background-color: #2980b9;
}

main {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

h2 {
    font-size: 1rem;
    color: #777;
    margin-bottom: 10px;
}

#statusDisplay {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.status-on {
    background-color: #d4edda;
    color: #155724;
}

.status-off {
    background-color: #f8d7da;
    color: #721c24;
}

.status-loading {
    background-color: #fff3cd;
    color: #856404;
}

#timerDisplay {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: monospace;
}

.timer-on {
    color: #27ae60;
}

.timer-off {
    color: #c0392b;
}

.timer-loading {
    color: #7f8c8d;
}

#nextChange {
    font-size: 0.85rem;
    color: #777;
    margin-top: 5px;
}