:root {
    --primary-bg: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.checkout-container {
    max-width: 600px;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--glass-border);
}

/* Product Selection */
.product-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.product-item.active {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.05);
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-price {
    color: var(--accent-green);
    font-weight: 700;
    font-family: var(--font-heading);
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--accent-blue);
}

/* Button */
.btn-pay {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    border: none;
    border-radius: 14px;
    padding: 1.25rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    margin-top: 1rem;
}

.btn-pay:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

.btn-pay:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Payment Modal / QR Section */
.payment-section {
    display: none;
    text-align: center;
    margin-top: 2rem;
    animation: fadeIn 0.4s ease-out;
}

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

.qr-container {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.qr-image {
    width: 250px;
    height: 250px;
    display: block;
}

.payment-details {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    font-size: 0.95rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

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

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.status-polling {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.success-modal {
    background: #111827;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.success-modal h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.success-modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 700;
    text-decoration: none;
    flex: 1;
    text-align: center;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    text-align: center;
    transition: background 0.2s;
}

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

