:root {
--primary-color: #6366f1; /* Индиго */
--bg-color: rgba(31, 41, 55, 0.8);
--icon-color: #f3f4f6;
/*--bg-color: rgba(255, 255, 255, 0.8);*/
/*--icon-color: #1f2937;*/
--size: 56px;
--progress-width: 3px;
--shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Темная тема */
/*@media (prefers-color-scheme: dark) {
:root {
--bg-color: rgba(31, 41, 55, 0.8);
--icon-color: #f3f4f6;
}
}*/

* {
box-sizing: border-box;
scroll-behavior: smooth;
}
/*
body {
font-family: system-ui, -apple-system, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #f9fafb;
color: #111827;
height: 300vh;
display: flex;
flex-direction: column;
align-items: center;
}

.demo-content {
padding: 40px 20px;
max-width: 600px;
text-align: center;
}
*/
/* Контейнер виджета - Позиционирование ПОСЕРЕДИНЕ СПРАВА */
.btt-container {
position: fixed;
top: 50%;
right: 20px;
z-index: 9999;
opacity: 0;
visibility: hidden;
/* Смещаем на -50% по Y для идеального центра + 20px вниз для анимации появления */
transform: translateY(-30%) scale(0.8);
transition: var(--transition);
}

.btt-container.visible {
opacity: 1;
visibility: visible;
transform: translateY(-50%) scale(1);
}

/* Кнопка */
.btt-button {
width: var(--size);
height: var(--size);
border-radius: 50%;
background: var(--bg-color);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: var(--shadow);
position: relative;
outline: none;
transition: var(--transition);
}

.btt-button:hover {
transform: scale(1.1);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
background: var(--primary-color);
}

.btt-button:hover .btt-icon {
stroke: white;
}

.btt-button:active {
transform: scale(0.95) translateY(-50%);
}

/* Иконка стрелки */
.btt-icon {
width: 24px;
height: 24px;
fill: none;
stroke: var(--icon-color);
stroke-width: 2.5;
stroke-linecap: round;
stroke-linejoin: round;
transition: var(--transition);
}

/* SVG Прогресс-бар */
.progress-svg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: rotate(-90deg);
pointer-events: none;
}

.progress-circle {
fill: none;
stroke: var(--primary-color);
stroke-width: var(--progress-width);
stroke-dasharray: 157; /* 2 * PI * r (где r = 25) */
stroke-dashoffset: 157;
stroke-linecap: round;
transition: stroke-dashoffset 0.1s linear;
}

/* Адаптация для мобильных */
@media (max-width: 640px) {
.btt-container {
right: 10px;
}
:root {
--size: 48px;
}
}