:root {
    --primary: #e31e24;
    --primary-hover: #c4161b;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-secondary: #94a3b8;
    --text-light: #64748b;
    --border: #e2e8f0;
    --blue-badge-bg: #e8f0fe;
    --blue-badge-text: #4285f4;
    --green-badge-bg: #ecfdf5;
    --green-badge-text: #10b981;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#checkout-container {
    width: 100%;
    max-width: 480px;
}

.card {
    display: none;
    background: var(--card-bg);
    border-radius: 32px;
    padding: 32px;
    box-shadow: var(--shadow);
    width: 100%;
}

.card.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.logo {
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.help-btn {
    cursor: pointer;
    transition: color 0.2s;
}

.help-btn:hover { color: var(--text-light); }

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
}

.flag {
    width: 20px;
    border-radius: 2px;
    object-fit: cover;
}

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

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-bold { font-weight: 700; font-size: 16px; }
.price-main { font-weight: 800; font-size: 24px; }

.badge-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--blue-badge-bg);
    color: var(--blue-badge-text);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

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

.input-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.select-wrapper { position: relative; }

select {
    width: 100%;
    appearance: none;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

select:focus { border-color: var(--blue-badge-text); }
select:disabled { background: #f8fafc; cursor: not-allowed; opacity: 0.6; }

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.2);
}

.btn-primary:disabled {
    background: #f1f5f9;
    color: var(--text-secondary);
    cursor: not-allowed;
}

.timer-section {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.timer-section p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--green-badge-text);
    background: var(--green-badge-bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.main-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.main-footer strong { color: var(--primary); font-weight: 700; }

/* Payment Details View */
.network-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.network-chip {
    background: #f1f5f9;
    color: #4b5563;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.contract-link {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    text-decoration: underline;
}

.fiat-approx {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 700;
}

.instruction-text {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.payment-methods-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.qr-code-box {
    width: 120px;
    height: 120px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    flex-shrink: 0;
}

#qr-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-fields { flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }

.copy-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px;
}

.copy-box label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.copy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
}

.truncate {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

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

.alt-payment-label {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.alt-payment-label::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #f1f5f9;
}

.alt-payment-label span {
    position: relative;
    background: white;
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.wallet-connect-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    margin-bottom: 12px;
}

.wallet-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
}

.wc-icon {
    width: 32px;
    height: 32px;
    background: #3396ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.btn-sm {
    background: #f8fafc;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.info-alert {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    gap: 12px;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 24px;
}

.alert-icon {
    width: 20px;
    height: 20px;
    background: #fbbf24;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}