.resources-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(196, 181, 253, 0.24), transparent 24%),
        radial-gradient(circle at top right, rgba(125, 211, 252, 0.16), transparent 22%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f8fafc 100%);
}

.resources-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, rgba(124, 92, 255, 0.08), rgba(167, 139, 250, 0.1), rgba(237, 233, 254, 0.15));
    background-size: 200% 200%;
    animation: resourcesGradientShift 18s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.resources-shell {
    max-width: 1160px;
    margin: 0 auto;
    padding: 2rem 1.25rem 5rem;
    position: relative;
    z-index: 1;
}

.resources-hero {
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    padding: 4rem 2rem 2.4rem;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 52%, rgba(238, 242, 255, 0.95) 100%);
    box-shadow:
        0 28px 70px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    isolation: isolate;
}

.resources-hero::before,
.resources-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.resources-hero::before {
    width: 300px;
    height: 300px;
    top: -105px;
    right: -70px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.28), transparent 70%);
}

.resources-hero::after {
    width: 250px;
    height: 250px;
    left: -70px;
    bottom: -110px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 72%);
}

.resources-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 1.5rem;
}

.resources-hero-content {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resources-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(59, 130, 246, 0.1));
    color: #5b21b6;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.resources-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8b5cf6, #38bdf8);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.resources-hero h1 {
    margin: 1rem 0 0.85rem;
    font-size: clamp(2.45rem, 5vw, 4.3rem);
    line-height: 1;
    letter-spacing: -0.05em;
    color: #0f172a;
    white-space: nowrap;
}

.resources-hero p {
    max-width: 680px;
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.7;
    color: #475569;
}

.resources-search-wrap {
    margin-top: 1.75rem;
    max-width: 640px;
    width: 100%;
}

.resources-mode-toggle {
    margin-top: 1.5rem;
    display: inline-flex;
    padding: 0.18rem;
    border-radius: 999px;
    background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.16), transparent 55%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 55%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(20px);
}

.resources-mode-toggle-btn {
    position: relative;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.18s ease;
}

.resources-mode-toggle-btn.is-active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}

.resources-mode-toggle-btn:not(.is-active):hover {
    color: #334155;
}

.resources-search-shell {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.05rem 1rem 1.15rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.resources-search-shell:focus-within {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.32);
    box-shadow: 0 22px 50px rgba(99, 102, 241, 0.1);
}

.resources-search-shell svg {
    color: #7c3aed;
}

.resources-search-field {
    position: relative;
    width: 100%;
}

.resources-search-shell input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #0f172a;
    position: relative;
    z-index: 2;
}

.resources-search-shell input::placeholder {
    color: #94a3b8;
}

.resources-search-typing {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.resources-search-typing::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 1.05em;
    margin-left: 3px;
    vertical-align: -0.18em;
    background: #7c3aed;
    animation: resourcesCaretBlink 1s step-end infinite;
}

.resources-search-typing.is-hidden {
    opacity: 0;
}

.resources-floating-chips {
    width: min(100%, 980px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.hero-floating-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        background 0.22s ease,
        opacity 0.22s ease;
}

.resources-page-ready .hero-floating-chip {
    animation:
        chipReveal 0.55s ease forwards,
        heroFloat 6.8s ease-in-out infinite;
    animation-delay: var(--chip-delay), calc(var(--chip-delay) + var(--chip-offset));
}

.hero-floating-chip:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
    border-color: rgba(124, 58, 237, 0.28);
    color: #5b21b6;
}

.hero-floating-chip.is-active {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 22px 46px rgba(109, 40, 217, 0.28);
}

.hero-floating-chip.is-muted {
    opacity: 0.58;
}

.hero-chip-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    flex-shrink: 0;
}

.hero-floating-chip.is-active .hero-chip-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero-floating-chip.tone-violet .hero-chip-icon { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.hero-floating-chip.tone-sky .hero-chip-icon { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.hero-floating-chip.tone-amber .hero-chip-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.hero-floating-chip.tone-pink .hero-chip-icon { background: linear-gradient(135deg, #ec4899, #f472b6); }
.hero-floating-chip.tone-indigo .hero-chip-icon { background: linear-gradient(135deg, #6366f1, #4338ca); }
.hero-floating-chip.tone-emerald .hero-chip-icon { background: linear-gradient(135deg, #10b981, #34d399); }
.hero-floating-chip.tone-slate .hero-chip-icon { background: linear-gradient(135deg, #334155, #64748b); }
.hero-floating-chip.tone-cyan .hero-chip-icon { background: linear-gradient(135deg, #06b6d4, #22d3ee); }

.resources-section {
    margin-top: 2rem;
}

.resource-unlock-wrap {
    display: flex;
    justify-content: center;
}

.resource-unlock-card {
    width: min(100%, 760px);
    padding: 2rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.99));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.08);
}

.resource-unlock-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.25rem;
}

.resource-unlock-top h2 {
    margin: 0 0 0.4rem;
    font-size: 1.8rem;
    color: #0f172a;
}

.resource-unlock-top p {
    margin: 0;
    color: #64748b;
}

.resource-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    background: rgba(124, 58, 237, 0.08);
    color: #6d28d9;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.resource-unlock-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.9rem;
}

.resource-input {
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #fff;
    padding: 0 1rem;
    font-size: 1rem;
    color: #0f172a;
}

.resource-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.14);
}

.resource-download-btn {
    min-width: 220px;
    min-height: 58px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
    cursor: pointer;
}

.resource-download-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.24);
}

.resource-download-btn:disabled {
    cursor: wait;
    opacity: 0.82;
}

.resource-unlock-message {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.resource-unlock-message.success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.resource-unlock-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.resource-note {
    margin-top: 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

.reveal-seq {
    opacity: 0;
    transform: translateY(24px);
}

.resources-page-ready .resources-hero-title {
    animation: revealUp 0.7s ease forwards;
}

.resources-page-ready .resources-hero-subtitle {
    animation: revealUp 0.7s ease 0.2s forwards;
}

.resources-page-ready .resources-search-wrap.reveal-seq {
    animation: revealScale 0.7s ease 0.35s forwards;
}

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

@keyframes resourcesCaretBlink {
    50% { opacity: 0; }
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealScale {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chipReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 900px) {
    .resources-hero h1 {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .resources-shell {
        padding: 1rem 0.9rem 4rem;
    }

    .resources-hero {
        padding: 2.35rem 1rem 1.35rem;
        border-radius: 22px;
        margin-top: 0.6rem;
    }

    .resources-hero-grid {
        gap: 1rem;
    }

    .resources-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.76rem;
    }

    .resources-badge::before {
        width: 7px;
        height: 7px;
    }

    .resources-hero h1 {
        margin: 0.8rem 0 0.65rem;
        font-size: clamp(1.9rem, 8vw, 2.45rem);
        line-height: 1.02;
    }

    .resources-hero p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .resources-search-wrap {
        margin-top: 1.15rem;
    }

    .resources-mode-toggle {
        margin-top: 1.1rem;
        padding: 0.14rem;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    }

    .resources-mode-toggle-btn {
        flex: 1;
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .resources-search-shell {
        padding: 0.8rem 0.9rem;
        border-radius: 16px;
    }

    .resources-search-shell input,
    .resources-search-typing {
        font-size: 0.92rem;
    }

    .resources-floating-chips {
        width: 100%;
        gap: 0.55rem;
        margin-top: 0.7rem;
    }

    .hero-floating-chip {
        padding: 0.48rem 0.68rem;
        gap: 0.4rem;
        font-size: 0.76rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .resources-page-ready .hero-floating-chip {
        animation:
            chipReveal 0.45s ease forwards,
            heroFloat 5.8s ease-in-out infinite;
    }

    .hero-chip-icon {
        width: 22px;
        height: 22px;
        font-size: 0.56rem;
    }

    .resource-unlock-card {
        padding: 1.25rem;
        border-radius: 22px;
    }

    .resource-unlock-top {
        flex-direction: column;
    }

    .resource-unlock-form {
        grid-template-columns: 1fr;
    }

    .resource-download-btn {
        min-width: 0;
        width: 100%;
    }
}
