.checkout-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: popIn 0.3s ease-out;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

/* Order Summary */
.order-summary {
    background: rgba(105, 92, 254, 0.1);
    border: 2px solid white;
    border-radius: 1rem;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.order-summary h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.summary-left {
    flex: 1;
}

.plan-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.plan-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.summary-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-hover-primary);
}

.summary-divider {
    height: 1px;
    background: var(--color-border);
    margin: 1rem 0;
}

.summary-item.total {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

.summary-item.total .summary-price {
    font-size: 1.2rem;
}

.guarantee-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(81, 207, 102, 0.1);
    border-left: 4px solid #51cf66;
    padding: 1rem;
    border-radius: 0.5rem;
    color: #51cf66;
    font-size: 0.9rem;
    font-weight: 500;
}

.guarantee-icon {
    font-size: 1.2rem;
    flex: 0 0 20px;
}

/* Payment Form */
.payment-form-container {
    background: var(--bg-secondary);
    border: 2px solid white;
    border-radius: 1rem;
    padding: 2rem;
}

.payment-form-container h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-group select option {
    background: #ffffff;
    color: #000000;
    padding: 0.5rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(105, 92, 254, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Stripe Element */
.stripe-element {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.StripeElement {
    box-sizing: border-box;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    box-shadow: 0 1px 3px 0 #e6ebf1;
    -webkit-transition: box-shadow 150ms ease;
    transition: box-shadow 150ms ease;
}

.StripeElement--focus {
    box-shadow: 0 1px 3px 0 #cfd7df;
}

.StripeElement--invalid {
    border-color: #fa755a;
}

body.dark-theme .StripeElement {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--color-border);
}

.error-message {
    color: #fa755a;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 20px;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(105, 92, 254, 0.05);
    border-radius: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: auto;
    padding: 0;
    border: none;
    background: none;
}

.form-checkbox label {
    margin: 0;
    font-weight: 400;
    font-size: 0.9rem;
    cursor: pointer;
}

.form-checkbox a {
    color: var(--color-hover-primary);
    text-decoration: none;
    font-weight: 500;
}

.form-checkbox a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-pay {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #695cfe 0%, #6b5cf0 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-pay:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(105, 92, 254, 0.3);
}

.btn-pay:active:not(:disabled) {
    transform: translateY(0);
}

.btn-pay:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.form-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    text-align: center;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(105, 92, 254, 0.2);
    border-top-color: var(--color-hover-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-primary);
    font-weight: 600;
}

/* Success State */
.success-state {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.success-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    animation: popIn 0.4s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-content h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.success-subtitle {
    font-size: 0.9rem;
    margin-top: 1rem;
}

.success-details {
    background: rgba(105, 92, 254, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

.detail-value.active {
    color: #51cf66;
}

/* Animations */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
        margin-bottom: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .success-content {
        margin: 1rem;
        max-width: 90vw;
    }
}
