/* Modern Variables */
:root {
    --ar-primary: #0071e3; /* Apple-style blue */
    --ar-primary-hover: #0077ed;
    --ar-secondary: #f5f5f7;
    --ar-text-main: #1d1d1f;
    --ar-text-muted: #86868b;
    --ar-border: #d2d2d7;
    --ar-input-bg: #ffffff;
    --ar-success: #34c759;
    --ar-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --ar-card-bg: #ffffff;
    --ar-radius: 18px;
    --ar-input-radius: 12px;
}

/* Container Reset */
#account-rescue-app {
    max-width: 680px;
    margin: 60px auto;
    padding: 50px;
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ar-text-main);
    line-height: 1.5;
    position: relative;
    overflow: hidden; /* For contained animations */
}

#account-rescue-app h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    color: var(--ar-text-main);
    letter-spacing: -0.02em;
}

#account-rescue-app p {
    text-align: center;
    color: var(--ar-text-muted);
    font-size: 17px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Progress Bar */
.ar-progress {
    height: 4px;
    background: #ebebeb;
    border-radius: 2px;
    margin-bottom: 50px;
    overflow: hidden;
}

.ar-progress-bar {
    height: 100%;
    background: var(--ar-primary);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps Animation */
.ar-step {
    display: none;
}

.ar-step.active-from-right {
    display: block;
    animation: slideInFromRight 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ar-step.active-from-left {
    display: block;
    animation: slideInFromLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ar-step.exiting-left {
    display: block; 
    animation: slideOutToLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    width: 100%;
    top: 0;
}

.ar-step.exiting-right {
    display: block;
    animation: slideOutToRight 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    width: 100%;
    top: 0;
}

.ar-step-content {
    position: relative; /* Context for absolute positioning */
    min-height: 400px; /* Prevent collapse during transition */
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutToLeft {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-30px); }
}

@keyframes slideOutToRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

/* Form Fields */
.ar-field-group {
    margin-bottom: 28px;
    text-align: left;
    position: relative;
}

.ar-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
    color: var(--ar-text-main);
    margin-left: 4px;
}

.ar-input, .ar-select, .ar-textarea {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-input-radius);
    font-size: 16px;
    background: var(--ar-input-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    appearance: none; /* Remove default styling */
}

.ar-select {
    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 1rem center;
    background-size: 1em;
}

.ar-input:focus, .ar-select:focus, .ar-textarea:focus {
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
    outline: none;
}

.ar-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

/* Custom Country Dropdown */
.ar-country-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-input-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 8px;
    padding: 8px 0;
    list-style: none;
}

.ar-country-dropdown li {
    padding: 12px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.1s;
    color: var(--ar-text-main);
}

.ar-country-dropdown li:hover {
    background: var(--ar-secondary);
    color: var(--ar-primary);
}

/* Actions */
.ar-actions {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ar-btn {
    padding: 16px 36px;
    border: none;
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.ar-btn:active {
    transform: scale(0.98);
}

.ar-btn-primary {
    background: var(--ar-primary);
    color: #fff;
    width: 100%; 
}

.ar-btn-primary:hover {
    background: var(--ar-primary-hover);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
}

.ar-btn-secondary {
    background: transparent;
    color: var(--ar-text-muted);
    padding: 14px 24px;
}

.ar-btn-secondary:hover {
    color: var(--ar-text-main);
}

/* Assessment Animation */
.ar-assessment-screen {
    text-align: center;
    padding: 80px 0;
}

.ar-spinner {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(0, 113, 227, 0.1);
    border-top: 3px solid var(--ar-primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.6, 0, 0.4, 1) infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#ar-status-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--ar-text-main);
    margin-top: 24px;
}

/* Pricing Results */
.ar-result-header {
    margin-bottom: 50px;
}

.ar-subtitle {
    font-size: 18px !important;
    margin-top: -8px;
}

.ar-pricing-container {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.ar-pricing-container.single-card {
    justify-content: center;
}

.ar-pricing-card {
    flex: 1;
    min-width: 280px;
    border: 1px solid var(--ar-border);
    border-radius: 20px;
    padding: 32px;
    background: #fff;
    text-align: left;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ar-pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.ar-pricing-card.highlight {
    border: 2px solid var(--ar-primary);
    background: linear-gradient(to bottom, #fcfdff, #ffffff);
}

.ar-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ar-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.25);
    text-transform: uppercase;
}

.ar-card-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--ar-text-main);
    font-weight: 700;
    text-align: center;
}

.ar-price {
    font-size: 40px;
    font-weight: 800;
    color: var(--ar-text-main);
    margin: 12px 0 24px;
    text-align: center;
    letter-spacing: -0.02em;
}

.ar-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.ar-features li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
}

.ar-features li:last-child {
    border-bottom: none;
}

.ar-features li i {
    color: var(--ar-success);
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.ar-features li strong {
    margin-right: 4px;
}

.ar-paypal-container {
    margin-top: 24px;
}

/* Trust Badges */
.ar-trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 50px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.ar-trust-badge {
    font-size: 14px;
    font-weight: 500;
    color: var(--ar-text-muted);
    display: flex;
    align-items: center;
}

.ar-trust-badge i {
    margin-right: 8px;
    font-size: 18px;
    color: var(--ar-text-main);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    #account-rescue-app {
        margin: 16px;
        padding: 24px;
    }
    
    .ar-pricing-container {
        flex-direction: column;
    }
    
    .ar-actions {
        flex-direction: column-reverse;
        gap: 16px;
    }
    
    .ar-btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .ar-trust-badges {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
}
