* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.panel {
    background-color: #f5f5dc;
    width: 100%;
    padding: 22px 18px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.heading {
    font-size: 22px;
    font-weight: bold;
    color: #000;
    text-align: left;
    margin-bottom: 4px;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content p {
    font-size: 13px;
    line-height: 1.5;
    color: #000;
    text-align: left;
}

.waiting-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    width: 100%;
    text-align: center;
}

.waiting-text {
    font-size: 16px;
    color: #000;
    font-weight: 500;
    text-align: center;
}

.authorize-text {
    font-size: 14px;
    color: #000;
    text-align: center;
    line-height: 1.45;
}

.authorize-text.queue-full-message {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    color: #1a1a1a;
    max-width: 28em;
    margin-left: auto;
    margin-right: auto;
}

.continue-button {
    width: 100%;
    max-width: 500px;
    background-color: #000;
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.continue-button:hover {
    background-color: #333;
}

.continue-button:active {
    background-color: #1a1a1a;
}

.continue-button:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.continue-button:disabled:hover {
    background-color: #666;
}

.arrow {
    font-size: 18px;
    font-weight: bold;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader.loader-dark {
    border-color: #111;
    border-top-color: transparent;
}

.waiting-section .loader {
    margin-bottom: 2px;
}

.retry-button {
    margin-top: 10px;
}

.reopen-auth-button {
    margin-top: 12px;
    background: #fff;
    color: #111;
    border: 2px solid #111;
}

.reopen-auth-button:hover:not(:disabled) {
    background: #f5f5f5;
}

.reopen-auth-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.premium .reopen-auth-button {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

body.meta-page .facebook-button {
    background-color: #1877f2;
    gap: 12px;
}

body.meta-page .facebook-button:hover {
    background-color: #166fe5;
}

body.meta-page .facebook-button:active {
    background-color: #1464d6;
}

body.meta-page .facebook-button:disabled {
    background-color: #1877f2;
    opacity: 0.7;
}

body.meta-page .facebook-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

body.meta-page .meta-error {
    width: 100%;
    max-width: 500px;
    font-size: 14px;
    color: #b00020;
    text-align: center;
}

body.meta-page .meta-qr-panel,
body.meta-page .meta-success-panel {
    align-items: center;
    text-align: center;
}

body.meta-page .meta-qr-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

body.meta-page .meta-qr-image {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    background: #fff;
}

body.meta-page .meta-nonce {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #333;
}

body.meta-page .meta-status {
    font-size: 14px;
    color: #555;
}

body.meta-page .meta-open-button {
    margin-top: 0;
}

body.meta-page .meta-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

body.meta-page .meta-profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}

body.meta-page .meta-profile-username {
    font-size: 14px;
    color: #555;
}

body.meta-page .meta-close-button,
body.premium .meta-close-button {
    background: #fff;
    color: #111;
    border: 2px solid #111;
    box-shadow: none;
}

body.meta-page .meta-close-button:hover:not(:disabled),
body.premium .meta-close-button:hover:not(:disabled) {
    background: #f5f5f5;
    box-shadow: none;
    transform: none;
}

body.meta-page .meta-close-button:disabled,
body.premium .meta-close-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Facebook auth button */
.facebook-button {
    background-color: #1877f2;
    gap: 12px;
}

.facebook-button:hover {
    background-color: #166fe5;
}

.facebook-button:active {
    background-color: #1464d6;
}

.facebook-button:disabled {
    background-color: #1877f2;
    opacity: 0.7;
}

.facebook-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-divider {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #999;
    font-size: 12px;
    margin: -4px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

.fb-success-panel {
    align-items: center;
    text-align: center;
}

.fb-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.fb-profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}

.fb-profile-username {
    font-size: 14px;
    color: #555;
}

.fb-close-button,
body.premium .fb-close-button {
    background: #fff;
    color: #111;
    border: 2px solid #111;
    box-shadow: none;
}

.fb-close-button:hover:not(:disabled),
body.premium .fb-close-button:hover:not(:disabled) {
    background: #f5f5f5;
    box-shadow: none;
    transform: none;
}

.fb-close-button:disabled,
body.premium .fb-close-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Identity verification */
.verify-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.verify-sending {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    width: 100%;
}

.verify-sending p {
    font-size: 14px;
    color: #333;
    text-align: center;
    line-height: 1.45;
}

.verify-detail {
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    text-align: center;
    width: 100%;
}

.verify-dest {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    text-align: center;
    width: 100%;
    word-break: break-all;
    background: none;
    border: none;
    padding: 0;
}

.verify-error {
    font-size: 13px;
    color: #b00020;
    text-align: center;
    width: 100%;
}

.verify-code-input {
    width: 100%;
    padding: 14px 12px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-align: center;
    border: 1px solid #111;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
}

.verify-code-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.verify-code-input:disabled {
    opacity: 0.6;
}

.verify-section .continue-button {
    max-width: none;
}

.verify-resend-button {
    background: none;
    border: none;
    color: #444;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
    text-align: center;
    width: 100%;
}

.verify-resend-button:hover:not(:disabled) {
    color: #000;
}

.verify-resend-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Premium styles for indexen.html and index1.html */
body.premium {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

body.premium .panel {
    background: #ffffff;
    padding: 32px 24px;
    border-radius: 12px;
    gap: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.premium .heading {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

body.premium .content p {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4a4a;
}

body.premium .content p:first-child {
    color: #1a1a1a;
    font-weight: 500;
}

body.premium .waiting-section {
    gap: 6px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.premium .waiting-text {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.premium .authorize-text {
    font-size: 14px;
    color: #4a4a4a;
    font-weight: 400;
}

body.premium .continue-button {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    padding: 18px 28px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.2px;
}

body.premium .continue-button:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

body.premium .continue-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    body {
        padding: 20px;
    }

    .container {
        gap: 20px;
    }

    .panel {
        padding: 40px 30px;
        gap: 20px;
    }

    .heading {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .content {
        gap: 15px;
    }

    .content p {
        font-size: 15px;
        line-height: 1.6;
    }

    .continue-button {
        padding: 18px 28px;
        font-size: 17px;
    }

    .auth-divider {
        margin: 0;
    }

    body.premium .panel {
        padding: 40px 36px;
    }

    body.premium .heading {
        font-size: 30px;
    }

    body.premium .content p {
        font-size: 16px;
    }

    body.premium .continue-button {
        padding: 20px 32px;
        font-size: 17px;
    }
}

/* Profile page styles */
.profile-container {
    max-width: 600px;
}

.profile-panel {
    background-color: #f5f5dc;
    width: 100%;
    padding: 40px 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-name {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    text-align: center;
    margin: 0;
}

.profile-description {
    font-size: 16px;
    color: #4a4a4a;
    text-align: center;
    line-height: 1.6;
    margin: 0;
    max-width: 500px;
}

.whatsapp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.whatsapp-text {
    font-size: 16px;
    color: #000;
    text-align: center;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.whatsapp-button {
    width: 100%;
    max-width: 400px;
    background-color: #25D366;
    color: #fff;
    border: none;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-button:hover {
    background-color: #20BA5A;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.whatsapp-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Tablet and larger screens for profile */
@media (min-width: 768px) {
    .profile-panel {
        padding: 50px 40px;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
    }

    .profile-name {
        font-size: 32px;
    }

    .profile-description {
        font-size: 18px;
    }

    .whatsapp-text {
        font-size: 18px;
    }

    .whatsapp-button {
        padding: 20px 36px;
        font-size: 19px;
    }
}

/* Home — Wrapped-inspired */
body.home {
    position: relative;
    overflow-x: clip;
    align-items: stretch;
    justify-content: center;
    min-height: 100dvh;
    padding: 20px 20px calc(18px + env(safe-area-inset-bottom));
    background: #f3eadb;
    font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

body.home .container {
    position: relative;
    z-index: 1;
    min-height: calc(100dvh - 32px - env(safe-area-inset-bottom));
    justify-content: space-between;
    gap: 16px;
}

body.home .home-main {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-height: 0;
}

body.home .home-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
}

.orb-cyan {
    width: 280px;
    height: 280px;
    background: #25f4ee;
    top: -80px;
    right: -60px;
}

.orb-pink {
    width: 320px;
    height: 320px;
    background: #fe2c55;
    bottom: -100px;
    left: -80px;
}

.particle {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    opacity: 0.7;
    animation: float-particle 12s ease-in-out infinite;
}

.particle:nth-child(odd) {
    background: #fe2c55;
}

.particle:nth-child(even) {
    background: #25f4ee;
}

.particle:nth-child(3) { top: 12%; left: 18%; animation-delay: 0s; width: 5px; height: 5px; }
.particle:nth-child(4) { top: 22%; left: 78%; animation-delay: 1.2s; }
.particle:nth-child(5) { top: 38%; left: 8%; animation-delay: 2.4s; width: 4px; height: 4px; }
.particle:nth-child(6) { top: 48%; left: 88%; animation-delay: 0.6s; }
.particle:nth-child(7) { top: 62%; left: 16%; animation-delay: 3s; width: 6px; height: 6px; }
.particle:nth-child(8) { top: 70%; left: 72%; animation-delay: 1.8s; }
.particle:nth-child(9) { top: 82%; left: 28%; animation-delay: 2.1s; width: 5px; height: 5px; }
.particle:nth-child(10) { top: 18%; left: 52%; animation-delay: 4s; }
.particle:nth-child(11) { top: 55%; left: 44%; animation-delay: 2.8s; width: 4px; height: 4px; }
.particle:nth-child(12) { top: 88%; left: 58%; animation-delay: 1s; }
.particle:nth-child(13) { top: 8%; left: 36%; animation-delay: 3.4s; }
.particle:nth-child(14) { top: 74%; left: 90%; animation-delay: 0.4s; width: 6px; height: 6px; }

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0); opacity: 0.35; }
    50% { transform: translate(12px, -18px); opacity: 0.85; }
}

body.home .brand-badge {
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 7px 12px;
    border-radius: 0;
    align-self: flex-start;
}

body.home .home-hero {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

body.home .heading {
    text-align: left;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(42px, 12vw, 64px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    width: 100%;
    margin: 0;
}

body.home .lede {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    color: #222;
    max-width: 18em;
}

body.home .stats-card {
    margin-top: 8px;
    background: #111;
    color: #fff;
    padding: 22px 20px 18px;
    width: 100%;
    background-image: repeating-linear-gradient(
        -12deg,
        transparent,
        transparent 18px,
        rgba(255, 255, 255, 0.03) 18px,
        rgba(255, 255, 255, 0.03) 20px
    );
}

body.home .stats-card-title {
    font-family: Fraunces, Georgia, serif;
    color: #ffe566;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
}

body.home .stats-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.62);
}

body.home .stats-value {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.08em;
}

body.home .stats-card-hint {
    margin: 14px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

body.home .continue-button {
    border-radius: 0;
    padding: 18px 24px;
    font-weight: 700;
}

body.home .tiktok-cta {
    background: #111;
    color: #fff;
    font-size: 18px;
    min-height: 58px;
    letter-spacing: 0.01em;
    box-shadow: none;
    animation: none;
}

body.home .tiktok-cta:hover:not(:disabled) {
    background: #fe2c55;
}

body.home .tiktok-cta:disabled {
    background: #111;
    opacity: 0.75;
    color: #fff;
}

body.home .tiktok-cta:disabled:hover {
    background: #111;
}

body.home .reopen-auth-button,
body.home .fb-close-button,
body.home .facebook-button {
    border-radius: 0;
}

body.home .facebook-button {
    background-color: #1877f2;
}

body.home .facebook-button:hover {
    background-color: #166fe5;
}

body.home .verify-dest {
    background: none;
    border: none;
    border-radius: 0;
    font-size: 22px;
}

body.home .verify-section {
    border-top: 0;
    align-items: center;
    text-align: center;
}

body.home .verify-detail {
    text-align: center;
}

body.home .waiting-section {
    margin-top: 20px;
    text-align: center;
    align-items: center;
}