/* ─── Base ─────────────────────────────────────────────────────────────────── */
html, body {
    font-family: 'Nunito', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #1a1a2e;
    color: #f0e6d3;
    min-height: 100vh;
}

/* ─── Utilities ────────────────────────────────────────────────────────────── */
.gold-text {
    color: #F59E0B !important;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* ─── Pajac images ─────────────────────────────────────────────────────────── */
.pajac-img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(245, 158, 11, 0.3));
}

.pajac-container {
    padding: 1rem;
}

/* ─── Donation form ────────────────────────────────────────────────────────── */
.donation-form-paper {
    background: #16213e !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    border-radius: 16px !important;
}

.donate-btn {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    color: #1a1a2e !important;
    border-radius: 12px !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5) !important;
}

/* ─── Sukces page ──────────────────────────────────────────────────────────── */
.sukces-page {
    position: relative;
    overflow: hidden;
}

.rocket-launch-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.rocket-launch {
    animation: rocketLaunch 2.5s ease-out forwards;
}

@keyframes rocketLaunch {
    0%   { transform: translateY(0) scale(1); opacity: 1; }
    60%  { transform: translateY(-60px) scale(1.1); opacity: 1; }
    80%  { transform: translateY(-120px) scale(1.15); opacity: 1; }
    100% { transform: translateY(-200px) scale(1.2); opacity: 0.85; }
}

.sukces-info {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.message-bubble {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    border-radius: 12px !important;
}

/* ─── Confetti ─────────────────────────────────────────────────────────────── */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 18px;
    animation: confettiFall 3.5s ease-in forwards;
}

.confetti-piece:nth-child(odd)  { background: #F59E0B; border-radius: 2px; }
.confetti-piece:nth-child(even) { background: #60A5FA; border-radius: 50%; }
.confetti-piece:nth-child(3n)   { background: #34D399; width: 8px; height: 8px; border-radius: 50%; }
.confetti-piece:nth-child(4n)   { background: #F87171; border-radius: 2px; }

@keyframes confettiFall {
    0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Porazka page ─────────────────────────────────────────────────────────── */
.porazka-page {
    animation: fadeIn 0.6s ease-out;
}

.porazka-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.shake-sad {
    animation: shakeSad 0.6s ease-out 0.3s both, fadeIn 0.5s ease-out;
}

@keyframes shakeSad {
    0%,100% { transform: translateX(0); }
    15%     { transform: translateX(-12px) rotate(-3deg); }
    30%     { transform: translateX(12px) rotate(3deg); }
    45%     { transform: translateX(-8px) rotate(-2deg); }
    60%     { transform: translateX(8px) rotate(2deg); }
    75%     { transform: translateX(-4px); }
}

/* ─── Waiting page ─────────────────────────────────────────────────────────── */
.pajac-waiting-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.pajac-wobble {
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%,100% { transform: rotate(0deg) translateY(0); }
    20%     { transform: rotate(-6deg) translateY(-6px); }
    40%     { transform: rotate(6deg) translateY(-3px); }
    60%     { transform: rotate(-4deg) translateY(-8px); }
    80%     { transform: rotate(4deg) translateY(-2px); }
}

/* ─── Overlay (OBS) ────────────────────────────────────────────────────────── */
.overlay-donation {
    position: fixed;
    bottom: 40px;
    left: 40px;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.95) 0%, rgba(26, 26, 46, 0.95) 100%);
    border: 2px solid #F59E0B;
    border-radius: 16px;
    padding: 20px 28px;
    min-width: 320px;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4);
    backdrop-filter: blur(8px);
}

.overlay-slide-in {
    animation: overlaySlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.overlay-slide-out {
    animation: overlaySlideOut 0.5s ease-in forwards;
}

@keyframes overlaySlideIn {
    0%   { transform: translateY(80px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

@keyframes overlaySlideOut {
    0%   { transform: translateY(0);    opacity: 1; }
    100% { transform: translateY(80px); opacity: 0; }
}

.overlay-amount {
    font-size: 2.4rem;
    font-weight: 900;
    color: #F59E0B;
    text-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
    line-height: 1.1;
}

.overlay-nick {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f0e6d3;
    margin-top: 4px;
}

.overlay-message {
    font-size: 1rem;
    font-style: italic;
    color: #b0a090;
    margin-top: 8px;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    padding-top: 8px;
}

/* ─── Shared helpers ───────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

/* ─── Blazor error boundary ────────────────────────────────────────────────── */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}
