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

body {
    background-color: #8B4513;
    font-family: 'Kalam', cursive;
    color: #FFF8DC;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

.fart-counter {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    transform: rotate(-2deg);
    animation: wobble 3s ease-in-out infinite;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: absolute;
    top: 60px;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.butt-container {
    position: relative;
    cursor: pointer;
    transition: transform 0.1s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.butt-container:hover {
    transform: scale(1.05);
}

.butt-container:active {
    transform: scale(0.95);
}

#butt-svg {
    filter: drop-shadow(0 0 20px rgba(255, 248, 220, 0.3)) drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.5));
    animation: breathe 2s ease-in-out infinite;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    opacity: 0.9;
}

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

#butt-svg:hover {
    filter: drop-shadow(0 0 30px rgba(255, 248, 220, 0.5)) drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.5));
    opacity: 1;
}

#fart-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.footer {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    font-size: 2rem;
    font-weight: 400;
}

.social-link {
    color: #FFF8DC;
    text-decoration: none;
    transition: all 0.3s;
    transform: rotate(-5deg);
    display: inline-block;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.social-link:hover {
    color: #FFD700;
    transform: rotate(-5deg) scale(1.1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.burn-counter {
    transform: rotate(3deg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Анимация для счетчика при изменении */
.count-update {
    animation: pop 0.3s ease-out;
}

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

/* Медиа запросы для мобильных */
@media (max-width: 768px) {
    .fart-counter {
        font-size: 3rem;
        top: 40px;
    }
    
    .footer {
        font-size: 1.5rem;
        padding: 0 20px;
        bottom: 20px;
    }
    
    #butt-svg {
        width: 300px;
        height: 250px;
    }
}

/* Popup Modal Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease-out;
}

.popup-content {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    border: 3px solid #FFF8DC;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 248, 220, 0.3);
    animation: slideIn 0.6s ease-out;
    transform: rotate(-1deg);
}

.popup-header h2 {
    color: #FFF8DC;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: wobble 3s ease-in-out infinite;
}

.popup-body {
    margin-bottom: 25px;
}

.popup-body p {
    color: #FFF8DC;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.popup-body p strong {
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.agree-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: 3px solid #FFF8DC;
    border-radius: 15px;
    padding: 15px 30px;
    font-family: 'Kalam', cursive;
    font-size: 1.3rem;
    font-weight: 700;
    color: #8B4513;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: rotate(2deg);
}

.agree-button:hover {
    background: linear-gradient(45deg, #FFA500, #FFD700);
    transform: rotate(2deg) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
}

.agree-button:active {
    transform: rotate(2deg) scale(0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.popup-overlay.hidden {
    animation: fadeOut 0.5s ease-out forwards;
}

.popup-overlay.hidden .popup-content {
    animation: slideOut 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from { 
        transform: rotate(-1deg) translateY(-50px) scale(0.8);
        opacity: 0;
    }
    to { 
        transform: rotate(-1deg) translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOut {
    from { 
        transform: rotate(-1deg) translateY(0) scale(1);
        opacity: 1;
    }
    to { 
        transform: rotate(-1deg) translateY(50px) scale(0.8);
        opacity: 0;
    }
}

/* Mobile responsive for popup */
@media (max-width: 768px) {
    .popup-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .popup-header h2 {
        font-size: 2rem;
    }
    
    .popup-body p {
        font-size: 1rem;
    }
    
    .agree-button {
        font-size: 1.1rem;
        padding: 12px 24px;
    }
} 