/* ───────────────────────────────────────────────
   LIGHT THEME — Smooth White / Black
──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Luckiest+Guy&display=swap');

:root {
    --bg: #f4f6fa;
    --bg-accent: #eef1f8;
    --bg-warm: #ffffff;
    --card: #ffffff;
    --card-border: #e2e8f2;
    --text: #0d1117;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-light: rgba(37, 99, 235, 0.1);
    --danger: #dc2626;
    --success: #16a34a;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 16px 40px rgba(37, 99, 235, 0.16);
    --font-display: "Luckiest Guy", "Inter", sans-serif;
    --font-body: "Inter", sans-serif;
}

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

html, body {
    height: 100%;
}

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

/* subtle background texture */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    z-index: 0;
}

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

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

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

/* ─── LANG SWITCHER ───────────────────────────── */
.lang-switcher {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 6px 12px;
    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;
    font-size: 0.85rem;
}

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

/* ─── SECTION HEADER ──────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.wiki-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 50%, #f0f4fe 100%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.wiki-hero::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.06), transparent 70%);
    pointer-events: none;
}

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

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

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

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

.section-logo {
    width: clamp(80px, 16vw, 130px);
    border-radius: 18px;
    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(2rem, 5.5vw, 3.4rem);
    letter-spacing: 0.02em;
    color: var(--text);
}

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

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

.section-subtitle {
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
}

/* ─── HERO ACTIONS ────────────────────────────── */
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 13px 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}

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

/* ─── SOCIAL PROOF ────────────────────────────── */
.social-proof {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    font-size: 0.84rem;
    color: var(--muted);
    font-weight: 500;
}

.social-proof .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

/* ─── ITEMS GRID ──────────────────────────────── */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.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.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.25);
}

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

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

.item-image {
    background: linear-gradient(160deg, #f8faff 0%, #f0f4fe 100%);
    border-radius: var(--radius-md);
    padding: 14px;
    display: grid;
    place-items: center;
    min-height: 120px;
    border: 1px solid rgba(37, 99, 235, 0.08);
    position: relative;
}

.item-image img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.item-card:hover .item-image img {
    transform: translateY(-6px) scale(1.06);
    filter: drop-shadow(0 8px 20px rgba(37, 99, 235, 0.2));
}

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

.item-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s ease;
}

.item-card:hover .item-name {
    color: var(--accent);
}

/* ─── BUTTONS ─────────────────────────────────── */
.btn {
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-claim {
    width: 100%;
    padding: 11px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.03em;
}

.btn-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.btn-submit {
    width: 100%;
    padding: 13px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.97rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.03em;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
}

/* ─── MODAL BASE ──────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 2000;
    padding: 16px;
}

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

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    width: min(94vw, 480px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
    z-index: 1;
    overflow: hidden;
    animation: modal-in 0.25s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}

/* modal header */
.modal-header {
    padding: 22px 24px 0;
    text-align: center;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 0 24px 22px;
}

/* step wizard dots */
.step-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-border);
    transition: background 0.3s ease, transform 0.3s ease;
}

.step-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

.step-dot.done {
    background: var(--success);
}

/* ─── MODAL STEPS ─────────────────────────────── */
.modal-step {
    display: none;
}

.modal-step.visible {
    display: block;
}

/* Step 1 - username */
.simple-modal-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    color: var(--text);
    margin-bottom: 6px;
    text-align: center;
}

.simple-modal-note {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 500;
}

.form-group {
    margin-bottom: 4px;
}

.form-group input {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--card-border);
    background: #f8fafc;
    color: var(--text);
    padding: 12px 14px;
    font-size: 1rem;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

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

/* ─── STEP 2: Roblox Profile ──────────────────── */
.roblox-profile-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0 10px;
}

.roblox-avatar-wrap {
    position: relative;
}

.roblox-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.25);
}

.roblox-avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--card-border);
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.roblox-verified-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
    font-weight: 800;
}

.roblox-display-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
}

.roblox-username-tag {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

/* Claiming steps checklist */
.claim-steps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 16px 0;
}

.claim-step-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.3s ease;
}

.claim-step-row.done {
    background: rgba(22, 163, 74, 0.07);
    border-color: rgba(22, 163, 74, 0.25);
    color: var(--text);
}

.claim-step-row.active {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--text);
}

.step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: all 0.35s ease;
}

.claim-step-row.done .step-icon {
    background: var(--success);
    color: white;
}

.claim-step-row.active .step-icon {
    background: var(--accent);
    color: white;
    animation: spin-once 0.6s ease;
}

@keyframes spin-once {
    from { transform: rotate(-90deg) scale(0.8); }
    to   { transform: rotate(0deg)   scale(1); }
}

/* ─── STEP 3: Ready ───────────────────────────── */
.ready-box {
    text-align: center;
    padding: 12px 0 8px;
}

.ready-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    animation: bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.ready-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    color: var(--text);
    margin-bottom: 6px;
}

.ready-subtitle {
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 18px;
}

.ready-item-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    text-align: left;
}

.ready-item-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}

.ready-item-info {
    flex: 1;
}

.ready-item-name {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--text);
}

.ready-player-row {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 500;
}

/* continue button danger/red for urgency */
.btn-continue {
    width: 100%;
    padding: 14px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 18px rgba(22, 163, 74, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(22, 163, 74, 0.45);
}

/* ─── SPINNER ─────────────────────────────────── */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--card-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

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

.loading-text {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 20px 0 10px;
}

/* ─── 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(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
}

.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;
    box-shadow: var(--shadow-soft);
}

.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);
    color: var(--text);
    margin: 14px 0 8px;
}

.ios-instruction-text p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ─── FOOTER ──────────────────────────────────── */
.site-footer {
    margin-top: 36px;
    padding: 18px 0 12px;
    border-top: 1px solid var(--card-border);
}

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

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

.stat {
    background: #f8fafc;
    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.15rem;
    color: var(--accent);
}

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

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

/* ─── ANIMATIONS ──────────────────────────────── */
@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(22, 163, 74, 0.5); }
    50%       { transform: scale(1.35); box-shadow: 0 0 16px rgba(22, 163, 74, 0.85); }
}

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

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
    .main-container { padding-top: 32px; }
    .wiki-top { flex-direction: column; align-items: flex-start; }
    .section-logo { width: clamp(90px, 24vw, 140px); }
    .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; }
}

@media (max-width: 420px) {
    .items-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}