/* 
=========================================
  NewAPI Style Redesign for Payment Page
=========================================
*/

:root {
    /* Color Palette matching NewAPI dark theme */
    --bg-base: #0a0c10;
    --bg-surface: #11141a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-disabled: #475569;
    
    --accent-primary: #ec4899; /* Pink */
    --accent-secondary: #8b5cf6; /* Purple */
    --accent-blue: #3b82f6; /* Blue */
    --success-color: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.2), 0 2px 4px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.15);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background Gradients */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-base);
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.gradient-blob.left {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-secondary));
}

.gradient-blob.right {
    top: 20%;
    right: -20%;
    width: 50vw;
    height: 50vw;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Layout Elements */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    padding-top: 100px; /* Space for navbar */
    display: flex;
    flex-direction: column;
    gap: 80px;
}

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

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 12, 16, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.brand-logo {
    width: 32px;
    height: 32px;
}

.brand-logo svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-version {
    font-size: 0.65rem;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-secondary));
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Payment Methods Selector */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    margin-top: -8px;
}

.pay-method-label {
    cursor: pointer;
    display: block;
}

.pay-method-input {
    display: none;
}

.pay-method-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.wx-icon { color: #10b981; }
.ali-icon { color: #3b82f6; }

.pay-method-box:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pay-method-input:checked + .pay-method-box.wxpay {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.pay-method-input:checked + .pay-method-box.alipay {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: border-color 0.2s;
    cursor: text;
}

.search-box:hover {
    border-color: var(--border-color-hover);
}

.search-icon {
    width: 14px;
    height: 14px;
}

.search-box kbd {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
    margin-left: 12px;
}

.btn-ghost {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-ghost:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

.btn-ghost i {
    width: 16px;
    height: 16px;
}

/* Base Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

.btn i {
    width: 18px;
    height: 18px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* App Display Graphic (Mocking NewAPI's UI demo) */
.app-display {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.app-window {
    width: 100%;
    max-width: 900px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.app-window::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, var(--bg-base) 0%, transparent 100%);
    pointer-events: none;
}

.app-header {
    height: 48px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.traffic-lights {
    display: flex;
    gap: 8px;
}

.traffic-lights span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #334155;
}

.traffic-lights span:nth-child(1) { background: #ef4444; }
.traffic-lights span:nth-child(2) { background: #eab308; }
.traffic-lights span:nth-child(3) { background: #22c55e; }

.app-title {
    margin-left: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.app-body {
    display: flex;
    height: 300px;
}

.app-sidebar {
    width: 220px;
    border-right: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-item i {
    width: 16px;
    height: 16px;
}

.sidebar-item.active {
    background: var(--bg-card);
    color: var(--text-main);
}

.app-main-view {
    flex: 1;
    padding: 24px;
}

.app-main-view h2 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.app-main-view p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.data-table {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-row {
    background: var(--bg-surface);
    display: grid;
    grid-template-columns: 48px 1fr 100px;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.85rem;
}

.table-row i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.table-header {
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.green {
    background: var(--success-bg);
    color: var(--success-color);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

/* Features Section */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    transition: all 0.3s ease;
}

.feature-card.wide {
    grid-column: span 2;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    width: 24px;
    height: 24px;
}

.feature-icon.icon-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.feature-icon.icon-purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.feature-icon.icon-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.feature-icon.icon-orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.feature-icon.icon-pink { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 80px;
}

.pricing-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: var(--radius-full);
    margin-bottom: 40px;
}

.pricing-toggle span {
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pricing-toggle span.active {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-secondary));
    color: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    width: 100%;
    max-width: 900px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pricing-card.highlighted {
    background: rgba(139, 92, 246, 0.05); /* Slight purple tint */
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.1);
}

.pricing-card.highlighted:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
}

.badge-recommended {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-secondary));
    color: white;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.pricing-header {
    text-align: left;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.plan-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 12px;
}

.plan-price {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.plan-features {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.plan-features li i {
    width: 20px;
    height: 20px;
}

.text-disabled {
    color: var(--text-disabled);
}

.text-disabled .active-feat {
    color: var(--text-main);
}

.text-green-400 {
    color: #4ade80;
}

.pricing-action {
    margin-top: auto;
}

.btn-buy {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-secondary));
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-buy:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-buy:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-surface);
    color: var(--text-muted);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.secure-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.secure-text i {
    width: 14px;
    height: 14px;
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    margin-top: 40px;
    background: var(--bg-surface);
}

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

.footer-links {
    display: flex;
    gap: 100px;
    margin-bottom: 60px;
}

.link-group h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.link-group a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.link-group a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    color: var(--text-disabled);
    font-size: 0.8rem;
}

/* Loading Overlay */
.pay-loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 12, 16, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.pay-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 24px;
}

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

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}

.toast.show {
    bottom: 32px;
    opacity: 1;
    visibility: visible;
}

/* Media Queries */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-card.wide {
        grid-column: auto;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .search-box span, .search-box kbd { display: none; }
    .btn-ghost span { display: none; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    
    .pricing-card { padding: 32px 24px; }
    .app-window { display: none; } /* Hide complex graphic on small screens */
    .footer-links { flex-direction: column; gap: 40px; }
}

/* Specifics for Pay Result Page */
.result-card {
    max-width: 600px;
    margin: 80px auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.success-icon-wrap {
    width: 80px;
    height: 80px;
    background: var(--success-bg);
    color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.success-icon-wrap i {
    width: 40px;
    height: 40px;
}

.result-card h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.result-card p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.code-display-box {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    position: absolute;
    top: -10px; left: 16px;
    background: var(--bg-card);
    padding: 0 8px;
    font-size: 0.75rem;
    color: var(--success-color);
    border-radius: 4px; border: 1px solid var(--border-color);
}

.the-code {
    font-family: 'JetBrains Mono', monospace, Consolas;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--text-main);
    user-select: all;
    background: linear-gradient(90deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-icon {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}

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

.btn-icon.success {
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.3);
}

.warning-box {
    display: flex; gap: 8px; align-items: center; justify-content: center;
    padding: 12px; border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.85rem; margin-bottom: 32px;
}

.warning-box i { width: 16px; height: 16px; }

.order-details-table {
    width: 100%; border-collapse: collapse; margin-bottom: 32px;
    font-size: 0.85rem; text-align: left;
}

.order-details-table tr {
    border-bottom: 1px solid var(--border-color);
}

.order-details-table th, .order-details-table td {
    padding: 12px 0;
}

.order-details-table th {
    color: var(--text-muted); font-weight: normal; width: 80px;
}

.order-details-table td {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

.price-text {
    color: var(--success-color); font-weight: 700; font-size: 1rem;
}

.result-actions {
    display: flex; flex-direction: column; gap: 16px;
}

.btn-lg {
    padding: 16px 24px; border-radius: var(--radius-lg); font-size: 1.1rem; width: 100%;
}
