/* ==========================================================================
   QuickPlus Clone - Main Stylesheet
   ========================================================================== */

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

:root {
    /* Default theme: Claude (orange) */
    --primary: #c96442;
    --primary-dark: #a8512f;
    --primary-light: #e8825c;
    --primary-bg: #fff5f0;
    --primary-glow: rgba(201, 100, 66, 0.25);

    /* Neutrals */
    --bg: #fafaf7;
    --bg-card: #ffffff;
    --bg-soft: #f5f4ef;
    --border: #e8e6df;
    --text: #1a1a1a;
    --text-soft: #555555;
    --text-muted: #888888;

    /* Status */
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --warning: #d97706;
    --warning-bg: #fffbeb;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: all 0.2s ease;
}

/* Theme variants */
body.theme-grok {
    --primary: #1a1a1a;
    --primary-dark: #000000;
    --primary-light: #333333;
    --primary-bg: #f5f5f5;
    --primary-glow: rgba(0, 0, 0, 0.2);
}

body.theme-x {
    --primary: #1d9bf0;
    --primary-dark: #1a8cd8;
    --primary-light: #4db5f5;
    --primary-bg: #e8f5fd;
    --primary-glow: rgba(29, 155, 240, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

/* ===== Navbar ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.brand-claude { background: linear-gradient(135deg, #c96442, #d97757); }
.brand-grok { background: linear-gradient(135deg, #1a1a1a, #4a4a4a); }
.brand-x { background: linear-gradient(135deg, #000, #1d9bf0); }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-weight: 600; font-size: 15px; }
.brand-subtitle { font-size: 11px; color: var(--text-muted); }

.nav-links {
    display: flex;
    gap: 4px;
    background: var(--bg-soft);
    padding: 4px;
    border-radius: 12px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-links a.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.lang-switch { position: relative; }

.lang-btn {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-soft);
    transition: var(--transition);
}

.lang-btn:hover { background: var(--bg-card); border-color: var(--primary); }

.lang-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    overflow: hidden;
    display: none;
    z-index: 50;
}

.lang-dropdown.show { display: block; }

.lang-dropdown a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.lang-dropdown a:hover { background: var(--bg-soft); }

/* ===== Hero ===== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at top, var(--primary-bg) 0%, transparent 60%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-soft);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-feature-icon {
    font-size: 24px;
}

.hero-feature-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-soft);
}

/* ===== Info Section ===== */
.info-section {
    padding: 40px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.info-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-soft);
}

.warning-box {
    background: var(--warning-bg);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    color: #78350f;
}

.warning-icon { font-size: 20px; flex-shrink: 0; }

.warning-box strong { display: block; margin-bottom: 4px; }

/* ===== Recharge Section ===== */
.recharge-section {
    padding: 40px 0 80px;
}

.recharge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 720px;
    margin: 0 auto 24px;
}

/* Steps */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.step-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.step.active .step-num {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.step.active .step-label { color: var(--primary); font-weight: 600; }

.step.done .step-num {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.step.done .step-num::before { content: "✓"; }
.step.done .step-num span { display: none; }

.step-divider {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 60px;
    margin-top: -20px;
}

/* Form Steps */
.form-step { display: none; }
.form-step.active { display: block; animation: slideIn 0.3s ease; }

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-input {
    flex: 1;
    min-width: 240px;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.form-hint a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-hint a:hover { text-decoration: underline; }

.form-message {
    margin-top: 12px;
    padding: 0;
    font-size: 14px;
    min-height: 0;
    transition: var(--transition);
}

.form-message.error {
    color: var(--error);
    background: var(--error-bg);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--error);
}

.form-message.success {
    color: var(--success);
    background: var(--success-bg);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--success);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

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

.btn-large {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    margin-top: 20px;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Success / Failed Banners */
.success-banner {
    background: var(--success-bg);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-banner .check {
    width: 22px;
    height: 22px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

/* Benefit list */
.benefit-list {
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 20px 0;
}

.benefit-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.benefit-item {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-soft);
}

/* Processing */
.processing-box {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.processing-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.processing-status {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}

/* Result Box */
.result-box {
    text-align: center;
    padding: 40px 20px;
}

.result-icon { font-size: 64px; margin-bottom: 20px; }

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.result-box.success .result-title { color: var(--success); }
.result-box.failed .result-title { color: var(--error); }

.result-message {
    color: var(--text-soft);
    font-size: 15px;
    margin-bottom: 24px;
}

/* Lookup Card */
.lookup-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lookup-toggle {
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}

.lookup-toggle .arrow { transition: transform 0.2s; }
.lookup-toggle.open .arrow { transform: rotate(180deg); }

.lookup-body {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.lookup-body.open {
    padding: 0 24px 20px;
    max-height: 200px;
}

/* ===== FAQ ===== */
.faq-section {
    padding: 60px 0;
    background: var(--bg-soft);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    list-style: none;
    position: relative;
    padding-right: 50px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--primary);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    padding: 0 20px 18px;
    color: var(--text-soft);
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .nav-links a {
        padding: 8px 12px;
        font-size: 13px;
    }

    .brand-subtitle { display: none; }

    .hero { padding: 50px 0 40px; }
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 16px; }
    .hero-features { gap: 20px; }

    .recharge-card {
        padding: 24px 20px;
        border-radius: var(--radius);
    }

    .steps {
        gap: 4px;
    }

    .step-divider {
        max-width: 30px;
    }

    .step-label { font-size: 11px; }

    .input-group {
        flex-direction: column;
    }

    .form-input {
        min-width: 100%;
    }

    .btn-primary {
        width: 100%;
    }

    .section-title { font-size: 24px; }
}
