:root {
    --primary-color: #872326;
    --accent-color: #ff0000;
    --background-color: #f0f0f0;
    --text-color: #000000;
    --secondary-background: #fff;
    --card-background: #f0f0f0;
    --modal-background: rgba(0, 0, 0, 0.7);
    --modal-content-background: #fff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --border-color: #000;
    --hover-background: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow: auto;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.user-dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--primary-color);
    padding: 20px;
    position: relative;
    z-index: 1;
    color: var(--text-color);
    border: solid var(--border-color) 1px;
}

.logo {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
    color: var(--background-color);
}

.mobile-app-logo {
    display: none;
}

.menu {
    list-style: none;
    padding: 0;
}

.menu li {
    margin: 15px 0;
}

.menu a {
    color: var(--background-color);
    text-decoration: none;
    padding: 10px;
    display: flex;
    align-items: center;
    border-radius: 5px;
    transition: background 0.3s;
}

.menu a:hover {
    background-color: var(--hover-background);
       color: var(--text-color);
}

.menu .active a {
    background-color: var(--accent-color);
}

.menu a i {
    margin-right: 10px;
}

.main-content {
    flex-grow: 1;
    padding: 0;
    background-color: var(--secondary-background);
}

.profile-header {
    height: 25vh;
    color: var(--background-color);
    background-size: cover;
    background-position: center;
    position: relative;
    width: 100%;
    top: 0;
    z-index: 0;
}

.profile-card {
    background-color: var(--background-color);
    margin: 10px 20px;
    padding: 20px;
    top: -5vh;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: relative;
    display: flex;
    align-items: center;
}

.avatar {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    border: 3px solid var(--primary-color);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    overflow:hidden;
}

.profile-details {
    margin-left: 100px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px;
}

.card {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 5px;
}

.footer {
    display: none;
}

.footer-menu {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--text-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: unset !important;
}

.footer-menu a {
    color: var(--background-color);
    text-decoration: none;
    text-align: center;
}

.footer-menu span {
    color: var(--background-color);
    text-decoration: none;
    text-align: center;
    font-size: 12px;
    line-height: 1.6em;
}

.footer-menu .circle-button {
    background-color: var(--accent-color);
    color: var(--background-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    cursor: pointer;
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 99;
}

.footer-menu .circle-button span {
    display: block;
    font-size: 0.7em;
    margin-top: 5px;
}

.scrollable {
    overflow: auto;
    max-height: 100vh;
}

@media (max-width: 768px) {
    .user-dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: absolute;
        bottom: 0;
        display: none;
        flex-direction: column;
        align-items: center;
    }

    .footer {
        display: flex;
        position: fixed;
        bottom: 0;
    }

    .footer-menu .circle-button i {
        font-size: 2em;
    }

    .profile-stats {
        grid-template-columns: 1fr;
        margin: 10px;
    }

    .right-buttons {
        width: 50%;
        right: 0;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        padding-left: 5%;
    }
    .left-buttons {
        width: 50%;
        left: 0;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        padding-right: 5%;
    }

    .buttons {
        width: 100%;
        left: 0;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
    }

    .buttons span {
        font-size: 0.8em;
    }

    .workout-card {
        background-color: var(--card-background);
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 2px 5px var(--shadow-color);
        min-height: 25vh;
        position: relative;
    }

    .index-number {
        font-weight: bold;
        font-size: 5em;
        position: absolute;
        top: 0px;
        right: 5px;
        opacity: 0.3;
    }

    .equipment-tag {
        display: inline-block;
        position: relative;
        background-color: var(--card-background);
        padding: 5px 10px;
        border-radius: 4px;
        margin: 2px;
        font-size: 14px;
    }

    .mobile-app-logo {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 5vh;
        width: 40%;
        margin: 0;
        background-color: var(--background-color);
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
        padding: 3px 0;
        position: fixed;
        top: var(--tg-safe-area-inset-top);
        z-index: 9;
        box-shadow: 0 2px 5px var(--shadow-color);
    }

    .mobile-logo-container {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .mobile-app-logo img {
        max-height: 100%;
        width: auto;
    }
}

/* Стили для спиннера */
.spinner {
    border: 8px solid var(--secondary-background);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Модальное окно */
#paymentModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--modal-content-background);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.container {
    background-color: var(--background-color);
    border-radius: 0.625rem;
    padding: 1.25rem;
    box-shadow: 0 0.25rem 0.5rem var(--shadow-color);
    display: flex;
    flex-direction: column;
    max-width:900px;
}

.tariff-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.tariff-card {
    background-color: var(--card-background);
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 0.5rem var(--shadow-color);
    padding: 0.625rem;
    flex: 1 1 30%;
    margin: 0.625rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tariff-card input {
    display: none;
}

.tariff-card label {
    display: block;
    margin: 0.625rem 0;
    padding: 0.625rem;
    border-radius: 0.625rem;
    border: 0.125rem solid transparent;
    transition: border-color 0.2s;
    flex-grow: 1;
}

.tariff-card input:checked + label {
    border-color: var(--accent-color);
    background-color: var(--secondary-background);
}

.benefits {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 0.625rem 0;
}

.benefits li {
    display: flex;
    align-items: center;
    margin: 0.3125rem 0;
}

.benefits .checkmark {
    color: #4CAF50;
    margin-right: 0.625rem;
}

.benefits .cross {
    color: var(--accent-color);
    margin-right: 0.625rem;
}

button {
    background-color: var(--accent-color);
    /*color: var(--background-color);*/
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.3125rem;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1.25rem;
}

button:hover {
    background-color: rgba(255, 0, 0, 0.8);
}

.link {
    display: block;
    margin-top: 0.625rem;
    color: var(--accent-color);
    text-decoration: none;
    text-align: center;
}

.agreement-container {
    margin-top: 1rem;
}

.agreement {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.conditional-agreement {
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.small-text {
    font-size: 0.75rem;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .tariff-card {
        flex: 1 1 100%;
        margin: 0.3125rem 0;
        padding: 0.625rem;
    }

    .tariff-card label h2 {
        font-size: 1.5rem;
    }

    .tariff-card .price {
        font-size: 1.3rem;
    }

    .tariff-card .time {
        font-size: 0.8rem;
    }

    .tariff-card label p {
        font-size: 0.8rem;
    }

    .benefits li {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    button {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    .hamburger-menu {
        visibility: visible !important;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.hamburger-menu {
    position: fixed;
    top: 0;
    left: 10px;
    z-index: 1000;
    visibility: hidden;
}

/* Кнопка гамбургера */
.menu__btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 30px;
    background-color: transparent; /* Светло-серый фон */
    border: none;
    border-radius: 8px; /* Закругленные углы */
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    cursor: pointer;
    padding: 7px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.menu__btn:hover {
    background-color: transparent; /* Изменение цвета при наведении */
    /*box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2); */
}

.menu__btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: black; /* Цвет полосок */
    border-radius: 2px; /* Закругленные углы у полосок */
    border: 0.1px solid black;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: -1px -2px 3px 0px rgb(255 255 255 / 62%);
}

/* Анимация кнопки при открытии */
.menu__btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu__btn.open span:nth-child(2) {
    opacity: 0;
}

.menu__btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Меню */
.menu__box {
    position: fixed;
    top: 0;
    left: -300px; /* Меню скрыто слева */
    width: 250px;
    height: 100%;
    margin: 0;
    padding: 30px 0;
    list-style: none;
    background-color: #f0f0f0; /* Светло-серый фон */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); /* Тень */
    transition: left 0.3s;
}

.menu__box.open {
    left: 0; /* Меню открывается */
}

.menu__item {
    display: block;
    padding: 12px 24px;
    color: #333;
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s;
}

.menu__item:hover {
    background-color: #ddd; /* Эффект при наведении */
}
