:root {
    --bg: #0e1621;
    --surface: #17212b;
    --surface2: #1e2c3a;
    --accent: #9b59b6;
    --accent-soft: rgba(155, 89, 182, 0.24);
    --text: #e4e6eb;
    --text-muted: #8b9bab;
    --border: #2b2f36;
    --radius: 16px;
    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

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

html, body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    background-image:
        radial-gradient(700px 380px at 10% -10%, rgba(155, 89, 182, 0.14), transparent 62%),
        radial-gradient(620px 330px at 100% 0%, rgba(155, 89, 182, 0.08), transparent 62%);
}

/* BG SHAPES */
.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.2;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #8e4bd1;
    top: -100px;
    right: -100px;
    animation: float1 8s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #6a6eff;
    bottom: -50px;
    left: -100px;
    animation: float2 10s ease-in-out infinite;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #9b59b6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* LAYOUT */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 60px;
}

.hidden {
    display: none !important;
}

/* HEADER */
header {
    width: 100%;
    max-width: 760px;
    padding: 28px 0 14px;
    display: flex;
    align-items: center;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    box-shadow: 0 10px 26px rgba(155, 89, 182, 0.35);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.5px;
}

/* JACK BUBBLE */
.jack-bubble {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 26px 0 22px;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.7) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.jack-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(155, 89, 182, 0.4);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    animation: wagTail 2.2s ease-in-out infinite;
    transform-origin: bottom center;
}
.jack-avatar-img {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes wagTail {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px 18px 18px 4px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
    max-width: 320px;
    position: relative;
}

/* HERO */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 760px;
    width: 100%;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 6vw, 46px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin-bottom: 20px;
    animation: fadeUp 0.7s 0.2s both;
}

h1 br { display: block; }

.subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 36px;
    animation: fadeUp 0.7s 0.3s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FEATURES */
.features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
    animation: fadeUp 0.7s 0.4s both;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
}

.feature-icon {
    font-size: 16px;
}

/* BUTTONS */
.btn-download, .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.7s 0.5s both;
}

.btn-download {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(155, 89, 182, 0.42);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(155, 89, 182, 0.42);
}

.btn-download:hover, .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 30px rgba(155, 89, 182, 0.5);
}

.btn-download:active, .btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    font-size: 18px;
}

.platform-note {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
    animation: fadeUp 0.7s 0.6s both;
}

/* ADD PAGE */
.add-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.invite-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 40px;
    margin-bottom: 32px;
    width: 100%;
    animation: popIn 0.6s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

.invite-avatar {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 1px solid rgba(155, 89, 182, 0.5);
}
.invite-avatar-img {
    width: 100%;
    height: 100%;
    display: block;
}

.invite-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.invite-username {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: #bc78d8;
    margin-bottom: 8px;
}

.invite-sub {
    font-size: 15px;
    color: var(--text-muted);
}

.install-prompt {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

.hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 400px) {
    .features {
        flex-direction: column;
        align-items: center;
    }

    .invite-card {
        padding: 24px 20px;
    }
}
