* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    max-width: 500px;
    width: 100%;
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.card-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.card-body {
    padding: 2rem;
}

.logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.step {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: all 0.3s;
}

.step.active {
    background: var(--primary-color);
}

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

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

label .required {
    color: var(--error-color);
}

input, select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input.error {
    border-color: var(--error-color);
}

input.success {
    border-color: var(--success-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.success-message.show {
    display: block;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.password-toggle {
    cursor: pointer;
    user-select: none;
}

.method-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-option {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.method-option:hover {
    border-color: var(--primary-color);
}

.method-option.active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.method-option .icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.method-option .label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    width: auto;
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-group a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: var(--gray);
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.social-btn.google {
    border-color: #DB4437;
}

.social-btn.google:hover {
    background: #DB4437;
    color: white;
}

.social-btn.microsoft {
    border-color: #00a4ef;
}

.social-btn.microsoft:hover {
    background: #00a4ef;
    color: white;
}

.social-btn.yahoo {
    border-color: #720e9e;
}

.social-btn.yahoo:hover {
    background: #720e9e;
    color: white;
}

.social-btn-icon {
    font-size: 1.25rem;
}

/* Segment Selection Cards */
.segment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.segment-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.segment-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.segment-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.segment-card.selected::before {
    content: '\2713';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.segment-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.segment-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: 700;
}

.segment-card p {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.segment-features {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray);
}

.segment-features span {
    text-align: left;
}

.info-box {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 0.75rem;
    border-radius: 5px;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.hidden {
    display: none;
}

.success-animation {
    text-align: center;
    padding: 2rem;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-color);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
}

.alert.show {
    display: block;
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.strength-text {
    font-size: 0.85rem;
    color: var(--gray);
}

.rate-limit-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--error-color);
    font-size: 0.9rem;
    display: none;
}

.rate-limit-warning.show {
    display: block;
}

.email-verification-notice {
    background: rgba(16, 185, 129, 0.05);
    border: 2px solid var(--success-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.email-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 480px) {
    .card-body {
        padding: 1.5rem;
    }

    .social-login {
        flex-direction: column;
    }
}

/* Plan Summary Banner */
.plan-summary {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: none;
}

.plan-summary.show {
    display: block;
}

.plan-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.plan-summary-title {
    font-weight: 700;
    color: #0369a1;
    font-size: 1rem;
}

.plan-summary-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-summary-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #0c4a6e;
}

.plan-summary-price {
    font-weight: 700;
}

.plan-summary-duration {
    opacity: 0.8;
}

/* Pre-filled info banner */
.prefilled-info {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
}

.prefilled-info.show {
    display: block;
}

.prefilled-info p {
    color: #166534;
    font-size: 0.9rem;
    margin: 0;
}

.prefilled-info strong {
    color: #15803d;
}

/* ===== Enriched Registration Styles ===== */

/* Field Grid - 2 columns layout */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.field-grid .form-group {
    margin-bottom: 0;
}

.field-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* Option Buttons - single select pills */
.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.option-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 25px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.2s;
    user-select: none;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Step section header */
.step-header {
    margin-bottom: 1.5rem;
}

.step-header h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.step-header p {
    font-size: 0.88rem;
    color: var(--gray);
}

.step-header .step-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

/* Navigation Buttons (Back / Next) */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

.btn-back {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--gray);
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-back:hover {
    border-color: var(--gray);
    color: var(--dark);
}

.btn-next {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    flex: 1;
    max-width: 200px;
}

.btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-skip {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0.5rem;
}

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

/* Height range slider */
.range-group {
    margin-bottom: 1rem;
}

.range-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.range-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Optional badge */
.optional-badge {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 400;
    font-style: italic;
}

@media (max-width: 480px) {
    .field-grid {
        grid-template-columns: 1fr;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .btn-next {
        max-width: 100%;
        width: 100%;
    }

    .option-buttons {
        gap: 0.4rem;
    }

    .option-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
