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


html, body {
    font-family: 'Georgia', 'Times New Roman', serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    -webkit-overflow-scrolling: none;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    /* Убираем background и transition - фон теперь в отдельном div */
    background: transparent;
}

/* Постоянный фоновый слой для градиентов */
.permanent-background-layer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -10 !important;
    pointer-events: none !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: opacity 1.2s ease-in-out !important;
}

/* Фоновые градиенты (legacy) */
.bg-gradient-1 {
    background: linear-gradient(135deg, #ffeef8 0%, #f8e8ff 50%, #fff0f5 100%);
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8e0 50%, #fff0e6 100%);
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #f0fff8 0%, #e8fff0 50%, #f5fff8 100%);
}

.bg-gradient-4 {
    background: linear-gradient(135deg, #f8f0ff 0%, #f0e8ff 50%, #f5f0ff 100%);
}

.bg-gradient-5 {
    background: linear-gradient(135deg, #fff8f0 0%, #fff0e8 50%, #fff8f5 100%);
}

/* Анимированные паттерны */
.bg-gradient-1::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 192, 203, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(221, 160, 221, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 40% 40%, rgba(255, 218, 185, 0.2) 0%, transparent 40%);
    animation: float 8s ease-in-out infinite;
}

.bg-gradient-2::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(255, 228, 196, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 30% 70%, rgba(255, 218, 185, 0.2) 0%, transparent 40%);
    animation: float 10s ease-in-out infinite reverse;
}

.bg-gradient-3::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 60% 60%, rgba(144, 238, 144, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 20% 20%, rgba(152, 251, 152, 0.2) 0%, transparent 40%);
    animation: float 12s ease-in-out infinite;
}

.bg-gradient-4::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 80%, rgba(230, 230, 250, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 40% 20%, rgba(221, 160, 221, 0.2) 0%, transparent 40%);
    animation: float 9s ease-in-out infinite reverse;
}

.bg-gradient-5::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 248, 220, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 90% 10%, rgba(255, 228, 196, 0.2) 0%, transparent 40%);
    animation: float 11s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.5;
    }
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.compliment-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 600px;
    animation: cardAppear 1.2s ease-out;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 600px) {
  .compliment-card {
    padding: 6.667vw 5vw;
  }
}

.compliment-content {
    transition: opacity 0.32s ease-in-out;
}

.compliment-text {
    font-size: 29px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    font-style: italic;
    animation: textSlide 0.8s ease-out 0.4s both;
}
@media (max-width: 600px) {
  .compliment-text {
    font-size: calc(4.833vw);
  }
}

/* Эмодзи не курсивом */
.compliment-text .emoji {
    font-style: normal;
}

/* Эмодзи в мотивационном блоке тоже не курсивом */
.motivation-title .emoji,
.motivation-text .emoji {
    font-style: normal;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Загрузка на body */
.body-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.8s ease-in-out;
}

.body-loading .heart {
    font-size: 3.6em;
    margin-bottom: 20px;
    animation: heartbeat 1.5s infinite;
}

.body-loading p {
    font-size: 1.4em;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    color: #555;
}

.body-loading.fade-out .heart {
    animation: none;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}


/* Случайный счетчик внизу страницы */
.bottom-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    /* Анимация будет запускаться через JavaScript после завершения расширения карточки */
}

.random-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Jost', 'Montserrat', 'Helvetica Neue', sans-serif;
    font-size: 0.85em;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    font-weight: 500;
    /* border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */
    overflow: hidden;
    background-clip: padding-box;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), 0 4px 15px rgba(0,0,0,0.1);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
    will-change: transform;

    white-space: nowrap;
    text-align: center;
    height: 41px;
    line-height: 17px;
    min-width: 41px;
}

.counter-text {
    margin: 0 20px;
    flex-shrink: 0;
    color: transparent;
}

/* Анимация 1: Кружок выезжает снизу (БЕЗ текста) */
@keyframes counterCircleUp {
    0% {
        opacity: 0;
        width: 41px;
        height: 41px;
        border-radius: 50%;
        transform: translateX(-50%) translateY(50px);
        color: transparent;
    }
    100% {
        opacity: 1;
        width: 41px;
        height: 41px;
        border-radius: 50%;
        transform: translateX(-50%) translateY(0);
        color: transparent;
    }
}


/* Анимация 2: Кружок ПЛАВНО раскрывается в таблетку */
@keyframes counterExpand {
    from {
        width: 41px;
        border-radius: 50%;
    }
    to {
        width: var(--counter-target-width, 320px);
        border-radius: 25px;
    }
}

/* Анимация 3: Текст плавно появляется */
@keyframes counterTextAppear {
    0% {
        color: transparent;
    }
    100% {
        color: #666;
    }
}


@keyframes counterAppear {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes textSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Мотивационная страница для неавторизованных пользователей */
.motivation-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 20px;
}

.motivation-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 600px;
    animation: motivationAppear 1.5s ease-out;
}

.lock-icon {
    font-size: 4em;
    margin-bottom: 5px;
    animation: gentle-bounce 2.5s infinite ease-in-out;
}

@media (max-width: 600px) {
    .lock-icon {
        font-size: 12vw;
        margin-bottom: 1vw;
    }
}

@media (max-width: 600px) {
    .motivation-card {
        /* padding: 5vw 5vw; */
        max-width: 90vw;
    }
}


.motivation-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
    font-style: italic;
}

@media (max-width: 600px) {
    .motivation-title {
        font-size: 3.7vw;
    }
}

.motivation-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5em;
    line-height: 1.4;
    color: #333;
    margin: 0;
    font-style: italic;
}

@media (max-width: 600px) {
    .motivation-text {
        font-size: calc(3.7vw);
    }
}

.motivation-emoji {
    font-size: 2em;
    animation: gentle-pulse 3s infinite;
}

@media (max-width: 600px) {
    .motivation-emoji {
        font-size: 6vw;
    }
}

@keyframes motivationAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes gentle-pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

