:root {
    --bg: #2e194a;
    --bg-accent: #3a1f5c;
    --bg-warm: #241432;
    --bg-glow-1: rgba(255, 209, 0, 0.18);
    --bg-glow-2: rgba(255, 209, 0, 0.12);
    --bg-glow-3: rgba(0, 0, 0, 0.1);
    --card: #1a0f24;
    --card-border: #3f2a57;
    --text: #f2eff8;
    --muted: #c2b9d4;
    --accent: #ffd100;
    --accent-strong: #ffbf00;
    --blue: #ffd100;
    --danger: #ffbf00;
    --radius-lg: 22px;
    --radius-md: 14px;
    --shadow: 0 12px 24px rgba(7, 3, 12, 0.45);
    --shadow-soft: 0 18px 30px rgba(7, 3, 12, 0.4);
    --shadow-glow: 0 24px 40px rgba(255, 209, 0, 0.25);
    --font-display: "Luckiest Guy", "Nunito", sans-serif;
    --font-body: "Nunito", "Luckiest Guy", sans-serif;
}

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

html,
body {
    height: 100%;
}

.lang-switcher {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 6px 10px;
    box-shadow: var(--shadow);
}

.lang-button {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

.lang-select {
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: none;
    background-size: auto;
    opacity: 0;
    animation: none;
    z-index: 0;
}

body::after {
    content: none;
    position: fixed;
    inset: -20%;
    pointer-events: none;
    background: none;
    filter: none;
    opacity: 0;
    animation: none;
    z-index: 0;
}

img {
    max-width: 100%;
    display: block;
}

.main-container {
    min-height: 100vh;
    padding: 48px 18px 90px;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

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

.wiki-hero {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.wiki-hero::before {
    content: none;
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at top, rgba(244, 63, 94, 0.2), transparent 60%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 65%);
    opacity: 0.7;
    filter: blur(18px);
}

.wiki-hero > * {
    position: relative;
    z-index: 1;
}

.wiki-top {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.wiki-title {
    display: grid;
    gap: 6px;
}

.wiki-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
}

.wiki-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.wiki-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--bg-warm);
    color: var(--text);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wiki-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.stat {
    background: var(--bg-warm);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.claim-header {
    max-width: 900px;
    margin: 24px auto 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
}

.claim-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.claim-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.claim-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

.section-logo {
    width: clamp(90px, 18vw, 150px);
    margin: 0 auto 10px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    animation: float-bob 6s ease-in-out infinite;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    letter-spacing: 0.02em;
}

.logo-line-1 {
    color: var(--text);
    display: block;
}

.logo-line-2 {
    color: var(--accent-strong);
    text-shadow: none;
    display: block;
}

.section-subtitle {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--muted);
}

.site-footer {
    margin-top: 36px;
    padding: 18px 0 12px;
}

.footer-keywords {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.section-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.meta-pill {
    background: var(--bg-warm);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: #1a0f24;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--accent-strong);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 60%);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(203, 0, 84, 0.25);
}

.btn-primary:hover::after {
    opacity: 1;
    transform: scale(1);
}

.hero-note {
    font-size: 0.9rem;
    color: var(--muted);
}

.social-proof {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--card-border);
    font-size: 0.85rem;
    color: var(--muted);
}

.social-proof .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(203, 0, 84, 0.35);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    perspective: 1200px;
}

.item-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.item-card::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: linear-gradient(120deg, rgba(203, 0, 84, 0.12), transparent 50%, rgba(255, 197, 0, 0.12));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.item-card:hover::after {
    opacity: 1;
}

.item-header {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.item-image {
    background: var(--bg-warm);
    border-radius: var(--radius-md);
    padding: 12px;
    display: grid;
    place-items: center;
    min-height: 120px;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.item-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.6), transparent 60%);
    opacity: 0.7;
    pointer-events: none;
}

.item-image img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.item-card:hover .item-image img {
    transform: translateY(-4px) scale(1.03);
}

.claim-preview {
    background: var(--bg-warm);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 1px solid var(--card-border);
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.claim-preview img {
    width: 100%;
    height: 160px;
    object-fit: contain;
}

.claim-steps {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.claim-steps .step {
    background: var(--bg-warm);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.8rem;
}

.item-info {
    text-align: center;
}

.item-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.btn {
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
}

.btn-claim {
    width: 100%;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: #1a0f24;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid var(--accent-strong);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(203, 0, 84, 0.25);
}

.btn-claim::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 60%);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-claim:hover::after {
    opacity: 1;
    transform: scale(1);
}

.btn-submit {
    width: 100%;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent), var(--accent-strong), #ff3b85);
    background-size: 220% 220%;
    color: #1a0f24;
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid var(--accent-strong);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: gradient-flow 6s ease infinite;
}

.btn-submit::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 60%);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(203, 0, 84, 0.35);
}

.btn-submit:hover::after {
    opacity: 1;
    transform: scale(1);
}

.btn-full {
    width: 100%;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 2000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 16, 0.8);
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: min(92vw, 460px);
    padding: 26px;
    box-shadow: var(--shadow-soft);
    z-index: 1;
    text-align: center;
}

.simple-modal-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.simple-modal-note {
    color: var(--muted);
    margin-bottom: 18px;
}

.form-group input {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background: #221531;
    color: var(--text);
    padding: 12px 14px;
    font-size: 1rem;
    outline: none;
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 6px;
    min-height: 1.1rem;
}

.modal-footer {
    margin-top: 18px;
}

/* iOS Popup */
.ios-popup {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-popup-background {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 12, 0.85);
}

.ios-popup-content {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: min(92vw, 420px);
    padding: 24px;
    text-align: center;
}

.ios-instruction-gif {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.ios-instruction-text h3 {
    font-family: var(--font-display);
    margin: 14px 0 8px;
}

.ios-instruction-text p {
    color: var(--muted);
}

/* Utility */
.animated-background,
.bg-item-img,
.bg-item-img img {
    display: none;
}

body.is-ready .item-card,
body.is-ready .section-header {
    animation: none;
}

.items-grid .item-card:nth-child(1) { --card-index: 1; }
.items-grid .item-card:nth-child(2) { --card-index: 2; }
.items-grid .item-card:nth-child(3) { --card-index: 3; }
.items-grid .item-card:nth-child(4) { --card-index: 4; }
.items-grid .item-card:nth-child(5) { --card-index: 5; }
.items-grid .item-card:nth-child(6) { --card-index: 6; }
.items-grid .item-card:nth-child(7) { --card-index: 7; }
.items-grid .item-card:nth-child(8) { --card-index: 8; }
.items-grid .item-card:nth-child(9) { --card-index: 9; }
.items-grid .item-card:nth-child(10) { --card-index: 10; }
.items-grid .item-card:nth-child(11) { --card-index: 11; }
.items-grid .item-card:nth-child(12) { --card-index: 12; }

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

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

@keyframes grain-drift {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-2%, -1%, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes aurora-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes hero-shimmer {
    0% { transform: translateX(-80%); }
    60% { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

@keyframes float-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }
    50% { transform: scale(1.35); box-shadow: 0 0 14px rgba(34, 197, 94, 0.9); }
}

@keyframes float-up {
    0% {
        transform: translate3d(0, 110vh, 0) rotate(0deg) scale(0.9);
        opacity: 0;
    }
    10% {
        opacity: 0.35;
    }
    100% {
        transform: translate3d(0, -130vh, 0) rotate(18deg) scale(1.05);
        opacity: 0;
    }
}

@keyframes spin-drift {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(6deg); }
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fade-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    body::before,
    body::after,
    .animated-background {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .main-container {
        padding-top: 32px;
    }

    .claim-header {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        padding: 16px;
    }

    .wiki-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-logo {
        width: clamp(110px, 26vw, 170px);
    }

    .wiki-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .item-card {
        padding: 12px;
        gap: 10px;
    }

    .item-image {
        min-height: 100px;
    }

    .footer-keywords {
        display: none;
    }
}
