@keyframes st-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes st-fade-down {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes st-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes st-scale-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes st-fab-pop {
    0%   { transform: scale(0) rotate(-12deg); opacity: 0; }
    60%  { transform: scale(1.12) rotate(3deg); opacity: 1; }
    80%  { transform: scale(0.96) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes st-orb-drift-a {
    0%   { opacity: 1; background-position: 50% 0%, 0% 85%, 100% 70%; }
    33%  { opacity: 0.85; background-position: 55% 5%, 5% 80%, 95% 65%; }
    66%  { opacity: 0.9; background-position: 45% 8%, 8% 90%, 92% 75%; }
    100% { opacity: 1; background-position: 50% 0%, 0% 85%, 100% 70%; }
}

@keyframes st-orb-drift-b {
    0%   { opacity: 0.8; background-position: 75% 30%, 20% 60%; }
    40%  { opacity: 1; background-position: 65% 40%, 30% 50%; }
    75%  { opacity: 0.7; background-position: 80% 25%, 15% 70%; }
    100% { opacity: 0.8; background-position: 75% 30%, 20% 60%; }
}

@keyframes st-logo-shimmer {
    0%   { background-position: -200% center; }
    60%  { background-position: 200% center; }
    100% { background-position: 200% center; }
}

@keyframes st-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    50%       { box-shadow: 0 0 0 4px transparent; opacity: 0.7; }
}

@keyframes st-row-reveal {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes st-count-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}

.site-header {
    animation: st-fade-down 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#controls-wrap {
    animation: st-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.alpha-bar {
    animation: st-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.shows-table {
    animation: st-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.site-footer {
    animation: st-fade-in 0.6s ease 0.5s both;
}

.bg-ambient {
    background-size: 140% 140%, 120% 120%, 110% 110%;
    animation: st-orb-drift-a 18s ease-in-out infinite;
}

.bg-ambient::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 45% at 75% 30%, color-mix(in srgb, var(--accent) 9%, transparent) 0%, transparent 65%),
        radial-gradient(ellipse 45% 50% at 20% 60%, color-mix(in srgb, var(--green) 8%, transparent) 0%, transparent 65%);
    background-size: 160% 160%, 140% 140%;
    animation: st-orb-drift-b 24s ease-in-out infinite;
}

.site-logo .logo-trades {
    background: linear-gradient(
        90deg,
        var(--green-light) 0%,
        color-mix(in srgb, var(--accent-light) 80%, white) 40%,
        var(--green-light) 60%,
        var(--green-light) 100%
    );
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: st-logo-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.header-right {
    animation: st-fade-in 0.5s ease 0.3s both;
}

.trade-dot {
    animation: st-dot-pulse 2.5s ease-in-out 1s infinite;
}

.basket-fab.visible {
    animation: st-fab-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.basket-count.bumping {
    animation: st-count-bump 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shows-tbody-loaded .show-row {
    animation: st-row-reveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shows-tbody-loaded .show-row:nth-child(1)  { animation-delay: 0.04s; }
.shows-tbody-loaded .show-row:nth-child(2)  { animation-delay: 0.07s; }
.shows-tbody-loaded .show-row:nth-child(3)  { animation-delay: 0.10s; }
.shows-tbody-loaded .show-row:nth-child(4)  { animation-delay: 0.13s; }
.shows-tbody-loaded .show-row:nth-child(5)  { animation-delay: 0.16s; }
.shows-tbody-loaded .show-row:nth-child(6)  { animation-delay: 0.19s; }
.shows-tbody-loaded .show-row:nth-child(7)  { animation-delay: 0.22s; }
.shows-tbody-loaded .show-row:nth-child(8)  { animation-delay: 0.25s; }
.shows-tbody-loaded .show-row:nth-child(9)  { animation-delay: 0.27s; }
.shows-tbody-loaded .show-row:nth-child(10) { animation-delay: 0.29s; }
.shows-tbody-loaded .show-row:nth-child(11) { animation-delay: 0.31s; }
.shows-tbody-loaded .show-row:nth-child(12) { animation-delay: 0.33s; }
.shows-tbody-loaded .show-row:nth-child(13) { animation-delay: 0.35s; }
.shows-tbody-loaded .show-row:nth-child(14) { animation-delay: 0.37s; }
.shows-tbody-loaded .show-row:nth-child(15) { animation-delay: 0.39s; }
.shows-tbody-loaded .show-row:nth-child(n+16) { animation-delay: 0.41s; }

.alpha-btn {
    transition: color 0.18s ease,
                background 0.18s ease,
                transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.18s ease;
}
.alpha-btn:hover:not(.active) {
    transform: translateY(-2px) scale(1.08);
}
.alpha-btn.active {
    animation: st-scale-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quick-filter-btn {
    transition: color 0.18s ease,
                background 0.18s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.18s ease;
}
.quick-filter-btn:hover {
    transform: translateY(-1px) scale(1.04);
}
.quick-filter-btn.active {
    animation: st-scale-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.show-row {
    transition: background 0.15s ease, transform 0.15s ease;
}
.show-row:hover {
    transform: translateX(2px);
}

.modal-overlay.visible .modal-box {
    animation: st-scale-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trade-contact-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease,
                background 0.2s ease, border-color 0.2s ease;
}
#trade-modal.visible .trade-contact-item:nth-child(1) { animation: st-fade-up 0.3s ease 0.15s both; }
#trade-modal.visible .trade-contact-item:nth-child(2) { animation: st-fade-up 0.3s ease 0.22s both; }
#trade-modal.visible .trade-contact-item:nth-child(3) { animation: st-fade-up 0.3s ease 0.29s both; }
#trade-modal.visible .trade-contact-item:nth-child(4) { animation: st-fade-up 0.3s ease 0.36s both; }

.site-notice-top {
    animation: st-fade-down 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

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