/* Tavu link pages - shared design system based on tavuapp.com */

:root {
    --primary: #242D35;
    --surface: #1A2128;
    --surface-light: #2F3A44;
    --accent: #CC12C8;
    --accent-light: #F0A6EE;
    --text: #FFFFFF;
    --muted: #9CA8B4;
}

::selection {
    background: rgba(204, 18, 200, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e015dc;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary);
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

button,
nav {
    user-select: none;
    -webkit-user-select: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Background ── */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.page-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 50% 20%, rgba(204, 18, 200, 0.1) 0%, transparent 62%);
}

.orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
}

.orb-one {
    top: -60px;
    left: 50%;
    width: 520px;
    height: 520px;
    margin-left: -260px;
    background: rgba(204, 18, 200, 0.18);
}

.orb-two {
    bottom: -140px;
    right: -120px;
    width: 420px;
    height: 420px;
    background: rgba(204, 18, 200, 0.1);
    animation-delay: 2s;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ── Header & footer ── */
.site-header {
    position: relative;
    z-index: 20;
    background: rgba(26, 33, 40, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #C3CBD5;
    background: rgba(47, 58, 68, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(204, 18, 200, 0.8);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.site-footer {
    position: relative;
    z-index: 10;
    background: rgba(26, 33, 40, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
}

.site-footer a {
    color: #8D98A5;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--accent-light);
}

/* ── Glass & text helpers ── */
.glass {
    background: rgba(47, 58, 68, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(26, 33, 40, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(204, 18, 200, 0.2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 60px rgba(204, 18, 200, 0.08);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #CC12C8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #C9D1DA;
    background: rgba(47, 58, 68, 0.4);
    border: 1px solid rgba(204, 18, 200, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pill svg {
    width: 14px;
    height: 14px;
    color: var(--accent-light);
}

/* ── Card states ── */
.state {
    display: flex;
    flex-direction: column;
}

.spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);
    animation: spin 0.9s linear infinite;
}

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

.avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(204, 18, 200, 0.35), rgba(204, 18, 200, 0.08));
    border: 1px solid rgba(204, 18, 200, 0.35);
    box-shadow: 0 0 40px rgba(204, 18, 200, 0.25), inset 0 0 24px rgba(204, 18, 200, 0.08);
}

.handle {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}

.handle-inline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: #fff;
    overflow-wrap: anywhere;
}

.group-avatar {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(204, 18, 200, 0.35), rgba(204, 18, 200, 0.08));
    border: 1px solid rgba(204, 18, 200, 0.35);
    box-shadow: 0 0 40px rgba(204, 18, 200, 0.22), inset 0 0 24px rgba(204, 18, 200, 0.08);
}

.group-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.group-initials {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.group-name {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(204, 18, 200, 0.1);
    border: 1px solid rgba(204, 18, 200, 0.35);
}

.badge svg {
    width: 14px;
    height: 14px;
}

.state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.state-icon svg {
    width: 30px;
    height: 30px;
}

.state-icon.danger {
    color: #FF8AA3;
    background: rgba(255, 77, 109, 0.08);
    border-color: rgba(255, 77, 109, 0.28);
}

.state-icon.warning {
    color: #FFCE7A;
    background: rgba(255, 176, 50, 0.08);
    border-color: rgba(255, 176, 50, 0.28);
}

.state-icon.neutral {
    color: var(--accent-light);
    background: rgba(204, 18, 200, 0.08);
    border-color: rgba(204, 18, 200, 0.28);
}

.state-title {
    margin: 0 0 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.state-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
    text-align: center;
}


/* ── Actions ── */
.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 22px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: #d915d4;
    box-shadow: 0 0 40px rgba(204, 18, 200, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.99);
}

.btn-secondary {
    background: rgba(47, 58, 68, 0.5);
    color: #E6EAF0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    color: #fff;
    background: rgba(204, 18, 200, 0.08);
    border-color: rgba(204, 18, 200, 0.45);
}

.btn-primary svg,
.btn-secondary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hint {
    margin: 14px 0 0;
    color: #8A95A2;
    font-size: 0.75rem;
    line-height: 1.6;
    text-align: center;
}

/* ── QR panel ── */
.qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* margin-top: 15px;
    padding-top: 15px; */
    /* border-top: 1px solid rgba(255, 255, 255, 0.08); */
}

.qr-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9CA8B4;
}

.qr-title svg {
    width: 15px;
    height: 15px;
    color: var(--accent-light);
}

.qr-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    margin-top: 14px;
    padding: 8px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    overflow: hidden;
}

.qr-box svg,
.qr-box img {
    display: block;
    width: 100%;
    height: 100%;
}

.qr-fallback {
    padding: 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: #1A2128;
}

.qr-url {
    max-width: 100%;
    margin: 12px 0 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
    color: #8A95A2;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.qr-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(47, 58, 68, 0.5);
    color: #C9D1DA;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.qr-copy:hover {
    color: #fff;
    background: rgba(204, 18, 200, 0.08);
    border-color: rgba(204, 18, 200, 0.45);
}

.qr-copy svg {
    width: 14px;
    height: 14px;
}

.qr-help {
    margin: 10px 0 0;
    font-size: 0.7rem;
    line-height: 1.5;
    text-align: center;
    color: #7C8794;
}

/* ── Attempt hint ── */
.attempt-hint {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.78rem;
    line-height: 1.6;
    color: #EBD9EA;
    background: rgba(204, 18, 200, 0.08);
    border: 1px solid rgba(204, 18, 200, 0.25);
    animation: fadeUp 0.35s ease both;
}

.attempt-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-light);
}

/* ── Trust chips ── */
.trust-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    margin-top: 22px;
    font-size: 0.72rem;
    color: #8A95A2;
}

.trust-chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trust-chips svg {
    width: 14px;
    height: 14px;
    color: var(--accent-light);
    opacity: 0.9;
}

.noscript {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: center;
    color: #EBD9EA;
    background: rgba(204, 18, 200, 0.08);
    border: 1px solid rgba(204, 18, 200, 0.25);
}

.noscript a {
    color: var(--accent-light);
    text-decoration: underline;
}


/* ── Skeletons (join page) ── */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.13) 37%, rgba(255, 255, 255, 0.05) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

.skeleton-avatar {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    border-radius: 28px;
}

.skeleton-line {
    height: 13px;
    border-radius: 999px;
    margin: 10px auto 0;
}

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

    100% {
        background-position: 0 50%;
    }
}

/* ── Entrance animations ── */
.reveal {
    animation: fadeUp 0.7s cubic-bezier(0.22, 0.68, 0, 1.1) both;
}

.reveal-delay-1 {
    animation-delay: 0.1s;
}

.reveal-delay-2 {
    animation-delay: 0.2s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

