/* Переменные для удобства (Темная тема) */
:root {
    --primary-color: #00aaff; /* Яркий Telegram Blue */
    --secondary-color: #99a0a8;
    --accent-color: #4caf50; /* Зеленый для успеха/подчеркивания */
    --bg-color: #121212; /* Глубокий темный фон */
    --card-bg: #1e1e1e; /* Темно-серый фон карточек */
    --text-color: #e0e0e0; /* Светлый текст */
    --light-text-color: #a0a0a0; /* Софт-серый текст для подсказок */
    --border-color: #333333; /* Цвет рамки/разделителя */
    --error-color: #ff6b6b; /* Яркий цвет ошибки */
    --star-color: #FFD700; /* Gold for stars */#1c0c45
    --to-color: #1c0c45;
    

    --info-block-bg: #222f3e; /* Темный, слегка синий фон для info-block */
    --logo-accent-orange: #FFA500; /* Оранжевый цвет для части "Star" */
    --pay-button-hover-orange: #FF8C00; /* Темно-оранжевый для ховера */
    --advantages-bg-blue: #1a2a46; /* Глубокий темно-синий фон для преимуществ */

    --header-height: 80px;
    --container-width: 1200px;
    --border-radius-lg: 15px;
    --border-radius-md: 10px;
}

/* Общие стили и сброс */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
    .hero-section h1.accent-title-style {
    /* Синий цвет */
    color: var(--primary-color) !important; 
    
    /* Добавляем подчеркивание */
    text-decoration: underline; 
    
    /* Делаем жирным и наклонным, чтобы соответствовать "подчёркнутым шрифтом" */
    font-weight: 900; 
    font-style: italic; 
    
    /* Добавляем небольшое свечение для эффекта */
    text-shadow: 0 0 12px rgba(0, 170, 255, 0.6); 
}
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-2px);
    }
}
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}


.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-slide-up { animation: slideInUp 0.8s ease-out forwards; }
.animate-zoom-in { animation: zoomIn 0.8s ease-out forwards; }

.hero-section p.animate-slide-up { animation-delay: 0.3s; }
.hero-section .primary-btn.animate-zoom-in { animation-delay: 0.6s; }
.purchase-section-wrapper.animate-fade-in { animation-delay: 0.5s; }
.info-block.animate-slide-up { animation-delay: 0.7s; }


/* Прелоадер */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color); /* Темный фон прелоадера */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#preloader p {
    color: var(--text-color);
    font-size: 1.2em;
    font-weight: 600;
}


/* Header */
header {
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.logo-accent-color {
    color: var(--logo-accent-orange);
    white-space: nowrap;
}

.logo-star-gif {
    height: 24px;
    width: auto;
    vertical-align: middle;
}

#typedLogoPart {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary-color);
    font-size: 1em;
    vertical-align: middle;
    animation: 
        typing 1s steps(3, end) forwards,
        blink-caret 0.75s step-end infinite;
}

#typedLogoPart.typed::after {
    animation: none;
    border-color: transparent;
}


nav {
    display: flex;
    gap: 25px;
    margin: 0 auto;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.telegram-channel-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.3);
}

.telegram-channel-btn:hover {
    background-color: #0077c8;
    transform: translateY(-2px);
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* --- СТИЛИ ДЛЯ ПРОФИЛЯ ПОЛЬЗОВАТЕЛЯ В ШАПКЕ --- */
.user-profile-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-profile-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.profile-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.profile-username {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.05em;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* --- КОНЕЦ СТИЛЕЙ ДЛЯ ПРОФИЛЯ В ШАПКЕ --- */

/* --- НОВАЯ КНОПКА "Купить Stars" в шапке (десктопная) --- */
.header-buy-stars-btn {
    background-color: var(--primary-color) !important;
    color: var(--text-color);
    padding: 8px 18px !important;
    font-size: 1em !important;
    font-weight: 600;
    border-radius: var(--border-radius-md) !important;
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.4) !important;
    animation: bounce 2s infinite ease-in-out;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-buy-stars-btn:hover {
    background-color: #0077c8 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 170, 255, 0.6) !important;
    animation: none;
}

.header-buy-stars-btn .buy-stars-icon {
    height: 20px;
    width: auto;
    animation: starPulse 1.5s infinite ease-in-out;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}
/* --- КОНЕЦ СТИЛЕЙ КНОПКИ В ШАПКЕ --- */

/* --- НОВАЯ КНОПКА "Купить Stars" для мобильного меню --- */
.main-buy-stars-btn-mobile {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.3);
    text-decoration: none;
    width: fit-content;
    margin: 0 auto;
    display: block;
    text-align: center;
}

.main-buy-stars-btn-mobile:hover {
    background-color: #0077c8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 170, 255, 0.4);
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #000000 0%, var(--to-color) 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Анимированные ЗВЕЗДЫ вместо кружков */
    opacity: 0.5;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

.hero-section h1 {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: 700;
    opacity: 0;
    color: #fff; /* Убедитесь, что основной цвет - белый/светлый */
}

/* СТИЛИ ДЛЯ ВЫДЕЛЕНИЯ ФРАЗЫ "Telegram Stars" */
.hero-section h1 .highlight {
    /* Синий цвет */
    color: var(--primary-color); 
    
    /* Подчеркивание */
    text-decoration: underline; 
    
    /* Жирный, курсивный шрифт (как вы просили ранее для акцента) */
    font-weight: 900; 
    font-style: italic; 
    
    /* Эффект свечения */
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.7); 
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
}

.scroll-to-form {
    background-color: var(--primary-color) !important;
    border: none !important;
    padding: 15px 35px !important;
    font-size: 1.2em !important;
    opacity: 0;
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
    border-radius: var(--border-radius-lg) !important;
}

.scroll-to-form:hover {
    background-color: var(--primary-color) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

/* Purchase Section Wrapper */
.purchase-section-wrapper {
    padding: 40px 0;
    margin-bottom: 60px;
    opacity: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Info Block (Как это работает?) */
.info-block {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    background-color: var(--info-block-bg);
    color: var(--text-color);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.info-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.info-block h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: left;
    font-weight: 700;
}

.how-it-works-steps {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 0;
    margin-bottom: 30px;
}

.how-it-works-steps::before {
    content: '';
    position: absolute;
    left: 48px;
    top: 55px;
    bottom: 55px;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}
.step-item:last-child {
    margin-bottom: 0;
}

.ton-discount-container {
    margin: 15px 0 15px; /* Немного отступа */
    text-align: center;
}

/* Метка скидки */
.ton-discount-label {
    /* Стиль TON/Telegram, очень заметный */
    background: linear-gradient(135deg, #00AFFF 0%, #204C79 100%);
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--border-radius-lg); /* Более закругленный вид */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 170, 255, 0.6);
    animation: pulse 1.5s infinite ease-in-out; 
    transition: all 0.3s ease;
}

.ton-discount-label:hover {
    transform: scale(1.02);
}

.ton-discount-label .ton-percent {
    /* Стиль для -3% TON */
    background-color: var(--star-color); 
    color: #121212; 
    padding: 2px 8px;
    border-radius: var(--border-radius-md);
    font-size: 1.1em;
    font-weight: 900;
}

.ton-discount-marker {
    position: absolute;
    top: -15px; /* Поднимаем над переключателем */
    right: 5px; /* Позиционируем над TON (правая сторона) */
    transform: translateX(0); /* Сдвигаем влево, чтобы центрировать над кнопкой TON */
    
    /* Стилизация метки */
    background: linear-gradient(135deg, #00AFFF 0%, #26A69A 100%);
    color: #121212; 
    font-size: 0.85em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px; /* Аккуратное закругление */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    white-space: nowrap;
}

/* Общий контейнер для сегментированного переключателя */
.payment-method-switch {
    background-color: var(--bg-color); 
    padding: 8px;
    border-radius: var(--border-radius-lg);
    display: flex;
    gap: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5); 
    border: 1px solid var(--border-color);
    position: relative; /* Важно для позиционирования скидки */
}

.switch-input {
    /* Скрываем нативные радио-кнопки */
    display: none;
}

.switch-label {
    flex-grow: 1;
    text-align: center;
    padding: 12px 10px;
    border-radius: var(--border-radius-lg);
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    color: var(--light-text-color);
    transition: all 0.3s ease;
    user-select: none;
}

/* Активное состояние переключателя */
.switch-input:checked + .switch-label {
    background-color: var(--card-bg); /* Цвет активной кнопки */
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.05);
}

/* Ховер эффект для неактивных кнопок */
.switch-label:not(.switch-input:checked + .switch-label):hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- Стили для кнопки Оплаты --- */

/* Базовый стиль кнопки (RUB/WATA) */
.primary-btn.pay-method-rub {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
}
.primary-btn.pay-method-rub:hover {
    background-color: #0077c8;
}

/* Стиль кнопки для TON */
.primary-btn.pay-method-ton {
    /* Градиент в стиле TON/криптовалюты */
    background: linear-gradient(90deg, #37474F 0%, #26A69A 100%);
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.5);
    border: 1px solid #26A69A;
}

.primary-btn.pay-method-ton:hover {
    background: linear-gradient(90deg, #26A69A 0%, #37474F 100%);
}

@media (max-width: 450px) {
    .payment-method-switch {
        flex-direction: column;
    }
    .switch-label {
        width: 100%;
    }
    
    .ton-discount-marker {
        top: 60px; /* Опускаем, чтобы он был над кнопкой TON во втором ряду */
        right: 50%;
        transform: translateX(50%); /* Центрируем над кнопкой TON */
    }
}
.step-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-md);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-right: 20px;
    position: relative;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.step-icon svg {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

.step-content h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    text-align: left;
}

.step-content p {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin: 0;
    text-align: left;
}

.auth-text {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-top: 30px;
    text-align: center;
    margin-bottom: 20px;
}

/* Telegram Login Widget Container */
#telegram-login-widget-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
#telegram-login-widget-container iframe {
    border: none;
}


/* Card (Purchase Form) */
.card {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.purchase-form-card {
    flex: 1;
    min-width: 350px;
    max-width: 550px;
}

.purchase-form-card:hover {
    transform: translateY(-5px);
}

.purchase-form-card h2 {
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

.input-group {
    margin-bottom: 25px;
}

.username-label-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.input-group label {
    font-weight: 600;
    font-size: 1.1em;
    white-space: nowrap;
}

.info-toggle {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.info-toggle:hover {
    background-color: #0077c8;
    transform: scale(1.1);
}

.spoiler-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, padding 0.4s ease-out;
    margin-top: 10px;
    background-color: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.4);
    border-radius: var(--border-radius-md);
    padding: 0 15px;
}

.spoiler-container.show {
    max-height: 120px;
    opacity: 1;
    padding: 15px;
}

.spoiler-content {
    font-size: 0.9em;
    color: var(--text-color);
    line-height: 1.4;
    margin: 0;
}

.spoiler-content .warning-text {
    color: var(--error-color);
    font-weight: 600;
}


.input-group input[type="text"],
.input-group input[type="number"] {
    width: 100%;
    padding: 14px 18px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    font-size: 1em;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.strong-text {
    font-weight: 700;
}

.input-group input[type="text"]::placeholder,
.input-group input[type="number"]::placeholder {
    color: var(--light-text-color);
}

.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.2);
}

.input-hint {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-top: 8px;
    line-height: 1.4;
}


/* Quantity Options */
.quantity-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
}

.quantity-btn img {
    height: 18px;
    width: auto;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

.quantity-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 15px 10px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.quantity-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

.quantity-btn.selected {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.4);
    transform: translateY(-2px);
    animation: pulse 1s infinite ease-in-out;
}
.quantity-btn.selected img {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

.frequent-choice {
    position: relative;
    background-color: #3e2723; /* Темный оранжевый фон */
    border-color: #FFC107;
}

.frequent-choice.selected {
    background-color: #FFC107;
    border-color: #FFC107;
    color: #1e1e1e; /* Темный текст на золоте */
}
.frequent-choice.selected img {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}


.frequent-choice span {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.75em;
    padding: 4px 8px;
    border-radius: var(--border-radius-md);
    white-space: nowrap;
    transform: rotate(5deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Скрытые кнопки количества */
.hidden-quantities {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    gap: inherit;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.hidden-quantities.show {
    max-height: 300px;
    opacity: 1;
}

.show-more-btn {
    grid-column: 1 / -1;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 10px 15px;
    font-size: 1em;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.3);
}


/* Изменения для кнопки Оплатить */
.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 15px 25px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
}

/* Стилизация текста цены внутри кнопки */
#pay-button-price {
    font-weight: 700;
}

/* Иконка СБП внутри кнопки */
.primary-btn img {
    height: 28px;
    width: auto;
}

.primary-btn:hover {
    background-color: var(--pay-button-hover-orange);
    box-shadow: 0 6px 15px rgba(0, 102, 255, 0.5);
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: auto;
    font-size: 0.9em;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    animation: slideInUp 0.4s ease-out;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8em;
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 1.1em;
    text-align: center;
    color: var(--text-color);
}

.modal-star-icon {
    height: 24px;
    vertical-align: middle;
    margin-left: 5px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.modal-content .primary-btn {
    margin-top: 25px;
    font-size: 1.1em;
    border-radius: var(--border-radius-lg);
    color: var(--text-color);
}

.modal-content .warning {
    color: var(--error-color);
    font-size: 0.95em;
    font-weight: 500;
    margin-top: 20px;
    padding: 10px;
    border: 1px solid var(--error-color);
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: var(--border-radius-md);
}

.modal-content .close-modal-btn {
    background-color: var(--accent-color);
}
.modal-content .close-modal-btn:hover {
    background-color: #388e3c;
}

.close-btn {
    color: var(--light-text-color);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--error-color);
    text-decoration: none;
}


/* --- НОВЫЕ СЕКЦИИ: Наши преимущества и Отзывы клиентов --- */

.section-container-outer {
    padding: 60px 0;
    background-color: var(--bg-color);
    text-align: center;
}

.advantages-wrapper {
    background-color: var(--advantages-bg-blue);
    border-radius: var(--border-radius-lg);
    padding: 50px 20px;
    margin: 0 auto;
    max-width: var(--container-width);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.advantages-wrapper .section-title,
.reviews-section .section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.advantages-wrapper .section-title::after,
.reviews-section .section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--logo-accent-orange);
    border-radius: 2px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.advantage-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.advantage-card .advantage-title {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advantage-card .advantage-title .emoji {
    font-size: 1.2em;
    line-height: 1;
    flex-shrink: 0;
}

.advantage-card .advantage-description {
    font-size: 1em;
    color: var(--light-text-color);
    line-height: 1.5;
}

/* Секция Отзывов */
.reviews-section {
    background-color: var(--info-block-bg);
    padding: 60px 0;
    text-align: center;
}

.reviews-content {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin: 0 auto;
}

.reviews-content p {
    font-size: 1.1em;
    color: var(--light-text-color);
}


/* --- Адаптивность --- */
/* Mobile Logout Button (для бургер-меню) */
.logout-button-mobile {
    background-color: var(--error-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.3);
    margin-top: 15px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: block;
    text-decoration: none;
}

.logout-button-mobile:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* === НОВЫЕ КЛАССЫ ДЛЯ УПРАВЛЕНИЯ ВИДИМОСТЬЮ ЧЕРЕЗ JS === */
.logo.hidden-by-js {
    display: none !important;
}
.user-profile-box.visible-by-js {
    display: flex !important;
}
.user-profile-box.hidden-by-js {
    display: none !important;
}
.logo-wrapper.hidden-by-js {
    display: none !important;
}

/* --- Класс для скрытия элементов по JS --- */
.hidden {
    display: none !important;
}
/* === КОНЕЦ НОВЫХ КЛАССОВ === */


@media (max-width: 992px) {
    header .container {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
    }

    .logo-wrapper {
        flex-shrink: 0;
        margin-right: auto;
        gap: 10px;
        justify-content: flex-start;
        flex-grow: 1;
    }
    
    header .telegram-channel-btn {
        display: none !important;
    }

    header nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
        padding: 20px 0;
        gap: 10px;
        z-index: 999;
        text-align: center;
        align-items: center;
    }

    header nav.active {
        display: flex;
    }

    header nav.active .nav-link,
    header nav.active .telegram-channel-btn-mobile,
    header nav.active #profile-btn-mobile,
    header nav.active #mobile-logout-btn,
    header nav.active .main-buy-stars-btn-mobile {
        width: fit-content;
        margin: 0 auto;
        padding: 10px 15px;
        border-radius: var(--border-radius-md);
        text-align: center;
        display: block;
    }

    header nav.active .telegram-channel-btn-mobile {
        background-color: var(--primary-color);
        color: #fff;
        margin-top: 15px;
        text-decoration: none;
    }
    header nav.active .telegram-channel-btn-mobile:hover {
        background-color: #0077c8;
    }

    header nav.active #profile-btn-mobile {
        margin-top: 10px;
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
    }
    header nav.active #profile-btn-mobile:hover {
        background-color: var(--primary-color);
        color: var(--text-color);
    }

    header nav.active #mobile-logout-btn {
        margin-top: 10px;
        background-color: var(--error-color);
        color: #fff;
        border: none;
        box-shadow: 0 2px 5px rgba(255, 107, 107, 0.3);
    }
    header nav.active #mobile-logout-btn:hover {
        background-color: #c82333;
    }
    
    header nav.active .main-buy-stars-btn-mobile {
        background-color: var(--primary-color);
        color: var(--text-color);
        margin-top: 10px;
        text-decoration: none;
    }
    header nav.active .main-buy-stars-btn-mobile:hover {
        background-color: #0077c8;
    }


    .burger-menu {
        display: flex;
        order: 4;
        margin-left: auto;
        flex-shrink: 0;
    }

    .header-buy-stars-btn {
        padding: 6px 14px !important;
        font-size: 0.9em !important;
        gap: 3px;
        margin-right: 10px;
        order: 2;
    }
    .header-buy-stars-btn .buy-stars-icon {
        height: 18px;
    }
    
    .user-profile-box {
        order: 3;
        margin-left: auto;
    }

    .hero-section h1 { font-size: 2.5em; }
    .hero-section p { font-size: 1.1em; }

    .purchase-section-wrapper {
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
    }
    .purchase-form-card { order: 1; margin-bottom: 30px; }
    .info-block { order: 2; }

    .info-block, .purchase-form-card {
        max-width: 90%;
        width: 100%;
    }

    .quantity-options {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .how-it-works-steps::before {
        left: 38px;
        top: 40px;
        bottom: 40px;
    }
    .step-icon {
        width: 60px;
        height: 60px;
        margin-right: 15px;
    }
    .step-icon svg {
        width: 30px;
        height: 30px;
    }
    .logo-star-gif {
        height: 20px;
    }

    .advantages-wrapper {
        margin: 0 20px;
        padding: 40px 20px;
    }
    .advantages-wrapper .section-title,
    .reviews-section .section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .advantages-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
    .advantage-card {
        padding: 25px;
    }
    .advantage-card .advantage-title {
        font-size: 1.2em;
    }
    .advantage-card .advantage-title .emoji {
        font-size: 1em;
    }
    .advantage-card .advantage-description {
        font-size: 0.9em;
    }
    .reviews-section { padding: 40px 0; }
    .reviews-content { padding: 30px; }
    .reviews-content p { font-size: 1em; }
}

@media (max-width: 768px) {
    .logo { font-size: 1.6em; }
    .logo-star-gif { height: 18px; }

    .user-profile-box {
        padding: 6px 12px;
        gap: 8px;
    }
    .profile-avatar {
        width: 30px;
        height: 30px;
    }
    .profile-username {
        font-size: 0.95em;
        max-width: 90px;
    }

    .hero-section {
        padding: 60px 20px;
    }
    .hero-section h1 { font-size: 2em; }
    .hero-section p { font-size: 1em; }

    .purchase-section-wrapper {
        padding: 20px 0;
    }
    .info-block, .purchase-form-card {
        padding: 25px;
    }
    .info-block h2, .purchase-form-card h2 { font-size: 1.3em; margin-bottom: 20px; }
    .info-block p { font-size: 1em; }

    .input-group label { font-size: 1em; }
    .input-group input { padding: 12px 15px; font-size: 0.95em; }
    .input-hint { font-size: 0.85em; }

    .quantity-options {
        grid-template-columns: 1fr;
    }
    .quantity-btn { padding: 12px 10px; font-size: 1em; }

    .primary-btn { font-size: 1.1em; padding: 13px 20px; }
    .primary-btn img {
        height: 25px;
    }
    .modal-content { padding: 20px; }
    .modal-content h2 { font-size: 1.3em; }
    .modal-content p { font-size: 0.9em; }
    .close-btn { font-size: 25px; top: 10px; right: 15px; }

    .advantages-wrapper {
        padding: 30px 15px;
        margin: 0 15px;
    }
    .advantages-wrapper .section-title,
    .reviews-section .section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    .advantage-card {
        padding: 20px;
    }
    .advantage-card .advantage-title {
        font-size: 1.1em;
    }
    .advantage-card .advantage-title .emoji {
        font-size: 1em;
    }
    .advantage-card .advantage-description {
        font-size: 0.85em;
    }
    .reviews-section { padding: 40px 0; }
    .reviews-content { padding: 25px; }
    .reviews-content p { font-size: 0.9em; }

    /* Профиль - мобильная адаптация */
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .detail-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .profile-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    .header-buy-stars-btn {
        padding: 4px 10px !important;
        font-size: 0.8em !important;
        margin-right: 5px;
    }
    .header-buy-stars-btn .buy-stars-icon {
        height: 16px;
    }

    .profile-info-block,
    .profile-actions-block {
        padding: 20px;
    }
    .premium-badge {
        font-size: 0.7em;
        padding: 3px 6px;
    }
    .history-title {
        font-size: 1.6em;
    }
    .history-item {
        font-size: 0.85em;
    }
}

/* --- Стили для страницы профиля (profile.html) --- */

.profile-section {
    padding: 60px 0;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-title {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.profile-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--logo-accent-orange);
    border-radius: 2px;
}

.profile-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin-top: 30px;
    align-items: flex-start;
    transition: all 0.3s ease-in-out;
}


.profile-info-block,
.profile-actions-block {
    flex: 1 1 450px;
    max-width: 500px;
    margin-bottom: 0;
    padding: 40px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
}

.profile-info-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.avatar-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.premium-badge {
    position: static;
    bottom: unset;
    right: unset;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: -10px;
}

.premium-badge-inactive {
    background-color: #444;
    color: var(--light-text-color);
    border: 1px solid #5a6268;
}

.premium-badge-active {
    background-color: var(--star-color);
    color: #121212;
    border: 1px solid #e0b400;
}

.premium-badge .premium-status-note {
    font-size: 0.8em;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 5px;
}

.user-details {
    width: 100%;
    max-width: 400px;
    text-align: left;
    margin-top: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--light-text-color);
    margin-right: 15px;
    flex-shrink: 0;
}

.detail-value {
    font-weight: 700;
    color: var(--text-color);
    word-break: break-word;
    text-align: right;
}

.profile-actions-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    padding: 15px 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
    transition: all 0.3s ease;
    color: var(--text-color);
}
.action-btn svg {
    margin-right: 10px;
    height: 24px;
    width: 24px;
    fill: var(--text-color);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 170, 255, 0.5);
}

.action-btn.logout-btn {
    background-color: var(--error-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}
.action-btn.logout-btn svg {
    fill: #fff;
}

.action-btn.logout-btn:hover {
    background-color: #c82333;
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.5);
}

/* --- Стили для Истории покупок --- */
.profile-history-section {
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    width: 100%;
    margin-top: 30px;
}

.history-title {
    margin-bottom: 30px;
    font-size: 2.2em;
}

.history-title::after {
    width: 70px;
}

.back-to-profile-btn {
    max-width: 300px;
    margin-bottom: 30px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(153, 160, 168, 0.2);
}
.back-to-profile-btn:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 15px rgba(153, 160, 168, 0.3);
}
.back-to-profile-btn svg {
    transform: rotate(180deg);
    fill: var(--text-color);
}

.history-list {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--card-bg);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: var(--border-radius-md);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 0.95em;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item-date {
    font-weight: 600;
    color: var(--light-text-color);
    flex-basis: 100%;
    text-align: left;
    order: 1;
}

.history-item-details {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    order: 2;
}

.history-item-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--primary-color);
}

.star-icon-small {
    height: 18px;
    width: auto;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.history-item-target {
    color: var(--text-color);
    font-weight: 500;
}

.history-item-status {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--border-radius-md);
    white-space: nowrap;
    order: 3;
}

.status-completed .history-item-status {
    background-color: rgba(76, 175, 80, 0.15);
    color: var(--accent-color);
}

.status-failed .history-item-status {
    background-color: rgba(255, 107, 107, 0.15);
    color: var(--error-color);
}

.no-history-message {
    text-align: center;
    font-size: 1.1em;
    color: var(--light-text-color);
    margin-top: 30px;
    background-color: var(--info-block-bg);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* НОВЫЕ СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ В HEADER */
#adminPanelLink {
    color: var(--accent-color);
    font-weight: 700;
}

#adminPanelLink:hover::after {
    background-color: var(--accent-color);
}

/* Стили для мобильной кнопки админ-панели */
header nav.active #admin-btn-mobile {
    margin-top: 10px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}
header nav.active #admin-btn-mobile:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* --- Стили для test-mode.html --- */
.test-mode-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--bg-color);
    padding: 20px;
}

.test-mode-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
}

.test-mode-card h1 {
    font-size: 2.5em;
    color: var(--error-color);
    margin-bottom: 20px;
}

.test-mode-card p {
    font-size: 1.1em;
    color: var(--text-color);
    margin-bottom: 30px;
}

.test-mode-card .primary-btn {
    width: auto;
    padding: 12px 25px;
    font-size: 1em;
}

.test-mode-card .primary-btn.logout-btn {
    background-color: var(--secondary-color);
}
.test-mode-card .primary-btn.logout-btn:hover {
    background-color: #5a6268;
}
.agreement-text {
    margin-top: 15px;
    font-size: 0.85em; /* Мелкий шрифт */
    color: var(--light-text-color); /* Светло-серый цвет */
    text-align: center;
    line-height: 1.4;
}

.agreement-link {
    color: var(--primary-color); /* Синий цвет для ссылок */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.agreement-link:hover {
    color: #0077c8;
    text-decoration: underline;
}

/* ================================================= */
/* РЕФЕРАЛЬНАЯ СИСТЕМА (МАКСИМАЛИСТИЧНЫЙ ДИЗАЙН) */
/* ================================================= */

/* Анимации для прогресса */
@keyframes glow-primary {
    0% { box-shadow: 0 0 5px var(--primary-color); }
    50% { box-shadow: 0 0 15px var(--primary-color), 0 0 20px rgba(0, 170, 255, 0.4); }
    100% { box-shadow: 0 0 5px var(--primary-color); }
}
@keyframes coin-pulse {
    0%, 100% { color: var(--star-color); text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { color: #FFFFAA; text-shadow: 0 0 10px var(--star-color); }
}

.referral-program-section {
    max-width: 1000px;
    width: 100%;
    margin-top: 30px;
    padding: 20px 0;
    text-align: center;
}

.profile-sub-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 30px 20px;
}

/* Кнопка "Реферальная программа" */
.referral-btn-color {
    background: linear-gradient(90deg, #0077c8 0%, var(--primary-color) 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.5) !important;
}

.referral-btn-color:hover {
    background: linear-gradient(90deg, var(--primary-color) 0%, #0077c8 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.7) !important;
}

/* Информация о CifCoin в профиле */
.accent-cifcoin {
    color: var(--primary-color); /* Голубой цвет для CifCoin */
    font-size: 1.1em;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.3);
}

/* Руководство по рефералам */
.referral-guide {
    width: 100%;
    padding: 25px;
    background-color: var(--card-bg);
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

.guide-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.guide-step .step-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 900;
    font-size: 1.5em;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.guide-step p {
    color: var(--light-text-color);
    font-size: 0.9em;
    margin: 0;
}

.referral-link-container {
    width: 100%;
    padding: 25px;
    background-color: var(--card-bg);
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

.link-label {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.link-copy-wrapper {
    display: flex;
    gap: 10px;
}

.referral-link-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: var(--border-radius-md);
    background-color: #262626; /* Более темный фон для инпута */
    color: var(--primary-color);
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.referral-link-input:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}

.copy-link-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    flex-shrink: 0;
}

.copy-link-btn:hover {
    background-color: #0077c8;
    transform: translateY(-1px);
}

.copy-link-btn svg {
    margin-right: 0;
    fill: none;
}

/* --- Прогресс Бар (Максималистичный Дизайн) --- */
.progress-bar-wrapper {
    width: 100%;
    padding: 40px 30px;
    position: relative;
}

.referral-count-label {
    font-size: 2.2em;
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 30px;
}

.referral-count-label span {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color);
}

.referral-progress-tracker {
    position: relative;
    height: 70px;
    margin-top: 30px;
}

/* 1. Основная линия (контейнер) */
.progress-line-container {
    position: absolute;
    width: 100%;
    height: 15px; /* Увеличиваем толщину линии */
    background-color: #444; 
    border-radius: 8px; /* Немного больше закругление */
    top: 30px; 
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 1.1. Заполнение линии */
.progress-line-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 8px;
    /* ... (оставляем анимации и тени) ... */
}


/* 2. Контейнер меток и точек */
.milestones-labels-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
}

/* Отдельная точка достижения */
.milestone {
    position: absolute;
    text-align: center;
    transform: translateX(-50%); 
    height: 100%;
    transition: all 0.5s;
}

/* 2.1. Метка Награды CC (Сверху) */
.milestone-reward {
    font-size: 14px;
    color: var(--star-color); 
    font-weight: 700;
    position: absolute;
    top: 0; 
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    animation: coin-pulse 3s infinite;
}

/* 2.2. Сама Точка на линии */
.milestone-dot {
    position: absolute;
    top: 30px; /* Корректируем, чтобы точка была ровно по центру новой толстой линии */
    width: 14px; /* Чуть увеличим точки */
    height: 14px;
    background-color: #777;
    border-radius: 50%;
    transition: all 0.3s;
    border: 3px solid var(--card-bg); 
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    left: 50%;
    transform: translateX(-50%);
}

.milestone.achieved .milestone-dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    transform: translateX(-50%) scale(1.4);
}
.milestone.achieved .milestone-reward {
    animation: none; 
    color: #FFFFAA;
    text-shadow: 0 0 10px var(--star-color);
}

/* 2.3. Метка Цели (Снизу) */
.milestone-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--light-text-color);
    position: absolute;
    top: 45px; 
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* 3. Метка текущего прогресса (текст над баром) */
.progress-label-overlay {
    position: absolute;
    width: 100%;
    text-align: left;
    top: 5px; 
    left: 0;
    pointer-events: none;
    font-weight: 700;
}
.progress-label-overlay span {
    background: var(--card-bg); 
    padding: 0 5px;
    font-size: 1.1em;
    color: var(--text-color);
    position: absolute;
    left: 0;
    transform: translateX(0);
}

.milestone-tip {
    font-size: 1em;
    color: var(--light-text-color);
    margin-top: 30px;
}

/* Адаптивность для прогресс-бара */
@media (max-width: 600px) {
    .progress-bar-wrapper {
        padding: 30px 15px;
    }
    .referral-count-label {
        font-size: 1.8em;
    }
    .milestone-reward {
        font-size: 12px;
        top: 0px;
    }
    .milestone-label {
        font-size: 11px;
        top: 40px;
    }
    .progress-label-overlay span {
        font-size: 0.9em;
    }
    .progress-line-container, .milestone-dot {
        top: 35px; /* Корректировка центра линии при уменьшении */
    }
}