:root {
    --primary-color: #4CAF50; /* Основной зеленый */
    --secondary-color: #388E3C; /* Темно-зеленый */
    --accent-color: #8BC34A; /* Светло-зеленый акцент */
    --light-color: #E8F5E9; /* Светло-зеленый фон */
    --dark-color: #1B5E20; /* Темно-зеленый текст */
    --success-color: #689F38; /* Зеленый успеха */
    --gradient: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    background-color: white;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
.header-wrapper {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-top-bar img {
    height: 40px;
    transition: var(--transition);
}

.header-top-bar img:hover {
    transform: scale(1.05);
}

.btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.header-mid-bar {
    padding: 0.8rem 5%;
}

.main-menu-ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-menu-ul a {
    text-decoration: none; /* Убираем стандартное подчеркивание ссылок */
}

.main-menu-li {
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.main-menu-li:hover {
    color: var(--primary-color);
}

.main-menu-li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.main-menu-li:hover::after {
    width: 100%;
}

.tournament-submenu-wrapper {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: inline-block; /* Делаем ширину по содержимому */
    min-width: 52px; /* Минимальная ширина */
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    border-radius: 0 0 8px 8px;
    margin-left: 72px;
}

.tournament-submenu {
    padding: 1rem;
    animation: fadeInDown 0.3s ease-out;
    white-space: nowrap; /* Запрещаем перенос текста */
}

.sub-menu-ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.sub-menu-ul a {
    text-decoration: none; /* Убираем стандартное подчеркивание ссылок */
}

.sub-menu-li {
    color: var(--dark-color);
    font-weight: 400;
    cursor: pointer;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    transition: var(--transition);
}

.sub-menu-li:hover {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.content {
    min-height: calc(100vh - 200px);
    padding: 2rem 5%;
    background: rgba(248, 249, 250, 0.98);
}

.footer-wrapper {
    background: linear-gradient(135deg, #2c3e50, #1a2533);
    color: white;
    padding: 2.5rem 5%;
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.qr-code {
    width: 120px;
    height: 120px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.05);
}

.qr-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
    max-width: 100px;
}

.footer-center {
    flex: 1;
    text-align: center;
    padding: 0 2rem;
}

.footer-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-description {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .qr-container {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        margin-bottom: 1.5rem;
    }

    .footer-center {
        padding: 0;
        order: -1;
        margin-bottom: 1.5rem;
    }
}

.tg-channel-img {
    height: 50px;
    transition: var(--transition);
    border-radius: 10px;
}

.tg-channel-img:hover {
    transform: translateY(-5px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .main-menu-ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .header-top-bar, .header-mid-bar, .tournament-submenu {
        padding: 1rem;
    }

    .sub-menu-ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}