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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.widget-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    padding: 32px;
    animation: slideInUp 0.6s ease-out;
}

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

.widget-header {
    text-align: center;
    margin-bottom: 32px;
}

.widget-header h2 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.widget-header p {
    color: #718096;
    font-size: 16px;
}

.admin-controls {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid #4299e1;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.control-group input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    width: 120px;
}

.donation-input {
    margin-bottom: 32px;
}

.donation-input label {
    display: block;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.slider-container {
    position: relative;
    margin-bottom: 16px;
}

.slider-value {
    display: block;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.donation-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #e2e8f0 0%, #4299e1 50%, #48bb78 100%);
    outline: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.donation-slider:hover {
    opacity: 1;
}

.donation-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.donation-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.donation-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.gift-aid-toggle {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.gift-aid-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #48bb78;
}

.gift-aid-toggle input[type="checkbox"]:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.gift-aid-toggle label {
    color: #2d3748;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.banknote-cage {
    position: relative;
    margin: 24px 0;
    padding: 55px 0 0 0;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-radius: 12px;
    border: 3px solid #718096;
    overflow: hidden;
}

.cage-bars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        #718096 10px,
        #718096 14px
    );
    opacity: 0.7;
    pointer-events: none;
    z-index: 2;
}

.cage-label {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: linear-gradient(135deg, #2b6cb8, #1e4a73);
    color: #f7fafc;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.2);
    border: 2px solid #4a5568;
    z-index: 10;
    white-space: nowrap;
}

.cage-label::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #4a5568;
}

.cage-label::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1e4a73;
}

.banknotes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    position: relative;
    z-index: 1;
}

.banknote {
    width: 50px;
    height: 30px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-radius: 6px;
    border: 2px solid #2f855a;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.banknote.excited {
    animation: bounce 0.6s ease-in-out infinite, psychedelicNote 1s linear infinite;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(255, 0, 255, 0.6));
}

.banknote.party-ready {
    animation: boogieDance 0.8s ease-in-out infinite, psychedelicNote 1.5s linear infinite;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.7))
            drop-shadow(0 0 15px rgba(255, 255, 0, 0.5));
}

.banknote.flying {
    position: relative;
    z-index: 100;
    pointer-events: none;
}

.banknote.flying::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -10px;
    width: 12px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.9) 20%, rgba(173,216,230,0.7) 60%, transparent 80%);
    border-radius: 50% 50% 0 50%;
    animation: wingFlap 0.2s ease-in-out infinite alternate;
    transform-origin: bottom right;
}

.banknote.flying::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -10px;
    width: 12px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.9) 20%, rgba(173,216,230,0.7) 60%, transparent 80%);
    border-radius: 50% 50% 50% 0;
    animation: wingFlap 0.2s ease-in-out infinite alternate;
    animation-delay: 0.1s;
    transform-origin: bottom left;
}

.banknote.ghost-flying::before,
.banknote.ghost-flying::after {
    background: radial-gradient(ellipse, rgba(255,255,255,0.5) 20%, rgba(200,200,255,0.4) 60%, transparent 80%);
    filter: blur(1px);
}

.banknote.ghost {
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    border-color: rgba(255,255,255,0.3);
    opacity: 0.5;
}

.banknote-denomination {
    position: absolute;
    top: 3px;
    left: 4px;
    font-size: 10px;
    font-weight: bold;
    color: #1a202c;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    z-index: 2;
}

.banknote-corner-marking {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 8px;
    font-weight: bold;
    color: #1a202c;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    z-index: 2;
}

.banknote-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #1a202c;
    font-weight: bold;
    z-index: 3;
}

.banknote-face.happy::before {
    content: '😊';
}

.banknote-face.excited::before {
    content: '🤩';
}

.banknote-face.dead::before {
    content: '💀';
}

.banknote-face.ghost::before {
    content: '👻';
    color: white;
}

.visualization {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    min-height: 200px;
}

.donation-stack {
    flex: 1;
    position: relative;
}

.donation-layer {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    animation: layerAppear 0.6s ease-out forwards;
}

.donation-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
    border-radius: inherit;
    overflow: hidden;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

.donation-layer:nth-child(1) { animation-delay: 0.1s; }
.donation-layer:nth-child(2) { animation-delay: 0.3s; }
.donation-layer:nth-child(3) { animation-delay: 0.5s; }

.gift-aid-layer {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.gasds-layer {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.gasds-layer.party-level-1 {
    background: linear-gradient(45deg, 
        #ed8936, #dd6b20, #f6ad55, #ed8936);
    background-size: 300% 300%;
    animation: gentleRainbow 4s linear infinite;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.4);
}

.gasds-layer.party-level-2 {
    background: linear-gradient(45deg, 
        #ff0080, #ff8000, #ffff00, #80ff00, #00ff80);
    background-size: 400% 400%;
    animation: mediumRainbow 3s linear infinite;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5),
                0 0 40px rgba(0, 255, 255, 0.3);
}

.gasds-layer.party-level-3 {
    background: linear-gradient(45deg, 
        #ff0080, #ff8000, #ffff00, #80ff00, #00ff80, 
        #0080ff, #8000ff, #ff0080);
    background-size: 600% 600%;
    animation: wildRainbow 2s linear infinite;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.6),
                0 0 50px rgba(0, 255, 255, 0.4),
                inset 0 0 20px rgba(255, 255, 0, 0.2);
}

.gasds-layer.party-level-4 {
    background: linear-gradient(45deg, 
        #ff0080, #ff8000, #ffff00, #80ff00, #00ff80, 
        #0080ff, #8000ff, #ff0080, #ff8000, #ffff00, 
        #80ff00, #00ff80, #0080ff, #8000ff);
    background-size: 800% 800%;
    animation: psychedelicRainbow 1.5s linear infinite;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8),
                0 0 60px rgba(0, 255, 255, 0.6),
                inset 0 0 30px rgba(255, 255, 0, 0.4);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.gasds-layer.party-level-5 {
    background: linear-gradient(45deg, 
        #ff0080, #ff8000, #ffff00, #80ff00, #00ff80, 
        #0080ff, #8000ff, #ff0080, #ff8000, #ffff00, 
        #80ff00, #00ff80, #0080ff, #8000ff);
    background-size: 800% 800%;
    animation: psychedelicRainbow 0.5s linear infinite, 
               partyPulse 1s ease-in-out infinite,
               partyShake 0.3s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(255, 0, 255, 1),
                0 0 100px rgba(0, 255, 255, 0.8),
                0 0 150px rgba(255, 255, 0, 0.6),
                inset 0 0 50px rgba(255, 255, 255, 0.6);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.gasds-layer.party-level-5::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, 
        #ff0080, #ff8000, #ffff00, #80ff00, #00ff80, 
        #0080ff, #8000ff, #ff0080);
    background-size: 400% 400%;
    animation: rainbowBorder 1.5s linear infinite;
    border-radius: inherit;
    z-index: -1;
}


@keyframes gentleRainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes mediumRainbow {
    0% { background-position: 0% 0%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 50% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes wildRainbow {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

.unicorn-trail {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    pointer-events: none;
    z-index: 5;
}

.unicorn {
    position: absolute;
    font-size: 24px;
    animation: unicornGallop 3s linear infinite;
    z-index: 6;
}

.unicorn:nth-child(2) {
    animation-delay: -1s;
    font-size: 20px;
}

.unicorn:nth-child(3) {
    animation-delay: -2s;
    font-size: 28px;
}

.disco-ball {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffffff, #cccccc);
    border-radius: 50%;
    animation: discoBallSpin 2s linear infinite;
    z-index: 10;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.disco-ball::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.8) 0px,
        rgba(255,255,255,0.8) 2px,
        rgba(200,200,200,0.8) 2px,
        rgba(200,200,200,0.8) 4px
    );
    border-radius: 50%;
}

.disco-lights {
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    pointer-events: none;
    z-index: 8;
}

.light-beam {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, 
        rgba(255, 0, 255, 0.8), 
        rgba(255, 0, 255, 0));
    transform-origin: bottom center;
    animation: discoBeam 3s linear infinite;
}

.light-beam:nth-child(2) {
    background: linear-gradient(to bottom, 
        rgba(0, 255, 255, 0.8), 
        rgba(0, 255, 255, 0));
    animation-delay: -1s;
}

.light-beam:nth-child(3) {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 0, 0.8), 
        rgba(255, 255, 0, 0));
    animation-delay: -2s;
}

.party-sparkles {
    position: absolute;
    top: 5px;
    left: -30px;
    right: 5px;
    bottom: -30px;
    pointer-events: none;
    z-index: 7;
}

.sparkle {
    position: absolute;
    font-size: 16px;
    animation: sparkleFloat 2s ease-in-out infinite;
    opacity: 0;
}

.sparkle:nth-child(odd) {
    animation-delay: -0.5s;
}

.sparkle:nth-child(3n) {
    animation-delay: -1s;
}

.gasds-banknotes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.gasds-banknotes .banknote {
    position: absolute;
    width: 25px;
    height: 15px;
    animation: celebrateInGasds 0.5s ease-out;
}

.gasds-banknotes .banknote.wandering {
    animation: wanderAround 4s ease-in-out infinite, 
               boogieDance 0.8s ease-in-out infinite, 
               psychedelicNote 2s linear infinite;
}

.gasds-banknotes .banknote.mega-wandering {
    animation: crazyWander 2s ease-in-out infinite, 
               frenzyDance 0.4s ease-in-out infinite, 
               psychedelicNote 1s linear infinite;
}

.gasds-banknotes .banknote.boogie-mode {
    animation: boogieDance 0.8s ease-in-out infinite, 
               psychedelicNote 2s linear infinite;
}

.gasds-banknotes .banknote .banknote-denomination {
    font-size: 6px;
    top: 1px;
    left: 2px;
}

.gasds-banknotes .banknote .banknote-corner-marking {
    font-size: 5px;
    bottom: 1px;
    right: 2px;
}

.gasds-banknotes .banknote .banknote-face {
    font-size: 8px;
}

@keyframes psychedelicRainbow {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes rainbowBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes partyShake {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-2px) translateY(1px); }
    50% { transform: translateX(2px) translateY(-1px); }
    75% { transform: translateX(-1px) translateY(2px); }
}

@keyframes unicornGallop {
    0% { 
        transform: translateX(-100px) translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10% { 
        opacity: 1;
    }
    50% { 
        transform: translateX(calc(100vw + 100px)) translateY(-20px) rotate(15deg);
        opacity: 1;
    }
    90% { 
        opacity: 1;
    }
    100% { 
        transform: translateX(calc(100vw + 200px)) translateY(0px) rotate(0deg);
        opacity: 0;
    }
}

@keyframes discoBallSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes discoBeam {
    0% { 
        transform: rotate(0deg);
        opacity: 0;
    }
    10% { 
        opacity: 1;
    }
    90% { 
        opacity: 1;
    }
    100% { 
        transform: rotate(360deg);
        opacity: 0;
    }
}

@keyframes sparkleFloat {
    0% { 
        transform: translateY(20px) scale(0);
        opacity: 0;
    }
    50% { 
        transform: translateY(-20px) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translateY(-40px) scale(0);
        opacity: 0;
    }
}

@keyframes boogieDance {
    0%, 100% { 
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
    25% { 
        transform: translateX(-3px) translateY(-5px) rotate(-10deg) scale(1.1);
    }
    50% { 
        transform: translateX(3px) translateY(-8px) rotate(10deg) scale(1.2);
    }
    75% { 
        transform: translateX(-2px) translateY(-3px) rotate(-5deg) scale(1.1);
    }
}

@keyframes frenzyDance {
    0%, 100% { 
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
    10% { 
        transform: translateX(-5px) translateY(-8px) rotate(-20deg) scale(1.3);
    }
    20% { 
        transform: translateX(5px) translateY(-12px) rotate(20deg) scale(1.4);
    }
    30% { 
        transform: translateX(-3px) translateY(-6px) rotate(-15deg) scale(1.2);
    }
    40% { 
        transform: translateX(4px) translateY(-10px) rotate(15deg) scale(1.5);
    }
    50% { 
        transform: translateX(-6px) translateY(-14px) rotate(-25deg) scale(1.3);
    }
    60% { 
        transform: translateX(6px) translateY(-8px) rotate(25deg) scale(1.4);
    }
    70% { 
        transform: translateX(-2px) translateY(-12px) rotate(-10deg) scale(1.2);
    }
    80% { 
        transform: translateX(3px) translateY(-6px) rotate(10deg) scale(1.3);
    }
    90% { 
        transform: translateX(-4px) translateY(-10px) rotate(-20deg) scale(1.1);
    }
}

@keyframes psychedelicNote {
    0% { 
        filter: hue-rotate(0deg) saturate(1);
        transform: scale(1);
    }
    25% { 
        filter: hue-rotate(90deg) saturate(1.5);
        transform: scale(1.1);
    }
    50% { 
        filter: hue-rotate(180deg) saturate(2);
        transform: scale(1.2);
    }
    75% { 
        filter: hue-rotate(270deg) saturate(1.5);
        transform: scale(1.1);
    }
    100% { 
        filter: hue-rotate(360deg) saturate(1);
        transform: scale(1);
    }
}

@keyframes wanderAround {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -10px) rotate(90deg); }
    50% { transform: translate(-10px, -15px) rotate(180deg); }
    75% { transform: translate(-15px, 10px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes crazyWander {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    10% { transform: translate(20px, -15px) rotate(45deg) scale(1.2); }
    20% { transform: translate(-15px, -20px) rotate(90deg) scale(0.8); }
    30% { transform: translate(-25px, 5px) rotate(135deg) scale(1.3); }
    40% { transform: translate(10px, 20px) rotate(180deg) scale(0.9); }
    50% { transform: translate(25px, -5px) rotate(225deg) scale(1.4); }
    60% { transform: translate(-10px, -25px) rotate(270deg) scale(0.7); }
    70% { transform: translate(-20px, 15px) rotate(315deg) scale(1.1); }
    80% { transform: translate(15px, 25px) rotate(360deg) scale(1.2); }
    90% { transform: translate(-5px, -10px) rotate(405deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(450deg) scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

@keyframes wingFlap {
    0% { transform: rotateX(0deg) rotateZ(-10deg) scale(0.8); }
    100% { transform: rotateX(20deg) rotateZ(10deg) scale(1.2); }
}

@keyframes flyToGasds {
    0% { 
        transform: translateY(0) translateX(0) scale(1) rotateZ(0deg);
        z-index: 100;
    }
    25% { 
        transform: translateY(-80px) translateX(100px) scale(1.3) rotateZ(15deg);
        z-index: 100;
    }
    50% { 
        transform: translateY(-120px) translateX(200px) scale(2.2) rotateZ(0deg);
        z-index: 100;
        filter: drop-shadow(0 0 20px rgba(255,255,255,0.8));
    }
    75% { 
        transform: translateY(-80px) translateX(300px) scale(1.3) rotateZ(-15deg);
        z-index: 100;
    }
    100% { 
        transform: translateY(-200px) translateX(400px) scale(0.8) rotateZ(0deg);
        opacity: 0;
        z-index: 100;
    }
}

@keyframes flyBackTocage {
    0% { 
        transform: translateY(-200px) translateX(400px) scale(0.8) rotateZ(0deg);
        opacity: 0.6;
        z-index: 100;
    }
    25% { 
        transform: translateY(-80px) translateX(300px) scale(1.4) rotateZ(-20deg);
        z-index: 100;
        filter: blur(2px) drop-shadow(0 0 15px rgba(200,200,255,0.6));
    }
    50% { 
        transform: translateY(-120px) translateX(200px) scale(2.5) rotateZ(0deg);
        z-index: 100;
        filter: blur(3px) drop-shadow(0 0 25px rgba(200,200,255,0.8));
    }
    75% { 
        transform: translateY(-80px) translateX(100px) scale(1.4) rotateZ(20deg);
        z-index: 100;
    }
    100% { 
        transform: translateY(0) translateX(0) scale(1) rotateZ(0deg);
        opacity: 0.8;
        z-index: 1;
    }
}

@keyframes popIn {
    0% { 
        transform: scale(0) rotateZ(0deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.5) rotateZ(180deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotateZ(360deg);
        opacity: 1;
    }
}

@keyframes celebrateInGasds {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.5) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes materializeInCage {
    0% { 
        transform: scale(0) rotate(0deg);
        opacity: 0;
        filter: drop-shadow(0 0 20px rgba(255,255,255,0.8));
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        opacity: 0.7;
        filter: drop-shadow(0 0 15px rgba(255,255,255,0.6));
    }
    100% { 
        transform: scale(1) rotate(360deg);
        opacity: 1;
        filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
    }
}

.widget-container {
    position: relative;
    overflow: hidden;
}

.flying-banknote {
    position: fixed;
    width: 50px;
    height: 30px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-radius: 6px;
    border: 2px solid #2f855a;
    z-index: 1000;
    pointer-events: none;
}

.flying-banknote.ghost-mode {
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2));
    border-color: rgba(255,255,255,0.4);
    filter: blur(1px);
}

.flying-banknote::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -10px;
    width: 12px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.9) 20%, rgba(173,216,230,0.7) 60%, transparent 80%);
    border-radius: 50% 50% 0 50%;
    animation: wingFlap 0.15s ease-in-out infinite alternate;
    transform-origin: bottom right;
}

.flying-banknote::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -10px;
    width: 12px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.9) 20%, rgba(173,216,230,0.7) 60%, transparent 80%);
    border-radius: 50% 50% 50% 0;
    animation: wingFlap 0.15s ease-in-out infinite alternate;
    animation-delay: 0.075s;
    transform-origin: bottom left;
}

.flying-banknote.ghost-mode::before,
.flying-banknote.ghost-mode::after {
    background: radial-gradient(ellipse, rgba(255,255,255,0.5) 20%, rgba(200,200,255,0.4) 60%, transparent 80%);
    filter: blur(1px);
}

.flying-banknote .banknote-denomination {
    position: absolute;
    top: 3px;
    left: 4px;
    font-size: 10px;
    font-weight: bold;
    color: #1a202c;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    z-index: 2;
}

.flying-banknote .banknote-corner-marking {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 8px;
    font-weight: bold;
    color: #1a202c;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    z-index: 2;
}

.flying-banknote .banknote-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #1a202c;
    font-weight: bold;
    z-index: 3;
}

.flying-banknote.party-flight {
    animation: psychedelicNote 0.3s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 0, 255, 0.8))
            drop-shadow(0 0 20px rgba(0, 255, 255, 0.6))
            drop-shadow(0 0 30px rgba(255, 255, 0, 0.4));
}

.flying-banknote.ghost-mode .banknote-denomination,
.flying-banknote.ghost-mode .banknote-corner-marking {
    color: rgba(255,255,255,0.8);
    text-shadow: 1px 1px 2px rgba(200,200,255,0.6);
}

.widget-container.party-active {
    position: relative;
    overflow: hidden;
}

.widget-container.party-active::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg,
        rgba(255, 0, 255, 0.2),
        rgba(0, 255, 255, 0.2),
        rgba(255, 255, 0, 0.2),
        rgba(255, 0, 255, 0.2));
    background-size: 400% 400%;
    animation: rainbowBorder 2s linear infinite;
    border-radius: 20px;
    z-index: -1;
    filter: blur(10px);
}

.floating-party-elements {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.floating-rainbow {
    position: absolute;
    font-size: 30px;
    animation: floatAcrossScreen 8s linear infinite;
    opacity: 0;
}

.floating-rainbow:nth-child(2) {
    animation-delay: -2s;
    top: 20%;
}

.floating-rainbow:nth-child(3) {
    animation-delay: -4s;
    top: 70%;
    font-size: 25px;
}

@keyframes floatAcrossScreen {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px));
        opacity: 0;
    }
}

.banknote.ghost .banknote-denomination,
.banknote.ghost .banknote-corner-marking {
    color: rgba(255,255,255,0.7);
    text-shadow: 1px 1px 2px rgba(200,200,255,0.5);
}

.layer-amount {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.layer-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impact-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #4a5568;
    animation: pulse 2s infinite;
}

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

.arrow-icon {
    font-size: 32px;
    font-weight: bold;
}

.arrow-text {
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.cash-donations-visual {
    flex: 1;
}

.cash-stack {
    position: relative;
}

.cash-layer {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
    border-radius: 12px;
    padding: 16px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    animation: layerAppear 0.6s ease-out 0.7s forwards;
}

.cash-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite 0.7s;
}

.summary-panel {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #4a5568;
    font-size: 16px;
}

.summary-row.highlight {
    color: #2d3748;
    font-weight: 600;
    background: rgba(237, 137, 54, 0.1);
    margin: 8px -12px;
    padding: 12px;
    border-radius: 8px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 8px;
    border-top: 2px solid #e2e8f0;
    margin-top: 8px;
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
}

.explanation {
    background: #edf2f7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.explanation h3 {
    color: #2d3748;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.explanation p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
}

.explanation p:last-child {
    margin-bottom: 0;
}

.donate-button {
    width: 100%;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.donate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.donate-button:active {
    transform: translateY(0);
}

.layer-disabled {
    opacity: 0.3;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.layer-enabled {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .widget-container {
        padding: 24px;
        margin: 10px;
    }
    
    .visualization {
        flex-direction: column;
        gap: 16px;
    }
    
    .impact-arrow {
        transform: rotate(90deg);
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .control-group input {
        width: 100%;
    }
    
    .widget-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .slider-value {
        font-size: 28px;
    }
    
    .layer-amount {
        font-size: 18px;
    }
    
    .summary-total {
        font-size: 18px;
    }
    
    .banknote-cage {
        margin: 16px 0;
        padding: 16px;
    }
    
    .banknote {
        width: 40px;
        height: 24px;
    }
    
    .banknote-denomination {
        font-size: 8px;
        top: 2px;
        left: 3px;
    }
    
    .banknote-corner-marking {
        font-size: 6px;
        bottom: 1px;
        right: 2px;
    }
    
    .banknote-face {
        font-size: 10px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.donate-button:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

input:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}