/* ============== CSS Variables ============== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-focus: #2563eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: all 0.2s ease;
}

/* ============== Base Styles ============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 24px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============== Header ============== */
.header {
    text-align: center;
    padding: 16px 0 20px;
}

.header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

/* ============== Eligibility Banner ============== */
.eligibility-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border: 1px solid #facc15;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.2);
}

.banner-icon {
    font-size: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.banner-content {
    flex: 1;
}

.banner-content strong {
    display: block;
    color: #854d0e;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.banner-content p {
    color: #713f12;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.banner-content .highlight {
    font-weight: 700;
    color: #854d0e;
}

/* ============== Progress Bar ============== */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #3b82f6 100%);
    width: 20%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.step-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step-dot.completed {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============== Wizard Container ============== */
.wizard-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px 24px;
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeSlideIn 0.35s ease-out;
}

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

.step h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.step-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ============== Source Cards ============== */
.source-cards {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px;
    margin-bottom: 28px;
}

.source-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.source-card input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
}

.source-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 28px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    background: var(--card-bg);
    min-height: 160px;
}

.source-card:hover .source-content {
    border-color: #93c5fd;
    background: #f8faff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.source-card input:checked + .source-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 8px 20px rgba(37, 99, 235, 0.15);
}

.source-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.source-card input:checked + .source-content .source-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
    transform: scale(1.05);
}

.source-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.source-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    transition: var(--transition);
}

.source-card input:checked + .source-content h3 {
    color: var(--primary-color);
}

.source-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ============== Form Elements ============== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    background: var(--card-bg);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.phone-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    background: var(--card-bg);
}

.phone-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.country-code {
    padding: 14px 14px;
    background: #f8fafc;
    border-right: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 15px;
}

.phone-input input {
    border: none;
    padding: 14px 16px;
    flex: 1;
    font-size: 15px;
}

.phone-input input:focus {
    outline: none;
    box-shadow: none;
}

.helper-text {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

/* ============== Radio Options ============== */
.input-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.radio-option {
    flex: 1;
    cursor: pointer;
}

.radio-option input {
    display: none;
}

.radio-label {
    display: block;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    background: var(--card-bg);
}

.radio-option:hover .radio-label {
    border-color: #93c5fd;
}

.radio-option input:checked + .radio-label {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

/* ============== OTP Input ============== */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.otp-input {
    width: 50px;
    height: 58px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-primary);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.resend-container {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-pay {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-pay:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn-group .btn-secondary {
    flex: 0 0 auto;
    padding: 14px 20px;
}

.btn-group .btn-primary {
    flex: 1;
}

/* ============== Loader ============== */
.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loader-large {
    width: 52px;
    height: 52px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

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

/* ============== Orders List ============== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.orders-list::-webkit-scrollbar {
    width: 6px;
}

.orders-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.orders-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.order-card {
    padding: 16px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--card-bg);
}

.order-card:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.order-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.order-card input {
    display: none;
}

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

.order-id {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.order-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--success-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.order-status.processing {
    background: var(--warning-color);
}

.order-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.order-details p {
    margin-bottom: 2px;
}

.order-products {
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.order-products strong {
    color: var(--text-primary);
}

.no-orders {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
}

.no-orders p:first-child {
    font-size: 15px;
    margin-bottom: 8px;
}

/* ============== Mock Test Cards ============== */
.mock-test-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.mock-card {
    display: block;
    cursor: pointer;
}

.mock-card input {
    display: none;
}

.card-content {
    padding: 22px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    position: relative;
    transition: var(--transition);
    background: var(--card-bg);
}

.mock-card:hover .card-content {
    border-color: #93c5fd;
    transform: translateY(-2px);
}

.mock-card input:checked + .card-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.card-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.mock-card input:checked + .card-content h3 {
    color: var(--primary-color);
}

.card-content > p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.original-price {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discounted-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--success-color);
}

.discount-badge {
    position: absolute;
    top: -12px;
    right: 18px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    letter-spacing: 0.3px;
}

.selected-order-summary {
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13px;
    border: 1px solid var(--border-color);
}

.selected-order-summary p {
    margin-bottom: 6px;
}

.selected-order-summary p:last-child {
    margin-bottom: 0;
}

.selected-order-summary strong {
    color: var(--text-primary);
}

.discount-info {
    text-align: center;
    padding: 14px 18px;
    background: var(--success-light);
    border-radius: var(--radius-sm);
    color: #047857;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 18px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============== LEEE Specialization ============== */
.specialization-container {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-radius: var(--radius);
    border: 2px solid #e9d5ff;
}

.specialization-title {
    font-size: 15px;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 16px;
    text-align: center;
}

.specialization-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.specialization-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.specialization-card input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
}

.spec-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 14px;
    border: 2px solid #e9d5ff;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--card-bg);
}

.specialization-card:hover .spec-content {
    border-color: #c4b5fd;
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.specialization-card input:checked + .spec-content,
.specialization-card.selected .spec-content {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 4px 12px rgba(124, 58, 237, 0.15);
}

.spec-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    transition: var(--transition);
}

.specialization-card input:checked + .spec-content h4,
.specialization-card.selected .spec-content h4 {
    color: #7c3aed;
}

.spec-content p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* ============== Payment Step ============== */
.payment-processing,
.payment-success,
.payment-failed {
    text-align: center;
    padding: 48px 20px;
}

.payment-processing h2,
.payment-success h2,
.payment-failed h2 {
    margin-bottom: 12px;
}

.payment-processing p {
    color: var(--text-secondary);
}

.success-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    font-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.failed-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: white;
    font-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.success-message {
    color: var(--success-color);
    font-weight: 500;
    margin-bottom: 20px;
}

.confirmation-details {
    background: #f8fafc;
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    margin: 24px 0;
    text-align: left;
    border: 1px solid var(--border-color);
}

.confirmation-details p {
    margin-bottom: 10px;
    font-size: 14px;
}

.confirmation-details p:last-child {
    margin-bottom: 0;
}

.confirmation-details strong {
    color: var(--text-primary);
}

/* ============== Error Message ============== */
.error-message {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error-color);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.error-text {
    color: var(--error-color);
}

/* ============== Footer ============== */
.footer {
    text-align: center;
    padding: 24px 0 8px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============== Utility Classes ============== */
.hidden {
    display: none !important;
}

/* ============== Responsive ============== */
@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .wizard-container {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .step h2 {
        font-size: 20px;
    }

    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 22px;
    }

    .otp-container {
        gap: 8px;
    }

    .input-type-selector {
        flex-direction: column;
        gap: 8px;
    }

    .source-cards {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }

    .source-content {
        padding: 20px 12px;
        min-height: 140px;
    }

    .source-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        border-radius: 14px;
    }

    .source-content h3 {
        font-size: 14px;
    }

    .source-content p {
        font-size: 12px;
    }

    .eligibility-banner {
        padding: 14px 16px;
    }

    .mock-card .card-content {
        padding: 18px;
    }

    .discounted-price {
        font-size: 24px;
    }
}

/* ============== Dark mode support (optional) ============== */
@media (prefers-color-scheme: dark) {
    /* Can be enabled later if needed */
}
