/* ============================================================
   Rbx Manager — Bold & Punchy theme
   ============================================================ */

:root {
    --bg-0: #07060f;
    --bg-1: #0e0a22;
    --bg-2: #160a36;
    --accent: #a855f7;
    --accent-2: #06d4ff;
    --accent-3: #ff3d8b;
    --gold: #ffd24a;
    --gold-2: #ff9d00;
    --ink: #f6f6ff;
    --ink-soft: #c7c4d8;
    --ink-dim: #8782a3;
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(168, 85, 247, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Source Code Pro', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 15% -10%, rgba(168, 85, 247, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 110%, rgba(6, 212, 255, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 61, 139, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, var(--bg-0) 0%, #0a0820 100%);
    background-attachment: fixed;
    color: var(--ink-soft);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    position: relative;
}

/* Subtle grid overlay for that "tech" feel */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
    background-size: 52px 52px;
    pointer-events: none;
    z-index: -1;
    -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
            mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
}

body.fade-in {
    opacity: 1;
}

body.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2;
}

/* ============================================================
   Container / Hero shell
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(22, 16, 48, 0.7) 0%, rgba(10, 8, 26, 0.85) 100%);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    padding: 4rem 2rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.08),
        0 30px 80px -20px rgba(168, 85, 247, 0.3),
        0 0 120px -40px rgba(6, 212, 255, 0.18);
}

/* Glowing corner blobs */
.container::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -15%;
    width: 60%;
    height: 100%;
    background: radial-gradient(closest-side, rgba(168, 85, 247, 0.35), transparent 70%);
    pointer-events: none;
    filter: blur(50px);
    z-index: 0;
}

.container::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -15%;
    width: 60%;
    height: 100%;
    background: radial-gradient(closest-side, rgba(6, 212, 255, 0.25), transparent 70%);
    pointer-events: none;
    filter: blur(50px);
    z-index: 0;
}

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

/* ============================================================
   Eyebrow tag — small status pill above headline
   ============================================================ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--accent);
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.4);
    margin-bottom: 1.75rem;
    box-shadow: 0 0 24px -8px rgba(168, 85, 247, 0.4);
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.55; }
}

/* ============================================================
   Headlines
   ============================================================ */
h1 {
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #e3d6ff 45%, var(--accent) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.45));
}

h1::after {
    content: '';
    display: block;
    width: 90px;
    height: 4px;
    margin: 1.4rem auto 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    box-shadow: 0 0 18px var(--accent);
}

p {
    font-size: 1.125rem;
    color: var(--ink-soft);
    margin-bottom: 2.5rem;
    line-height: 1.65;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    background: linear-gradient(135deg, var(--accent) 0%, #6d28d9 100%);
    padding: 0.95rem 2.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: white;
    border: none;
    border-radius: 0.85rem;
    cursor: pointer;
    transition:
        transform 0.25s cubic-bezier(.2, .7, .2, 1),
        box-shadow 0.25s ease,
        filter 0.25s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.5rem;
    box-shadow:
        0 10px 28px -10px rgba(168, 85, 247, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 22px rgba(168, 85, 247, 0.25);
    line-height: 1;
    user-select: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Diagonal shimmer sweep */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.28) 50%,
            transparent 70%);
    transform: translateX(-110%);
    transition: transform 0.7s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
    box-shadow:
        0 16px 36px -10px rgba(168, 85, 247, 0.85),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 0 30px rgba(168, 85, 247, 0.55);
}

.btn:hover::before {
    transform: translateX(110%);
}

.btn:active {
    transform: translateY(-1px);
}

/* Premium gold variant */
.btn.premium {
    background: linear-gradient(135deg, #ffe178 0%, var(--gold) 50%, var(--gold-2) 100%);
    color: #1a0a00;
    margin-left: 0;
    box-shadow:
        0 10px 28px -10px rgba(255, 178, 0, 0.75),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25),
        0 0 24px rgba(255, 200, 0, 0.45);
}

.btn.premium:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.06);
    box-shadow:
        0 18px 40px -10px rgba(255, 178, 0, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        0 0 36px rgba(255, 200, 0, 0.75);
}

/* ============================================================
   Inline links / support row
   ============================================================ */
.links {
    margin-top: 3rem;
}

.links a {
    margin: 0 1rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.2s ease;
}

.links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.links a:hover {
    color: white;
}

.links a:hover::after {
    transform: scaleX(1);
}

.support {
    margin-top: 2rem;
}

.support a {
    display: inline-block;
    margin: 0 0.75rem;
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.support a:hover {
    color: white;
    text-shadow: 0 0 14px var(--accent-2);
}

/* ============================================================
   Feature card grid
   ============================================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 4rem;
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    transition:
        transform 0.4s cubic-bezier(.2, .7, .2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    text-align: left;
    will-change: transform;
}

/* Animated conic-gradient border, revealed on hover */
@property --card-ang {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--card-ang),
            transparent 0deg,
            var(--accent) 80deg,
            var(--accent-2) 160deg,
            transparent 240deg,
            transparent 360deg);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    animation: spinCardBorder 5s linear infinite;
}

@keyframes spinCardBorder {
    to { --card-ang: 360deg; }
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 22px 44px -12px rgba(168, 85, 247, 0.45);
}

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

.card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.card p {
    font-size: 0.92rem;
    color: var(--ink-dim);
    margin: 0;
    text-align: left;
    line-height: 1.55;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.button-group .btn {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon {
    font-size: 1.5rem;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(6, 212, 255, 0.12));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 0.75rem;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.4));
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    margin-top: 5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--ink-dim);
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 6, 15, 0.85);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: linear-gradient(180deg, #160d36 0%, #0a0820 100%);
    color: var(--ink-soft);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-soft);
    box-shadow: 0 30px 80px -20px rgba(168, 85, 247, 0.5);
    position: relative;
    font-size: 1rem;
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #1c1c2e;
}

.modal-container h1,
.modal-container h2 {
    color: white;
    -webkit-text-fill-color: white;
    filter: none;
    text-transform: none;
    background: none;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.modal-container h1::after,
.modal-container h2::after {
    display: none;
}

.modal-container ul {
    padding-left: 1.5rem;
}

.modal-container li {
    margin-bottom: 0.5rem;
}

#closeModal {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    border-radius: 0.5rem;
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#closeModal:hover {
    color: white;
    background: rgba(168, 85, 247, 0.18);
    border-color: var(--accent);
}

.modal-container::-webkit-scrollbar {
    width: 10px;
}

.modal-container::-webkit-scrollbar-track {
    background: #1c1c2e;
    border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 10px;
    border: 2px solid #1c1c2e;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background-color: #c084fc;
}

/* ============================================================
   Avatars
   ============================================================ */
.avatars {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: relative;
    padding-left: 10px;
}

.avatars a {
    display: inline-block;
    border: 2px solid var(--accent);
    border-radius: 50%;
    overflow: hidden;
    width: 36px;
    height: 36px;
    box-sizing: content-box;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}

.avatars a:not(:first-child) {
    margin-left: -10px;
    z-index: 0;
}

.avatars a:hover {
    z-index: 10;
    transform: scale(1.3);
    border-color: var(--accent-2);
    box-shadow: 0 0 22px rgba(6, 212, 255, 0.6);
}

.avatars img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   Premium-button particle canvas (used by index)
   ============================================================ */
#premiumParticles {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* ============================================================
   Premium page – badges & feature list (no grid)
   ============================================================ */
.badges {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(6, 212, 255, 0.08);
    color: var(--accent-2);
    border: 1px solid rgba(6, 212, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.feature-list {
    text-align: left;
    margin-top: 1.5rem;
    padding-left: 0;
    list-style: none;
}

.feature-list li {
    margin: 0.6rem 0;
    font-size: 0.98rem;
    color: var(--ink-soft);
    opacity: 0;
    transform: translateY(12px);
    animation: reveal 0.6s ease forwards;
    padding-left: 1.7rem;
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-2);
    font-weight: 800;
    text-shadow: 0 0 12px var(--accent-2);
}

.feature-list li:nth-child(1) { animation-delay: 0.08s; }
.feature-list li:nth-child(2) { animation-delay: 0.18s; }
.feature-list li:nth-child(3) { animation-delay: 0.28s; }
.feature-list li:nth-child(4) { animation-delay: 0.38s; }
.feature-list li:nth-child(5) { animation-delay: 0.48s; }

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 2.5rem 1.25rem;
    }

    .button-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        width: 100%;
    }

    .button-group .btn {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
    }

    .btn.premium {
        margin-left: 0 !important;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .eyebrow {
        letter-spacing: 0.18em;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
