:root {
    --primary-color: #ff00cc;
    --secondary-color: #3333ff;
    --bg-color: #000;
    --text-color: #fff;
    --accent-color: #ffff00;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow: hidden;
}

/* Фоновая анимация */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: floatAround linear infinite;
}

@keyframes floatAround {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(var(--x), var(--y)) rotate(360deg); }
}

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    z-index: 2;
}

.screen {
    min-height: 100vh;
    height: 100svh; /* Support for mobile toolbars */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.content {
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Секция 1: Безумие */
.screen-1 {
    background: linear-gradient(45deg, #ff00cc, #3333ff);
    animation: bgShift 5s infinite alternate;
}

.drunk-emoji {
    font-size: clamp(3rem, 10vw, 5rem);
    position: absolute;
    z-index: 10;
}

.floating {
    top: 5%;
    left: 5%;
    animation: float 3s infinite ease-in-out;
}

.spinning {
    bottom: 5%;
    right: 5%;
    animation: spin 2s infinite linear;
}

.title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 3px 3px #ff00cc;
    transform: rotate(-5deg);
    animation: shake 0.5s infinite alternate;
    margin-bottom: 10px;
}

.name {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2.5rem, 12vw, 5rem);
    color: #ffff00;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 15px;
    animation: rainbow 2s infinite;
    line-height: 1.1;
}

.subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bold;
    background: #fff;
    color: #000;
    padding: 8px 15px;
    display: inline-block;
}

/* Секция 2: Пьяный Стасик */
.screen-2 {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.drunk-box {
    background: rgba(255, 255, 0, 0.9) !important;
    border: 4px dashed #ff00cc;
    transform: skewX(-3deg);
    color: #000;
    font-weight: bold;
    padding: clamp(15px, 5vw, 30px);
    border-radius: 15px;
    width: 95%;
    max-width: 600px;
    margin: 15px auto;
    line-height: 1.4;
    font-size: clamp(0.9rem, 4vw, 1.3rem);
    box-shadow: 10px 10px 0px #ff00cc;
}

.heading {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 2px 2px #000;
}

.signature {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.2rem, 5vw, 2rem);
    margin-top: 15px;
    color: #ff00cc;
    text-shadow: 1px 1px #fff;
}

/* Секция 3: Угар */
.screen-3 {
    background: #000;
}

.final-wish {
    font-size: clamp(2rem, 10vw, 4rem);
    margin-bottom: 20px;
    color: #fff;
    animation: pulseCrazy 0.5s infinite;
}

.shaking {
    font-size: clamp(4rem, 15vw, 6rem);
    animation: crazyShake 0.1s infinite;
    margin-bottom: 20px;
}

.crazy-btn {
    padding: 15px 30px;
    background: #ff00cc !important;
    color: #fff !important;
    font-size: clamp(1.2rem, 5vw, 2rem) !important;
    border: 4px solid #fff !important;
    border-radius: 0;
    cursor: pointer;
    font-weight: 900;
    animation: pulseCrazy 0.5s infinite;
    box-shadow: 8px 8px 0px #ffff00;
    width: auto;
    max-width: 90%;
}

/* Секция 4: Видос */
.screen-4 {
    background: radial-gradient(circle, #ff0000, #000);
}

.wish-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 10vw, 4rem);
    color: #ffff00;
    margin-bottom: 20px;
    text-shadow: 4px 4px #ff00cc;
}

.video-container {
    position: relative;
    width: 95%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
}

.crazy-border {
    border: 6px solid #ffff00;
    outline: 6px solid #ff00cc;
    box-shadow: 0 0 30px #ff00cc;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scroll-hint-box {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(0%); /* Еще правее, теперь ровно от центра вправо */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    pointer-events: none;
}

.scroll-text {
    font-size: clamp(0.8rem, 4vw, 1.2rem);
    font-weight: 900;
    color: #ffff00;
    background: #000;
    padding: 5px 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #ff00cc;
    animation: pulse 1s infinite;
    white-space: nowrap;
    margin-bottom: 10px;
    text-align: center;
}

.scroll-arrow {
    font-size: 2.5rem;
    animation: bounceDown 1.5s infinite;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes bgShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(20deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shake {
    from { transform: rotate(-5deg) scale(1); }
    to { transform: rotate(5deg) scale(1.05); }
}

@keyframes crazyShake {
    0% { transform: translate(0,0); }
    25% { transform: translate(3px, 3px); }
    50% { transform: translate(-3px, -3px); }
    75% { transform: translate(3px, -3px); }
    100% { transform: translate(-3px, 3px); }
}

@keyframes rainbow {
    0% { color: #ff0000; }
    20% { color: #ffff00; }
    40% { color: #00ff00; }
    60% { color: #00ffff; }
    80% { color: #0000ff; }
    100% { color: #ff00ff; }
}

@keyframes pulseCrazy {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.3); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes pulse {
    0% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
    100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
}

@media (max-width: 600px) {
    .drunk-box { transform: skewX(0deg); }
    .title { transform: rotate(0deg); }
}
