/* Mobile-First Auth Styles */
:root {
    --primary-color: #f39c12;
    --secondary-color: #e67e22;
    --dark-color: #1a1a2e;
    --darker-color: #16213e;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--darker-color) 0%, var(--dark-color) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Mobile-first Container */
.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Progress Bar */
.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 4px;
    border-radius: 2px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 33%;
    transition: width 0.3s ease;
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.auth-logo h1 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Form Card */
.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    font-size: 1.75rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e1e5eb;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.step.active {
    background: var(--primary-color);
    color: white;
}

.step.completed {
    background: var(--success);
    color: white;
}

/* Flash Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Form Sections */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

/* Input with Icon */
.input-group {
    position: relative;
}

.input-group-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.input-group .form-control {
    padding-left: 44px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e1e5eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-fill.weak {
    width: 33%;
    background: var(--danger);
}

.strength-fill.medium {
    width: 66%;
    background: var(--primary-color);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Plan Selection */
.plan-options {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.plan-card {
    position: relative;
    border: 2px solid #e1e5eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: #f8f9fa;
}

.plan-card:hover {
    border-color: var(--primary-color);
    background: rgba(243, 156, 18, 0.05);
}

.plan-card.selected {
    border-color: var(--primary-color);
    background: rgba(243, 156, 18, 0.1);
}

.plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.plan-name {
    font-weight: 600;
    color: var(--dark-color);
}

.plan-price {
    font-weight: 700;
    color: var(--primary-color);
}

.plan-features {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

.plan-badge {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Terms Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.form-checkbox label {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.4;
    cursor: pointer;
}

.form-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Remember Me & Forgot */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.form-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-link:hover {
    text-decoration: underline;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary {
    background: #e1e5eb;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(243, 156, 18, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(243, 156, 18, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(243, 156, 18, 0.4);
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5eb;
}

.auth-divider span {
    background: var(--white);
    padding: 0 15px;
    position: relative;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Social Login */
.social-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e5eb;
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: rgba(243, 156, 18, 0.05);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e1e5eb;
}

.auth-footer p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive - Tablet and Desktop */
@media (min-width: 768px) {
    .auth-card {
        padding: 40px;
    }
    
    .auth-header h2 {
        font-size: 2rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    }
}

/* Lifetime Badge */
.lifetime-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    color: white;
    text-align: center;
}

.badge-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge-content i {
    font-size: 2rem;
    color: #ffd700;
}

.badge-text {
    flex: 1;
    text-align: left;
}

.badge-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.badge-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

@media (max-width: 480px) {
    .badge-content {
        flex-direction: column;
        text-align: center;
    }
    
    .badge-text {
        text-align: center;
    }
}

/* PWA Support */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}
