/* Full Refactor - Swiss Minimalist Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Theme Colors - Clean Light */
    --bg-page: #ffffff;
    --bg-surface: #f8fafc;
    /* Very light cool gray */
    --bg-focus: #ffffff;

    /* Accents */
    --primary: #000000;
    /* Stark Black */
    --primary-hover: #333333;
    --accent: #2563eb;
    /* Professional Blue */
    --accent-light: #eff6ff;

    /* Borders */
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-white: #ffffff;

    /* Functional */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Spacing & Radius */
    --radius-lg: 16px;
    --radius-md: 8px;

    /* Font */
    --font-sans: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Side - Hero */
.hero-side {
    flex: 1;
    background: var(--bg-surface);
    padding: 80px 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-right: 1px solid var(--border-light);
}

.hero-content {
    max-width: 600px;
}

/* Branding */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 80px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-badge {
    background: var(--primary);
    color: var(--text-white);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Hero Typography */
.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 32px;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.highlight {
    color: var(--text-secondary);
    /* Muted contrast */
}

.hero-desc {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 64px;
    max-width: 520px;
    font-weight: 400;
    line-height: 1.6;
}

/* Features Grid - Minimalist List */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.feature-card {
    padding: 0;
    background: transparent;
    border: none;
    transition: opacity 0.2s ease;
}

.feature-card:hover {
    opacity: 0.7;
    transform: none;
}

.feature-card .icon {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hero-footer {
    position: absolute;
    bottom: 40px;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Right Side - Action */
.action-side {
    flex: 0 0 540px;
    background: var(--bg-page);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.action-card {
    width: 100%;
    max-width: 420px;
}

/* Price Header */
.price-header {
    margin-bottom: 48px;
    text-align: left;
}

.plan-name {
    display: inline-block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    background: var(--accent-light);
    padding: 6px 12px;
    border-radius: 100px;
}

.price-container {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.currency {
    font-size: 32px;
    margin-right: 4px;
    font-weight: 400;
}

.amount {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1;
}

.period {
    font-size: 18px;
    color: var(--text-secondary);
    margin-left: 12px;
    font-weight: 400;
}

.price-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Form Styles */
.purchase-form {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

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

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

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 20px 20px 20px 52px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    background: var(--bg-page);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.4;
    filter: grayscale(100%);
}

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

/* Submit Button */
.submit-btn {
    width: 100%;
    background: var(--primary);
    border: none;
    padding: 20px;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

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

.submit-btn:disabled {
    background: var(--border-light);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

.guarantee {
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Order Link */
.order-link {
    text-align: left;
    margin-top: 32px;
}

.order-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 2px;
}

.order-link a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Alert Messages */
.alert {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fee2e2;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #dcfce7;
}

.alert-warning {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid #fde68a;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-page);
    width: 90%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    transform: scale(0.98);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    height: 500px;
    position: relative;
    background: #ffffff;
}

.modal-loading {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Customer Service Button */
#cs-float-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 900;
    cursor: pointer;
}

.cs-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cs-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

#cs-float-btn:hover .cs-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.cs-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--text-primary);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: white;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    font-weight: 500;
}

#cs-float-btn:hover .cs-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .split-layout {
        flex-direction: column;
    }

    .hero-side {
        padding: 60px 40px;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        min-height: auto;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-desc {
        font-size: 18px;
    }

    .action-side {
        flex: none;
        padding: 60px 24px;
    }

    .action-card {
        max-width: 100%;
    }
}

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

    .hero-title {
        font-size: 40px;
        letter-spacing: -1px;
    }

    .amount {
        font-size: 56px;
    }
}

/* --- Shared Components & Centered Layout (For Auxiliary Pages) --- */

.centered-layout {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: var(--bg-surface);
}

.centered-layout .action-card {
    background: var(--bg-page);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.6s ease-out backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* QR Code Scan Animation */
.qr-box {
    position: relative;
    overflow: hidden;
}

.qr-box::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0.6;
    top: 0;
    left: 0;
    animation: scan 2.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes scan {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(180px);
        opacity: 0;
    }
}

.centered-layout .card-header .brand {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    display: inline-block;
}

.centered-layout h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.centered-layout p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Status Badges */
.status-section {
    text-align: center;
    margin-bottom: 32px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
}

.status-badge.processing {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
}

.status-badge.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

.status-badge.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

/* Info Lists */
.info-list {
    margin-top: 32px;
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-row .label {
    color: var(--text-secondary);
}

.info-row .value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

/* Secondary Button */
.btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--border-hover);
}

.card-footer {
    margin-top: 24px;
    text-align: center;
}

.card-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.card-footer a:hover {
    color: var(--primary);
}