/* =====================================================================
   Sign Up Page Specific Styles
   ===================================================================== */

/* Hero Section */
.signup-hero {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl) 0 var(--space-3xl);
}

.signup-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('{{ image_url("/images/signup-hero.jpg") }}') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.signup-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #ffffff 0%, var(--gold-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
}

.benefit-item i {
    color: var(--gold-accent);
    font-size: var(--text-lg);
}

/* Main Signup Card */
.signup-container {
    margin-top: -60px;
    position: relative;
    z-index: 10;
    padding-bottom: var(--space-3xl);
}

.signup-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-smooth);
}

.signup-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

.card-header {
    background: var(--gradient-gold);
    color: var(--primary-color);
    padding: var(--space-xl);
    text-align: center;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.card-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.card-subtitle {
    opacity: 0.9;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.card-body {
    padding: var(--space-2xl);
    position: relative;
}

/* Progress Steps */
.progress-indicator {
    margin-bottom: var(--space-2xl);
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 var(--space-md);
}

.progress-line {
    position: absolute;
    top: 50%;
    left: var(--space-md);
    right: var(--space-md);
    height: 3px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-line-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    width: 0%;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: var(--bg-primary);
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-smooth);
    border: 3px solid transparent;
}

.step-active .step-number {
    background: var(--gradient-gold);
    color: var(--primary-color);
    border-color: var(--gold-accent);
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

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

.step-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: color var(--transition-base);
}

.step-active .step-title {
    color: var(--gold-accent);
}

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

/* Form Steps */
.form-step {
    min-height: 400px;
    animation: slideIn 0.5s ease-out;
}

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

.step-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.step-title-main {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.step-description {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

/* Form Controls */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: var(--text-base);
}

.form-label i {
    color: var(--gold-accent);
    min-width: 20px;
}

.form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    transition: all var(--transition-smooth);
    width: 100%;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    color: var(--text-primary);
    outline: none;
}

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

.form-control.is-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.form-text {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
}

.form-text.text-success {
    color: var(--success-color);
}

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

/* Input Groups */
.input-group {
    display: flex;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 0;
    border-right: none;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-left: none;
    color: var(--text-secondary);
    padding: var(--space-md) var(--space-lg);
    border-top-right-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.btn-toggle-password {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-base);
}

.btn-toggle-password:hover {
    color: var(--gold-accent);
}

/* Password Strength Meter */
.password-strength-container {
    margin-top: var(--space-sm);
}

.password-strength-meter {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.password-strength-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: all var(--transition-smooth);
    width: 0%;
}

.strength-weak {
    background: var(--error-color);
    width: 33%;
}

.strength-fair {
    background: var(--warning-color);
    width: 66%;
}

.strength-strong {
    background: var(--success-color);
    width: 100%;
}

.password-requirements {
    margin-top: var(--space-sm);
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    transition: color var(--transition-base);
}

.requirement-item.met {
    color: var(--success-color);
}

.requirement-item i {
    min-width: 16px;
}

/* Avatar Selection */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.avatar-option {
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-smooth);
}

.avatar-option:hover {
    transform: scale(1.05);
}

.avatar-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.avatar-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    border: 3px solid var(--border-color);
    object-fit: cover;
    transition: all var(--transition-smooth);
    display: block;
    margin: 0 auto;
}

.avatar-option input:checked + .avatar-image {
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
}

.avatar-option:hover .avatar-image {
    border-color: rgba(212, 175, 55, 0.5);
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
}

.btn-step {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-step:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--primary-color);
    border-color: var(--gold-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    color: var(--primary-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--gold-accent);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #38a169 100%);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
    color: white;
}

.btn-step:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success State */
.success-container {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: var(--space-lg);
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.success-message {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* Alert Styles */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(245, 101, 101, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

/* Benefits Card */
.benefits-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-top: var(--space-xl);
}

.benefits-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.benefits-list li i {
    color: var(--gold-accent);
    min-width: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .signup-hero {
        padding: var(--space-xl) 0 var(--space-2xl);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-benefits {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .signup-container {
        margin-top: -40px;
    }
    
    .card-body {
        padding: var(--space-lg);
    }
    
    .progress-steps {
        padding: 0;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: var(--text-base);
    }
    
    .step-title {
        font-size: var(--text-xs);
    }
    
    .form-step {
        min-height: 300px;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-sm);
    }
    
    .avatar-image {
        width: 60px;
        height: 60px;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .btn-step {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .card-title {
        font-size: var(--text-2xl);
    }
    
    .step-title-main {
        font-size: var(--text-xl);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.form-control:focus,
.btn-step:focus,
.avatar-option:focus-within {
    outline: 2px solid var(--gold-accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .signup-hero,
    .benefits-card {
        display: none;
    }
    
    .signup-card {
        background: white;
        border: 1px solid #000;
        box-shadow: none;
    }
}