#cookie-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    z-index: 99999;
}

.cookie-hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    animation: cookieSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

@keyframes cookieSlideIn {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-main {
    width: 100%;
    height: 100%;
    background: #3D2817;
    border-radius: 50%;
    box-shadow:
        0 4px 14px rgba(61, 40, 23, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-main::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-main:hover::before {
    opacity: 1;
}

.cookie-main:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(61, 40, 23, 0.25),
        0 4px 8px rgba(0, 0, 0, 0.12);
}

.cookie-main:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

.cookie-icon {
    width: 28px;
    height: 28px;
    fill: #F5E6D3;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-main:hover .cookie-icon {
    transform: scale(1.1) rotate(5deg);
}

.cookie-main:active .cookie-icon {
    transform: scale(1.05);
}

#cookie-close {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 22px;
    height: 22px;
    background: #FFFFFF;
    border: 1.5px solid #E5E5E5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #3D2817;
    opacity: 0;
    transform: scale(0);
    animation: closeButtonAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes closeButtonAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#cookie-close:hover {
    background: #3D2817;
    color: #FFFFFF;
    border-color: #3D2817;
    transform: scale(1.15);
}

#cookie-close:active {
    transform: scale(1.05);
}

#cookie-close svg {
    transition: transform 0.25s ease;
}

#cookie-close:hover svg {
    transform: rotate(90deg);
}

.cookie-close-vanishing {
    animation: closeVanish 0.3s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
}

@keyframes closeVanish {
    0%  { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 0.8; }
    to  { transform: scale(0) rotate(360deg); opacity: 0; }
}

.cookie-close-reappearing {
    animation: closeReappear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes closeReappear {
    0%  { transform: scale(0) rotate(-180deg); opacity: 0; }
    to  { transform: scale(1) rotate(0deg); opacity: 1; }
}

.cookie-close-visible {
    opacity: 1 !important;
    transform: scale(1) !important;
    animation: none !important;
}

.cookie-popping .cookie-main {
    animation: bubblePop 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cookie-popping #cookie-close {
    animation: bubblePop 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes bubblePop {
    0% { transform: scale(1); opacity: 1; }
    20% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

#cookie-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cookie-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

#cookie-confirm {
    position: absolute;
    bottom: 10px;
    left: 70px;
    transform: translateY(10px);
    background: #fff;
    border-radius: 4px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(29,14,11,0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    min-width: 220px;
    border: 1px solid rgba(29,14,11,0.08);
}

#cookie-confirm::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid rgba(29,14,11,0.08);
    border-bottom: 1px solid rgba(29,14,11,0.08);
}

#cookie-confirm.cookie-confirm-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#cookie-confirm.cookie-confirm-hiding {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.cookie-confirm-content { text-align: center; }

.cookie-confirm-text {
    margin: 0 0 8px;
    font: 500 15px system-ui, sans-serif;
    color: #1d0e0b;
}

.cookie-confirm-hint {
    margin: 0 0 16px;
    font: 400 12px/1.5 system-ui, sans-serif;
    color: #6b5c54;
}

.cookie-confirm-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.cookie-confirm-buttons button {
    padding: 10px 22px;
    border-radius: 2px;
    font: 500 13px system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#cookie-confirm-yes {
    background: #1d0e0b;
    color: #fff;
}
#cookie-confirm-yes:hover { background: #3D2817; }

#cookie-confirm-no {
    background: transparent;
    color: #1d0e0b;
    border: 1px solid #1d0e0b;
}
#cookie-confirm-no:hover { background: #f5f5f5; }

@media (max-width: 768px) {
    #cookie-widget { width: 64px; height: 64px; bottom: 20px; left: 20px; }
    .cookie-icon { width: 32px; height: 32px; }
    #cookie-close { width: 24px; height: 24px; top: -4px; right: -4px; }
    #cookie-close svg { width: 14px; height: 14px; }
    .cookie-main:hover { transform: none; box-shadow: 0 4px 14px rgba(61,40,23,0.2), 0 2px 4px rgba(0,0,0,0.1); }
    .cookie-main:hover::before { opacity: 0; }
    .cookie-main:hover .cookie-icon { transform: none; }
    #cookie-confirm { left: 75px; min-width: 180px; padding: 16px 18px; }
    .cookie-confirm-text { font-size: 14px; }
    .cookie-confirm-hint { font-size: 11px; margin-bottom: 14px; }
    .cookie-confirm-buttons button { padding: 9px 18px; font-size: 12px; }
}

#cookie-widget:focus-visible {
    outline: 3px solid #3D2817;
    outline-offset: 6px;
    border-radius: 50%;
}
