/* Design System Tokens */
:root {
    --bg-main: #090d16;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --accent: #fb923c;
    --success: #10b981;
    --error: #ef4444;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation Header */
.header {
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    font-size: 24px;
    color: var(--accent);
}

.logo-highlight {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
}

.hero-bg-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 40%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    opacity: 0.9;
}

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

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Features Grid */
.features {
    padding: 80px 0;
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.4) 0%, rgba(9, 13, 22, 0.1) 80%);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* Pricing and Checkout Section */
.pricing-section {
    padding: 80px 0 120px;
}

.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: rgba(17, 24, 39, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

/* Product Info Card */
.product-info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
}

.product-info-card .badge {
    align-self: flex-start;
    background: rgba(251, 146, 60, 0.15);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 16px;
}

.package-name {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}

.price-container {
    margin-bottom: 24px;
}

.price-symbol {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-value {
    font-size: 54px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.price-period {
    font-size: 14px;
    color: var(--text-secondary);
}

.benefit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefit-list li {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.benefit-list li span {
    color: var(--success);
    font-weight: 700;
}

/* Checkout Form Card */
.checkout-form-card {
    background: rgba(9, 13, 22, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
}

.checkout-form-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.error-tip {
    display: none;
    color: var(--error);
    font-size: 11px;
    margin-top: 6px;
}

/* Plan Option Cards */
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.plan-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.plan-option.active {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.plan-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.plan-price .price-period {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
}

.plan-badge {
    background: rgba(251, 146, 60, 0.15);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

/* Modal Backdrop */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.open {
    display: flex;
}

/* Modal Window */
.modal {
    background: #0d121f;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16.5px;
    font-weight: 600;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

/* Pay Tabs */
.pay-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.pay-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.pay-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* QR Code Simulator */
.qr-container {
    text-align: center;
    margin-bottom: 24px;
}

.mock-qr {
    display: inline-block;
    background: #fff;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.qr-box {
    position: relative;
    width: 140px;
    height: 140px;
    background: #f3f4f6;
    border: 2px dashed #9ca3af;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary);
    top: 0;
    animation: qrScan 2s infinite linear;
}

@keyframes qrScan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.qr-icon {
    font-size: 36px;
}

.pay-instructions {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Sandbox Panel */
.sandbox-banner {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.sandbox-banner h4 {
    color: var(--success);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.sandbox-banner p {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Success Overlay in Modal */
.success-container {
    display: none;
    position: absolute;
    top: 57px; /* Below modal header */
    left: 0;
    width: 100%;
    height: calc(100% - 57px);
    background: #0d121f;
    padding: 24px;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.success-container.open {
    display: flex;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.success-container h4 {
    font-size: 20px;
    color: var(--success);
    font-weight: 700;
    margin-bottom: 6px;
}

.success-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.key-box {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius);
    text-align: left;
}

.key-box label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.key-box textarea {
    width: 100%;
    height: 100px;
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    color: var(--accent);
    font-family: monospace;
    font-size: 11.5px;
    resize: none;
    margin-bottom: 12px;
}

/* Footer styling */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    color: rgba(255, 255, 255, 0.2);
    font-size: 12.5px;
}
