:root {
    --primary-color: #54cc99;
    --secondary-color: #0a3e2e;
    --bg-color: #F0F4F8;
    --nav-color: #ffffff;
    --cards-color: #ffffff;
    --text-primary: #000000;
    --text-secondary: #000000;
}

* { box-sizing: border-box; outline: none; }

html, body {
    padding: 0;
    margin: 0;
    min-height: 100%;
}

body {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100vh;
    padding-top: 6rem;
    overflow-x: hidden;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body > *:not(header):not(aside):not(footer):not(script):not(style):not(#toastRoot):not([data-modal]) {
    width: 100%;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

[x-cloak] { display: none !important; }

#toastRoot {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: calc(100vw - 2rem);
    width: 320px;
}

.toast {
    pointer-events: auto;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    animation: toastIn 0.25s ease-out;
    word-break: break-word;
}

.toast.out { animation: toastOut 0.2s ease-in forwards; }

.toast-success { background: var(--primary-color); color: var(--nav-color); }
.toast-error   { background: #c0392b; color: #fff; }
.toast-info    { background: var(--secondary-color); color: var(--text-secondary); }

@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

#loadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

#loadingOverlay.active { display: flex; }

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }


.skeleton {
    background: linear-gradient(90deg, var(--cards-color) 0%, rgba(255,255,255,0.06) 50%, var(--cards-color) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes marquee-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}
.marquee-track {
    animation: marquee-scroll 60s linear infinite;
    will-change: transform;
}
@media (hover: hover) {
    .marquee-track:hover { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}
.cv-auto > .scratch-card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 560px;
}
.skeleton {
    background: linear-gradient(90deg, var(--cards-color) 0%, rgba(255,255,255,0.06) 50%, var(--cards-color) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: color .2s;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.bottom-nav-item:hover,
.bottom-nav-item[aria-current="page"] {
    color: var(--primary-color);
}

.bottom-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    position: relative;
    margin-bottom: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color .2s;
}
.bottom-nav-center[aria-current="page"] {
    color: var(--primary-color);
}
.bottom-nav-center-icon {
    margin-top: -24px;
    width: 52px;
    height: 52px;
    border-radius: 9999px;
    background: var(--primary-color);
    color: var(--nav-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .3);
}


.btn-pill {
    height: 40px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: filter .2s;
    cursor: pointer;
}
.btn-pill:hover {
    filter: brightness(1.1);
}
.btn-outline {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}
.btn-solid {
    color: var(--nav-color);
    background: var(--primary-color);
    border: none;
}
[data-wallet-balance].balance-flash {
    animation: balance-flash 0.8s ease-out;
}
@keyframes balance-flash {
    0%   { color: var(--primary-color); transform: scale(1); }
    30%  { color: #ffd700; transform: scale(1.15); }
    100% { color: var(--primary-color); transform: scale(1); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background .2s;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, .05);
}


.footer-link {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    opacity: 0.8;
    transition: color .2s, opacity .2s;
}
.footer-link:hover {
    color: var(--primary-color);
    opacity: 1;
}
@media (min-width: 640px) {
    .footer-link { font-size: 12px; }
}


.cv-auto > .raffle-card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 420px;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.skeleton {
    background: linear-gradient(90deg, var(--cards-color) 0%, rgba(255,255,255,0.06) 50%, var(--cards-color) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}