/* ============================================
   KARAOKÊ PROFISSIONAL - CHECKOUT PREMIUM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #07070f;
    --bg-card: rgba(15, 15, 30, 0.9);
    --bg-input: rgba(20, 20, 45, 0.6);
    --border: rgba(139, 92, 246, 0.15);
    --border-focus: rgba(139, 92, 246, 0.5);
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.25);
    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.2);
    --blue: #3b82f6;
    --orange: #f59e0b;
    --red: #ef4444;
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --radius: 14px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============ BACKGROUND EFFECTS ============ */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    background: rgba(139, 92, 246, 0.15);
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    background: rgba(59, 130, 246, 0.1);
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 50%;
    background: rgba(34, 197, 94, 0.05);
    animation-delay: -14s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(15px, 30px) scale(1.02);
    }
}

/* ============ CONTAINER ============ */
.checkout-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ HEADER ============ */
.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
}

.logo-icon {
    font-size: 28px;
}

.accent {
    color: var(--accent);
}

.secure-badge {
    font-size: 13px;
    color: var(--green);
    background: var(--green-glow);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ============ PROGRESS BAR ============ */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0 40px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text-muted);
    transition: var(--transition);
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--text);
}

.progress-line {
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    margin: 0 12px;
    overflow: hidden;
}

.progress-line-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ============ CONTENT LAYOUT ============ */
.checkout-content {
    display: flex;
    gap: 32px;
    flex: 1;
}

/* ============ ORDER SUMMARY (Sidebar) ============ */
.order-summary {
    width: 340px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(20px);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.summary-product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.product-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.product-name {
    font-weight: 700;
    font-size: 16px;
}

.product-plan {
    font-size: 13px;
    color: var(--accent-light);
    font-weight: 500;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-top: 4px;
}

.text-green {
    color: var(--green);
}

.summary-installment {
    text-align: center;
    font-size: 12px;
    color: var(--accent-light);
    margin-top: 8px;
    padding: 8px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 8px;
}

.summary-features {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-item {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.guarantee-badge {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-sm);
}

.guarantee-icon {
    font-size: 28px;
}

.guarantee-badge strong {
    font-size: 13px;
    color: var(--green);
}

.guarantee-badge p {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ============ FORM AREA ============ */
.checkout-form-area {
    flex: 1;
    min-width: 0;
    position: relative;
}

.checkout-step {
    display: none;
    animation: stepIn 0.4s ease;
}

.checkout-step.active {
    display: block;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.step-subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 28px;
}

/* ============ FORM ============ */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.form-row .form-group {
    flex: 1;
}

.form-row.two-cols .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: rgba(20, 20, 45, 0.9);
}

.form-group input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background: #1a1a2e;
    color: var(--text);
}

/* ============ BUTTONS ============ */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-next,
.btn-pay {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-next {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-arrow {
    transition: transform 0.3s;
}

.btn-next:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-back {
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-pay {
    background: linear-gradient(135deg, var(--green), #16a34a);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-pay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-pay:hover::before {
    opacity: 1;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}

.btn-pay.pix {
    background: linear-gradient(135deg, #00b894, #009874);
}

.btn-pay.boleto {
    background: linear-gradient(135deg, var(--blue), #2563eb);
}

.btn-pay:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ PAYMENT TABS ============ */
.payment-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.payment-tab {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.payment-tab:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.payment-tab.active {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.tab-icon {
    font-size: 22px;
}

.tab-label {
    font-size: 12px;
}

.payment-panel {
    display: none;
    animation: stepIn 0.3s ease;
}

.payment-panel.active {
    display: block;
}

/* ============ CARD PREVIEW ============ */
.card-preview {
    margin-bottom: 24px;
    perspective: 1000px;
}

.card-preview-inner {
    background: linear-gradient(135deg, #1a1a3e, #2d1b69, #1a1a3e);
    border-radius: 16px;
    padding: 28px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-preview-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 60%);
}

.card-chip {
    width: 45px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd700, #daa520);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-number-display {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 3px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 4px;
}

.card-value {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============ PIX ============ */
.pix-info,
.boleto-info {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.pix-icon-large,
.boleto-icon-large {
    font-size: 48px;
    margin-bottom: 12px;
}

.pix-info h3,
.boleto-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.pix-info p,
.boleto-info p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
}

.pix-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 16px;
    background: var(--green-glow);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
}

.pix-qr-area {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.pix-qr-img {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    display: block;
    border-radius: 8px;
}

.pix-copy-area,
.boleto-copy-area {
    margin-top: 16px;
}

.pix-copy-area label,
.boleto-copy-area label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}

.pix-code-container {
    display: flex;
    gap: 8px;
}

.pix-code-container input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    font-family: monospace;
    color: #333;
    background: #f8f9fa;
}

.btn-copy-pix {
    padding: 10px 16px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: var(--transition);
}

.btn-copy-pix:hover {
    opacity: 0.9;
}

.pix-timer {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
}

/* ============ BOLETO ============ */
.boleto-result {
    text-align: center;
    margin-bottom: 20px;
}

.btn-boleto-download {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--blue), #2563eb);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.btn-boleto-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* ============ SUCCESS ============ */
.success-container {
    text-align: center;
    padding: 40px 20px;
}

.success-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.success-icon {
    font-size: 64px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-rings {
    position: absolute;
    inset: -20px;
    border: 2px solid var(--green);
    border-radius: 50%;
    animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.success-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--green);
}

.success-subtitle {
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 32px;
}

.license-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    padding: 32px;
    margin: 0 auto 32px;
    max-width: 440px;
}

.license-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.license-code {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    color: white;
    margin-bottom: 16px;
    user-select: all;
}

.btn-copy-license {
    padding: 12px 28px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-copy-license:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
}

.success-instructions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
}

.success-instructions h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-dim);
}

.success-instructions ol {
    padding-left: 20px;
    font-size: 14px;
    line-height: 2;
    color: var(--text-dim);
}

.success-instructions strong {
    color: var(--text);
}

.success-email-notice {
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-sm);
    max-width: 400px;
    margin: 0 auto;
}

/* ============ ERROR ============ */
.checkout-error {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(20px);
    color: var(--red);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100;
    animation: stepIn 0.3s ease;
    max-width: 90%;
}

.error-close {
    background: none;
    border: none;
    color: var(--red);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

/* ============ FOOTER ============ */
.checkout-footer {
    text-align: center;
    padding: 32px 0 16px;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: auto;
}

.payment-brands {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.payment-brands span:first-child {
    color: var(--text-dim);
    font-weight: 600;
}

.brand {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .checkout-content {
        flex-direction: column-reverse;
    }

    .order-summary {
        width: 100%;
        position: static;
    }

    .progress-bar {
        padding: 0;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        width: 40px;
    }
}

@media (max-width: 600px) {
    .checkout-container {
        padding: 12px 16px 32px;
    }

    .checkout-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .form-row.two-cols {
        flex-direction: column;
        gap: 0;
    }

    .payment-tabs {
        flex-direction: column;
    }

    .card-number-display {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .license-code {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .success-title {
        font-size: 22px;
    }
}