/* PopChinese checkout – same design as website */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #1A1A1A;
    --bg-card: #252525;
    --bg-card-hover: #2a2a2a;
    --text-primary: #FFFFFF;
    --text-muted: #E2DED6;
    --accent: #FF4B3A;
    --accent-hover: #ff5c4d;
    --gold: #D4AF37;
    --border-dark: #333;
}

html {
    font-size: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 24px;
}

.navbar {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    justify-self: start;
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
    line-height: 0;
    justify-self: center;
}

.logo-img {
    height: 120px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-actions {
    justify-self: end;
}

.checkout-user-bar {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkout-user-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.0625rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-primary);
    border: none;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Section */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title .highlight {
    color: var(--accent);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.checkout-plan-features {
    max-width: 700px;
    margin: 0 auto 1.25rem;
    padding: 1.25rem 1.25rem;
    background:
        radial-gradient(ellipse 120% 90% at 0% 0%, rgba(255, 75, 58, 0.08) 0%, transparent 55%),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.9rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.checkout-plan-features .price-features {
    margin-bottom: 0;
}

.pricing-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%),
        var(--bg-card);
    border-radius: 0.9rem;
    padding: 2.1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.pricing-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16);
}

.pricing-card-featured {
    border-color: var(--accent);
    background:
        radial-gradient(ellipse 120% 90% at 50% -20%, rgba(255, 75, 58, 0.18) 0%, transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.018) 100%),
        var(--bg-card);
    box-shadow:
        0 0 0 2px rgba(255, 75, 58, 0.25),
        0 24px 60px rgba(0, 0, 0, 0.45);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--accent);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.price {
    font-size: 2.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.price span {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.price-sub {
    font-size: 0.95rem;
    color: rgba(226, 222, 214, 0.9);
    margin-bottom: 1.35rem;
    line-height: 1.55;
    text-wrap: pretty;
}

.price-features {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.price-features li {
    padding: 0;
}

.feature-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 0;
}

.feature-label {
    color: rgba(226, 222, 214, 0.92);
    font-weight: 650;
}

.feature-badge {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 222, 214, 0.9);
    white-space: nowrap;
}

.feature-badge--unlimited {
    border-color: rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.1);
    color: #86efac;
}

.feature-badge--limited {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
}

/* Form in cards */
.pricing-card form {
    margin: 0;
}

.checkout-error {
    background-color: #3d2020;
    color: #f88;
    padding: 1rem;
    margin: 0 auto 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    max-width: 500px;
    border: 1px solid rgba(255, 75, 58, 0.3);
}

.checkout-login-cta {
    text-align: center;
    margin: 0 auto 2rem;
    max-width: 480px;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--border-dark);
}

.checkout-login-cta .checkout-login-message {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
    font-size: 1rem;
}

.checkout-oauth-row {
    margin-bottom: 1rem;
}

.checkout-auth-tabs {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: #151515;
    padding: 0.25rem;
    border-radius: 999px;
}

.checkout-auth-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
}

.checkout-auth-tab-active {
    background: var(--accent);
    color: var(--text-primary);
}

.checkout-login-divider {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 1rem 0 0.75rem;
    text-align: center;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
}

.btn-google:hover {
    background: #333;
    border-color: var(--text-muted);
}

.checkout-google-icon {
    flex-shrink: 0;
}

.checkout-google-spinner {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.checkout-google-spinner::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-dark);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: checkout-google-spin 0.8s linear infinite;
}

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

.checkout-login-cta form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.checkout-login-cta label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkout-login-cta input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 0.4rem;
    border: 1px solid var(--border-dark);
    background: #151515;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.checkout-login-cta input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 75, 58, 0.4);
}

.checkout-login-cta .btn {
    margin-top: 0.5rem;
}

.checkout-login-status {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card-featured {
        order: -1;
    }

    .nav-links {
        display: none;
    }
}
