/* Базовые классы и анимации */
.hidden-page { display: none; }
.active-page { display: block; }
body { scroll-behavior: smooth; }

/* Эффект матового стекла (Святой Грааль этого дизайна) */
.glass { 
    background: rgba(24, 24, 27, 0.4); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-input { 
    background: rgba(0, 0, 0, 0.3); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    color: white; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}
.glass-input:focus { 
    border-color: #d946ef; 
    outline: none; 
    background: rgba(0, 0, 0, 0.5); 
    box-shadow: 0 0 15px rgba(217,70,239,0.2);
}

/* Бейджики */
/* Обновленный Бейджик */
.badge-new { 
    background: linear-gradient(90deg, #8b5cf6, #d946ef); 
    color: white; 
    font-size: 9px; 
    font-weight: 800; 
    padding: 2px 6px; 
    border-radius: 4px; 
    box-shadow: 0 0 10px rgba(217,70,239,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Неоновый градиентный ползунок (Для тарифа Ultra) */
.custom-slider-neon { 
    -webkit-appearance: none; 
    background: linear-gradient(90deg, rgba(139,92,246,0.3) 0%, rgba(217,70,239,0.3) 100%); 
    height: 6px; 
    border-radius: 3px;
    outline: none; 
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}
.custom-slider-neon::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    height: 20px; 
    width: 20px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #8b5cf6, #d946ef); 
    margin-top: -7px; 
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(217,70,239,0.8), inset 0 0 5px rgba(0,0,0,0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
}
.custom-slider-neon::-webkit-slider-thumb:hover { 
    transform: scale(1.25); 
    box-shadow: 0 0 25px rgba(217,70,239,1); 
}
.custom-slider-neon::-webkit-slider-runnable-track { 
    width: 100%; 
    height: 6px; 
    background: transparent; 
    border-radius: 3px; 
}

/* Неоновый тумблер Monthly/Annual */
.neon-toggle:checked + div {
    background: linear-gradient(90deg, #7c3aed, #d946ef) !important;
    border-color: rgba(217,70,239,0.5) !important;
    box-shadow: 0 0 15px rgba(217,70,239,0.5);
}
/* Эффекты при наведении */
.block-hover { transition: transform 0.3s ease, border-color 0.3s ease; }
.block-hover:hover { transform: translateY(-2px); border-color: rgba(217,70,239,0.3); }

/* Кастомный скроллбар */
/* Полное скрытие скроллбара для левой панели */
.hidden-scrollbar::-webkit-scrollbar { display: none; }
.hidden-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Radio Cards (Стеклянные карточки для форматов) */
.radio-card {
    background: rgba(24, 24, 27, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.radio-card:hover { border-color: rgba(217,70,239,0.4); transform: translateY(-2px); }
.radio-card.active {
    border-color: #d946ef;
    background: rgba(217,70,239,0.1);
    box-shadow: 0 0 20px rgba(217,70,239,0.2);
}

/* Кнопки выбора мощности (Tier) */
.tier-btn { border: 1px solid transparent; }
.tier-btn.active {
    background: linear-gradient(180deg, rgba(139,92,246,0.3) 0%, rgba(217,70,239,0.1) 100%);
    border: 1px solid rgba(217,70,239,0.5);
    box-shadow: 0 0 15px rgba(217,70,239,0.2);
}

/* Ползунки (Topaz AI Sliders) */
.custom-slider { -webkit-appearance: none; background: transparent; height: 4px; outline: none; }
.custom-slider::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    height: 16px; width: 16px; 
    border-radius: 50%; 
    background: white; 
    margin-top: -6px; 
    border: 2px solid #8b5cf6;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139,92,246,0.5);
    transition: transform 0.1s, box-shadow 0.2s;
}
.custom-slider::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 0 15px rgba(217,70,239,0.8); }
.custom-slider::-webkit-slider-runnable-track { width: 100%; height: 4px; background: #3f3f46; border-radius: 2px; }

/* Цветные ползунки для тарифов (Pink и Blue) */
.custom-slider-pink::-webkit-slider-thumb { border-color: #f43f5e; box-shadow: 0 0 10px rgba(244,63,94,0.5); }
.custom-slider-blue::-webkit-slider-thumb { border-color: #3b82f6; box-shadow: 0 0 10px rgba(59,130,246,0.5); }

/* ГЛАВНАЯ КНОПКА ГЕНЕРАЦИИ */
.forge-btn {
    background: linear-gradient(90deg, #7c3aed, #d946ef);
    box-shadow: 0 0 30px rgba(217,70,239,0.3);
}
.forge-btn:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(217,70,239,0.6); }
.forge-btn:active { transform: translateY(0); }

/* АНИМАЦИИ ПОЯВЛЕНИЯ (Staggered Fade-in) */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }

.animate-stagger-1 { animation: fadeInUp 0.5s ease forwards 0.1s; }
.animate-stagger-2 { animation: fadeInUp 0.5s ease forwards 0.2s; }
.animate-stagger-3 { animation: fadeInUp 0.5s ease forwards 0.3s; }
.animate-nav { animation: fadeInDown 0.5s ease-out forwards; animation-fill-mode: both !important; }

/* Анимация смены цены (Price Fade) */
.price-anim {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.price-fade-out {
    opacity: 0;
    transform: translateY(-5px);
}

@font-face {
    font-family: 'Bingdam';
    src: url('fonts/Bingbam.otf') format('opentype'); /* Исправлено тут */
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================
   ФИКС МЕРЦАНИЯ И РЫВКОВ ПРИ ЗАГРУЗКЕ
   ========================================== */

/* 1. Скрываем "голый" HTML на долю секунды, пока Tailwind CDN генерирует стили */
body {
    animation: smoothLoad 0.25s ease-out forwards;
}

@keyframes smoothLoad {
    0% { opacity: 0; }
    70% { opacity: 0; }
    100% { opacity: 1; }
}

/* 2. Заставляем элементы быть невидимыми ВО ВРЕМЯ задержки (delay), 
   чтобы они не появлялись до старта анимации */
[class*="animate-stagger"] {
    animation-fill-mode: both !important;
}

/* Кастомный скроллбар для списка моделей */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 70, 239, 0.4);
}

/* Эффект тяжелого стекла для панелей настроек */
.glass-heavy {
    background: rgba(15, 15, 18, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* ==========================================
   КАСТОМНАЯ ИКОНКА ТОКЕНА (Замена эмодзи)
   ========================================== */
.icon-token {
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2048 2048'%3E%3Cpath d='M 1494.35 201.814 C 1495.16 205.542 1473.77 250.106 1470.22 257.826 L 1422.77 361.371 L 1265.86 700.565 L 1222.38 793.233 C 1211.81 815.739 1198.97 839.01 1193.1 862.788 C 1182.92 904.048 1205.6 943.111 1245.08 957.203 C 1257.86 962.083 1271.3 963.948 1284.68 966.457 C 1372.03 982.844 1460.3 996.939 1547.46 1014.14 C 1484.71 1022.49 1417.81 1033.7 1355.09 1043.31 L 1272.55 1056.03 C 1229 1062.78 1202.16 1065.15 1160.89 1082.79 C 1124.57 1098.41 1091.71 1121.08 1064.21 1149.5 C 1048.52 1165.74 1030.74 1192.28 1016.86 1211.52 L 953.235 1298.89 L 709.879 1635.16 L 632.515 1742.22 C 621.094 1757.99 601.436 1786.55 589.058 1800.84 C 588.604 1799.28 590.162 1796.98 591.052 1795.02 C 613.785 1739.67 640.462 1681.57 664.839 1626.65 L 796.911 1330.52 L 842.138 1229.68 C 852.099 1207.36 864.681 1183.49 869.728 1160.12 C 879.124 1118.25 853.432 1076.27 812.202 1064.81 C 783.507 1056.84 748.894 1053.13 718.994 1048.3 L 504.694 1014.11 C 529.889 1008.46 562.646 1003.47 588.349 998.937 L 759.459 969.224 C 803.597 961.443 850.6 955.78 891.946 939.068 C 930.733 923.391 972.803 897.888 1001.59 867.413 C 1017.68 850.371 1037.95 820.695 1052.55 800.766 L 1137.4 685.202 L 1358.52 384.99 C 1401.43 326.56 1449.62 257.995 1494.35 201.814 z' /%3E%3Cpath d='M 867.018 487.873 C 870.875 492.652 895.16 540.34 899.529 548.54 C 931.8 608.253 963.378 668.338 994.257 728.782 C 983.029 748.949 971.929 769.188 960.96 789.497 L 942.658 823.96 C 937.776 807.246 932.155 777.485 928.156 759.685 L 900.671 639.405 L 878.561 543.652 C 874.885 527.52 868.937 503.711 867.018 487.873 z' /%3E%3Cpath d='M 1117.52 1198.77 C 1120.42 1203.25 1185.52 1515.25 1189.51 1535.53 C 1183.96 1523.43 1176.42 1509.58 1170.27 1497.6 C 1135.2 1429.95 1097.58 1360.94 1063.61 1293.17 L 1117.52 1198.77 z' /%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

@keyframes token-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.05); }
}

.icon-token-anim {
    animation: token-float 3s ease-in-out infinite;
}

.icon-token-silver {
    background-color: transparent !important;
    background-image: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%) !important;
}

/* ==========================================
   АНИМАЦИЯ ГАЛОЧКИ ДЛЯ ПАРОЛЯ
   ========================================== */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes popOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}