@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0f172a;
    color: #f1f5f9;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.glow-1 { border: 2px solid #64748b; box-shadow: 0 0 10px rgba(100,116,139,.2); background: linear-gradient(to bottom,#334155,#0f172a); }
.glow-2 { border: 2px solid #22c55e; box-shadow: 0 0 10px rgba(34,197,94,.2);   background: linear-gradient(to bottom,#064e3b,#0f172a); }
.glow-3 { border: 2px solid #2563eb; box-shadow: 0 0 15px rgba(37,99,235,.4);   background: linear-gradient(to bottom,#1e3a8a,#0f172a); }
.glow-4 { border: 2px solid #a855f7; box-shadow: 0 0 20px rgba(168,85,247,.5);  background: linear-gradient(to bottom,#2e1065,#0f172a); }
.glow-5 { border: 2px solid #fbbf24; box-shadow: 0 0 25px rgba(251,191,36,.6);  background: linear-gradient(to bottom,#451a03,#0f172a); animation: pulse 2s infinite; }

@keyframes pulse {
    0%,100% { transform: scale(1);    box-shadow: 0 0 20px rgba(251,191,36,.4); }
    50%      { transform: scale(1.02); box-shadow: 0 0 35px rgba(251,191,36,.8); }
}

.label-5 { border-color: #fbbf24 !important; color: #fbbf24 !important; }
.label-4 { border-color: #a855f7 !important; color: #a855f7 !important; }
.label-3 { border-color: #1d4ed8 !important; color: #1d4ed8 !important; }
.label-2 { border-color: #22c55e !important; color: #22c55e !important; }
.label-1 { border-color: #94a3b8 !important; color: #94a3b8 !important; }

#r5:checked + .label-5 { background: #fbbf24; color: #000 !important; border-color: #fbbf24 !important; }
#r4:checked + .label-4 { background: #a855f7; color: #fff !important; border-color: #a855f7 !important; }
#r3:checked + .label-3 { background: #1d4ed8; color: #fff !important; border-color: #1d4ed8 !important; }
#r2:checked + .label-2 { background: #22c55e; color: #fff !important; border-color: #22c55e !important; }
#r1:checked + .label-1 { background: #94a3b8; color: #fff !important; border-color: #94a3b8 !important; }
#filter-fav:checked + label { background: #fbbf24; color: #000 !important; border-color: #f59e0b !important; }

.nav-blur {
    background: rgba(15,23,42,.9);
    backdrop-filter: blur(12px);
}

.custom-scrollbar::-webkit-scrollbar       { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

.card-image-container {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: .75rem;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-image-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
    display: block;
}
.card-item { cursor: pointer; transition: all .3s ease; }
.card-item:hover .card-image-container img { transform: scale(1.1); }
.card-item:hover { transform: translateY(-5px); }

.empty-state {
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(30,41,59,.5);
    border: 2px dashed #334155;
    border-radius: 1.5rem;
}

.lang-flag { cursor: pointer; filter: grayscale(100%); transition: all .3s ease; }
.lang-flag.active { filter: grayscale(0%); transform: scale(1.1); }

.rarity-checkbox-group {
    display: flex; flex-wrap: wrap; gap: .5rem;
    background: rgba(30,41,59,.7);
    padding: .5rem;
    border-radius: .75rem;
    border: 1px solid #334155;
}
.rarity-checkbox { display: none; }
.rarity-label {
    cursor: pointer;
    padding: .35rem .85rem;
    border-radius: .5rem;
    font-size: .75rem;
    font-weight: 700;
    border: 2px solid transparent;
    transition: all .2s;
    user-select: none;
    display: flex; align-items: center; gap: .5rem;
}

.dev-popover {
    position: absolute;
    bottom: calc(100% + 15px); left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e293b;
    border: 1px solid #4f46e5;
    padding: 8px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.8);
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: all .3s cubic-bezier(.175,.885,.32,1.275);
    white-space: nowrap; pointer-events: none;
}
.dev-popover.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.dev-popover::after {
    content: ''; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border-width: 8px; border-style: solid;
    border-color: #4f46e5 transparent transparent transparent;
}
.dev-wrapper  { position: relative; display: inline-block; }
.dev-name-btn { cursor: pointer; font-weight: 700; transition: all .2s; color: #818cf8; padding: 0 4px; user-select: none; }
.dev-name-btn:hover { color: #a5b4fc; text-decoration: underline; }

.filter-input {
    background: rgba(30,41,59,.7);
    border: 1px solid #334155;
    color: #fff;
    padding: .5rem 1rem;
    border-radius: .75rem;
    outline: none;
    transition: border-color .2s;
}
.filter-input:focus { border-color: #4f46e5; }

.pagination-btn {
    background: #1e293b;
    border: 1px solid #334155;
    padding: .5rem 1.25rem;
    border-radius: .75rem;
    transition: all .2s;
    color: #f1f5f9;
    cursor: pointer;
    font-weight: 600;
    font-size: .875rem;
}
.pagination-btn:hover:not(:disabled) {
    background: #334155;
    border-color: #6366f1;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,.2);
}
.pagination-btn:disabled { opacity: .3; cursor: not-allowed; transform: none; }

.fav-star-icon         { filter: drop-shadow(0 0 5px rgba(251,191,36,.8)); transition: all .2s; }
.fav-star-icon.active  { color: #fbbf24; }
.fav-star-icon.inactive{ color: #475569; filter: none; }

.kanji-text { color: #a5b4fc; font-size: .7rem; line-height: 1; }
.page-info  { background: rgba(30,41,59,.8); padding: .5rem 1.5rem; border-radius: .5rem; min-width: 120px; text-align: center; }
.stat-box   { background: rgba(30,41,59,.8); padding: .75rem 1rem; border-radius: .75rem; border: 1px solid #334155; min-width: 110px; }

.loading-spinner {
    border: 3px solid rgba(255,255,255,.1);
    border-radius: 50%; border-top-color: #6366f1;
    animation: spin 1s linear infinite;
    width: 40px; height: 40px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mal-link {
    display: inline-flex; align-items: center; gap: .25rem;
    color: #6366f1; font-size: .65rem; font-weight: 600;
    text-decoration: none; transition: all .2s; margin-top: .25rem;
}
.mal-link:hover { color: #818cf8; text-decoration: underline; }
.mal-link i { font-size: .6rem; }

.card-fav-btn {
    position: absolute; top: 6px; right: 6px;
    background: rgba(0,0,0,.7); border: none;
    border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; z-index: 10;
}
.card-fav-btn:hover  { background: rgba(0,0,0,.9); transform: scale(1.1); }
.card-fav-btn.active { background: rgba(251,191,36,.3); }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden; transition: all .3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: #1e293b; border-radius: 1.5rem; border: 2px solid #4f46e5;
    max-width: 800px; width: 90%; max-height: 90vh; overflow-y: auto;
    transform: scale(.9); transition: all .3s ease; padding: 2rem;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(0,0,0,.7); border: none; border-radius: 50%;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff; transition: all .2s;
}
.modal-close:hover { background: #ef4444; transform: scale(1.1); }

.discord-btn {
    background: #5865F2; color: #fff; padding: .5rem 1.5rem;
    border-radius: .5rem; font-weight: 600; transition: all .2s;
    display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
}
.discord-btn:hover { background: #4752C4; transform: translateY(-2px); }

.vote-btn {
    background: linear-gradient(to right,#ff6b6b,#ee5a5a); color: #fff;
    padding: 1rem 2rem; border-radius: .75rem; font-weight: 700; font-size: 1.1rem;
    transition: all .2s; display: inline-flex; align-items: center; gap: .75rem; text-decoration: none;
}
.vote-btn:hover { transform: translateY(-3px); filter: brightness(1.1); box-shadow: 0 10px 30px rgba(255,107,107,.4); }

.kofi-btn {
    background: linear-gradient(to right,#FF5E5B,#ff6b6b); color: #fff;
    padding: 1rem 2.5rem; border-radius: .75rem; font-weight: 700; font-size: 1.1rem;
    transition: all .2s; display: inline-flex; align-items: center; gap: .75rem;
    text-decoration: none; border: none; cursor: pointer;
}
.kofi-btn:hover { transform: translateY(-3px); filter: brightness(1.1); box-shadow: 0 10px 30px rgba(255,94,91,.4); }

.plan-card {
    background: rgba(30,41,59,.8); border: 1px solid #334155;
    border-radius: 1rem; padding: 2rem; transition: all .3s ease;
    max-width: 500px; margin: 0 auto;
}
.plan-card:hover { border-color: #fbbf24; transform: translateY(-5px); }
.plan-card.supporter { border-color: #fbbf24; box-shadow: 0 0 30px rgba(251,191,36,.2); }
.plan-price {
    font-size: 2.5rem; font-weight: 800;
    background: linear-gradient(to right,#fbbf24,#f59e0b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.plan-features { list-style: none; margin: 1.5rem 0; }
.plan-features li { padding: .5rem 0; color: #94a3b8; display: flex; align-items: center; gap: .5rem; }
.plan-features li i { color: #22c55e; }
.kofi-btn-container { display: flex; justify-content: center; align-items: center; margin-top: 1.5rem; width: 100%; }

#maintenance-page {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg,#0f172a 0%,#1e293b 100%);
    display: none; flex-direction: column; align-items: center; justify-content: center;
    z-index: 9999; padding: 2rem;
}
#maintenance-page.active { display: flex; }
.maintenance-gif { max-width: 400px; width: 100%; border-radius: 1.5rem; border: 3px solid #6366f1; box-shadow: 0 0 50px rgba(99,102,241,.5); margin-bottom: 2rem; }
.maintenance-title { font-size: 2.5rem; font-weight: 800; background: linear-gradient(to right,#6366f1,#a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1rem; text-align: center; }
.maintenance-text { font-size: 1.1rem; color: #94a3b8; text-align: center; max-width: 500px; line-height: 1.8; }
.maintenance-icon { font-size: 4rem; color: #fbbf24; margin-bottom: 1.5rem; animation: rotate 3s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.retry-btn { margin-top: 2rem; background: #6366f1; color: #fff; padding: .75rem 2rem; border-radius: .5rem; font-weight: 600; cursor: pointer; transition: all .2s; border: none; }
.retry-btn:hover { background: #4f46e5; transform: translateY(-2px); }

.legal-content h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 1.5rem; }
.legal-content h3 { font-size: 1.2rem; font-weight: 700; color: #e2e8f0; margin-bottom: .75rem; }
.legal-content h4 { font-size: 1rem; font-weight: 600; color: #cbd5e1; margin-bottom: .5rem; margin-top: 1rem; }
.legal-content p, .legal-content li { color: #94a3b8; line-height: 1.8; margin-bottom: .75rem; margin-left: 1.5rem; font-size: .9rem; }
.legal-content a { color: #6366f1; text-decoration: underline; transition: color .2s; }
.legal-content a:hover { color: #818cf8; }
.legal-section { border-bottom: 1px solid #334155; padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.legal-section:last-child { border-bottom: none; }

.vote-page, .invite-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; }
.vote-gif, .invite-gif { max-width: 400px; width: 100%; border-radius: 1.5rem; border: 3px solid #ff6b6b; box-shadow: 0 0 50px rgba(255,107,107,.5); margin-bottom: 2rem; }
.invite-gif { border-color: #6366f1; box-shadow: 0 0 50px rgba(99,102,241,.5); }
.vote-title, .invite-title { font-size: 2.5rem; font-weight: 800; background: linear-gradient(to right,#ff6b6b,#ee5a5a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1rem; text-align: center; }
.invite-title { background: linear-gradient(to right,#6366f1,#a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.vote-text, .invite-text { font-size: 1.1rem; color: #94a3b8; text-align: center; max-width: 500px; line-height: 1.8; margin-bottom: 2rem; }
.vote-perks, .commands-list { background: rgba(30,41,59,.8); border: 1px solid #334155; border-radius: 1rem; padding: 1.5rem; margin: 2rem 0; }
.vote-perks h4, .commands-list h4 { color: #fbbf24; margin-bottom: 1rem; }
.vote-perks ul, .commands-list ul { list-style: none; padding: 0; }
.vote-perks li, .commands-list li { padding: .5rem 0; color: #94a3b8; display: flex; align-items: center; gap: .75rem; }
.vote-perks li i { color: #22c55e; }
.command-code { background: #1e293b; border: 1px solid #334155; padding: .2rem .6rem; border-radius: .375rem; font-family: monospace; color: #818cf8; font-size: .9rem; }

.cookie-consent-banner {
    position: fixed; bottom: -100%; left: 50%; transform: translateX(-50%);
    width: calc(100% - 2rem); max-width: 900px;
    background: rgba(30,41,59,.85); backdrop-filter: blur(16px);
    border: 1px solid rgba(99,102,241,.3); border-radius: 12px;
    padding: 1.5rem 2rem; box-shadow: 0 -10px 40px rgba(0,0,0,.4);
    z-index: 9998; transition: bottom .5s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; gap: 1rem;
}
.cookie-consent-banner.visible { bottom: 2rem; }
.cookie-consent-banner.hidden  { bottom: -100%; opacity: 0; }
.cookie-consent-content { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) {
    .cookie-consent-content { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cookie-consent-text h3   { font-size: 1.1rem; font-weight: 600; color: #f1f5f9; margin-bottom: .5rem; }
.cookie-consent-text p    { font-size: .875rem; color: #94a3b8; line-height: 1.6; }
.cookie-consent-text a    { color: #818cf8; text-decoration: underline; transition: color .2s; }
.cookie-consent-text a:hover { color: #a5b4fc; }
.cookie-consent-buttons   { display: flex; flex-direction: column; gap: .75rem; flex-shrink: 0; }
.cookie-btn { border: none; border-radius: 8px; padding: .625rem 1.25rem; font-size: .875rem; font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit; }
.cookie-btn-primary { background: #4f46e5; color: #fff; }
.cookie-btn-primary:hover { background: #4338ca; transform: translateY(-1px); }
.cookie-btn-outline { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.cookie-btn-outline:hover { border-color: #4f46e5; color: #fff; }
.cookie-btn-link { background: transparent; color: #818cf8; font-size: .8rem; padding: .5rem 1rem; text-decoration: underline; }
.cookie-btn-link:hover { color: #a5b4fc; }
@media (max-width: 640px) {
    .cookie-consent-banner { padding: 1.25rem 1.5rem; width: calc(100% - 1.5rem); }
    .cookie-consent-banner.visible { bottom: 1rem; }
    .cookie-consent-buttons { width: 100%; }
    .cookie-btn { width: 100%; }
}

.logged-out .filter-controls-hidden { display: none !important; }
.logged-out #page-header h2,
.logged-out #page-header p { opacity: .5; }

.market-btn:disabled { opacity: .4; cursor: not-allowed; }
.market-btn { font-family: inherit; cursor: pointer; }

.lang-switcher {
    display: flex; align-items: center; gap: .4rem;
    padding: .375rem .75rem;
    background: rgba(30,41,59,.5);
    border: 1px solid #334155; border-radius: 999px;
}
.lang-switcher .lang-flag { font-size: 1.1rem; }