﻿        /* Стили для кнопок с иконками */
        .icon-button {
            position: relative;
            width: 40px;
            height: 40px;
            min-width: 40px;
            min-height: 40px;
            flex-shrink: 0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--accent-info);
            background-color: var(--surface);
            border: 1px solid var(--border);
            cursor: pointer;
            transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
            font-size: 1rem;
        }

        /* При наведении меняем фон и цвет */
        .icon-button:hover {
            background-color: #e8f7f0;
            color: var(--accent-info-hover);
            border-color: #c8e4d8;
        }
        
        /* Всплывающая подсказка */
        .icon-button::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 125%; /* Расположить над кнопкой */
            left: 50%;
            transform: translateX(-50%);
            background-color: #6f7e8a;
            color: #fff;
            padding: 5px 10px;
            border-radius: 5px;
            white-space: nowrap;
            font-size: 0.85em;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 10;
        }
        
        /* Стрелочка подсказки */
        .icon-button::before {
            content: "";
            position: absolute;
            bottom: 90%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: #6f7e8a transparent transparent transparent;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 10;
        }
        
        /* Показываем подсказку при наведении */
        .icon-button:hover::after,
        .icon-button:hover::before {
            opacity: 1;
            pointer-events: auto;
        }
        
        /* Контейнер заголовка с крестиком */
        .header-with-close {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center; /* Заголовок по центру */
            gap: 10px;
            padding-right: 30px; /* Чтобы крестик не налезал на текст */
        }
        
        /* Кнопка крестика */
        .close-button {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1em;
            cursor: pointer;
            padding: 0;
            line-height: 1;
            transition: color 0.18s ease;
        }
        .close-button:hover {
            color: var(--text);
        }

        /* Универсальный крестик в углу модалки. Высокая специфичность,
           чтобы перекрыть .modal-content button { position:relative } и
           .modal-content--toast button { width:100%, height:48px }. */
        .modal-content .modal-close,
        .modal-content--toast .modal-close,
        .modal-content--toast.modal-content--confirm .modal-close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 32px;
            height: 32px;
            min-width: 32px;
            padding: 0;
            margin: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 1rem;
            border-radius: 8px;
            cursor: pointer;
            line-height: 1;
            transition: background-color 0.15s ease, color 0.15s ease;
            z-index: 2;
            box-shadow: none;
        }
        .modal-content .modal-close:hover,
        .modal-content--toast .modal-close:hover {
            background: rgba(15, 25, 40, 0.06);
            color: var(--text);
            transform: none;
        }
        /* Фиксированная ширина для login и register страниц */
        #login-page, #register-page {
            width: 385px;
            max-width: 100%;
            margin: 0 auto;
        }
        
        /* Кнопки растягиваются на всю ширину контейнера */
        #login-page button,
        #counter-page button,
        #register-page button {
            width: 100%;
            display: block;
            margin-bottom: 10px;
            height:48px;
        }
        
        .outlined-button {
            background-color: transparent;
            color: var(--accent-info);
            border: 1px solid var(--accent-info);
            border-radius: 10px;
            cursor: pointer;
            display: inline-block;
            text-align: center;
            font-weight: 600;
            padding: 10px 16px;
            transition: background-color 0.18s ease, color 0.18s ease;
        }

        .outlined-button:hover {
            background: var(--brand-grad);
            color: #fff;
        }

        .outlined-button.danger {
            color: var(--accent-danger);
            border-color: transparent;
            text-decoration: none;
            font-weight: 600;
            padding: 8px 12px;
        }
        .outlined-button.danger:hover {
            background-color: transparent;
            color: #d65160;
        }
        