/* ============================================================
 * jOpenSim - Wizard registrazione (CSS statico)
 * Estratto da tmpl/registration/default.php (0.4.0.5).
 * Le regole dinamiche (background, fullscreen, glassmorphism)
 * restano inline nel template e usano le variabili --reg-*.
 * ============================================================ */

/* ============================================ */
/* WIZARD REGISTRAZIONE 3 STEP - COMPLETE */
/* ============================================ */

.zn-registration-wizard {
    min-height: 100vh;
    background: transparent;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


.wizard-container {
    max-width: 1400px;
    margin: 20px auto;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
}

/* ========== HEADER ========== */
.wizard-header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    padding: 40px;
    text-align: center;
}

.wizard-brand-logo {
    margin-bottom: 1.25rem;
}

.wizard-brand-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

.wizard-brand-link:hover img {
    opacity: 0.92;
}

.wizard-brand-link img.brand-logo {
    max-height: 72px;
    width: auto;
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-header h1 {
    margin: 0 0 10px 0;
    font-size: 42px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.wizard-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

/* ========== PROGRESS BAR ========== */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.wizard-progress::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 80px;
    right: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-50%);
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    font-size: 20px;
    font-weight: 700;
    color: #999;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: rgba(102, 126, 234, 0.8);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.progress-step.completed .step-circle {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.progress-step.completed .step-circle::before {
    content: "✓";
    font-size: 24px;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-step.active .step-label {
    color: white;
    font-weight: 700;
}

.progress-step.completed .step-label {
    color: white;
}

/* ========== WIZARD CONTENT ========== */
.wizard-content {
    padding: 40px;
    background: transparent;
}

.wizard-step {
    /* Off-screen instead of display:none so reCAPTCHA/Turnstile can init (display:none = infinite loading) */
    position: absolute !important;
    left: -10000px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    background: transparent;
}

.wizard-step.active {
    position: relative !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    display: block;
    animation: fadeInUp 0.5s ease;
    background: transparent;
}

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

/* ========== INFO BOX ========== */
.info-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.info-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========== FILTRI STEP 1 ========== */
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    color: white;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.12);
}

/* ========== FILTRI STEP 1 (DROPDOWN SEMPLICI) ========== */
.filter-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.filter-select,
.filter-input {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    color: #495057;
    transition: all 0.2s;
}

.filter-select:hover,
.filter-input:hover {
    border-color: #667eea;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select {
    cursor: pointer;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDEyIDEyIj48cGF0aCBmaWxsPSIjMzMzIiBkPSJNNiA5TDEgNGgxMHoiLz48L3N2Zz4=);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
}

.filter-input {
    padding-left: 15px;
}

.filter-input::placeholder {
    color: #999;
}
    text-align: center;
}

.pill-filter.active .pill-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Toggle Genere */
.gender-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.toggle-label {
    font-weight: 700;
    color: #495057;
    font-size: 15px;
}

.toggle-buttons {
    display: flex;
    gap: 8px;
    flex: 1;
}

.gender-btn {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #495057;
}

.gender-btn:hover {
    background: white;
    border-color: #667eea;
}

.gender-btn.active {
    background: rgba(102, 126, 234, 0.8);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.gender-icon {
    font-size: 16px;
}

/* Barra Ricerca */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 0 15px;
    transition: all 0.3s;
}

.search-bar:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    font-size: 18px;
    margin-right: 10px;
    opacity: 0.6;
}

.search-input {
    flex: 1;
    border: none;
    padding: 14px 0;
    font-size: 15px;
    outline: none;
    background: transparent;
}

.clear-search {
    background: #dc3545;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-left: 10px;
}

.clear-search:hover {
    background: #c82333;
    transform: rotate(90deg);
}

.clear-search:hover {
    background: #c82333;
    transform: rotate(90deg);
}

/* ========== TOGGLE AVATAR SOURCE ========== */
.avatar-source-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.source-btn {
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.source-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.source-btn.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.source-icon {
    font-size: 24px;
}

.source-label {
    font-weight: 700;
}

/* ========== READY PLAYER ME STYLES ========== */
.rpm-container {
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: white;
}

.rpm-info {
    margin-bottom: 30px;
    text-align: center;
}

.rpm-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rpm-info p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.rpm-features {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.rpm-features li {
    background: rgba(255, 255, 255, 0.15);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.rpm-features li:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rpm-iframe-wrapper {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.rpm-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.rpm-preview {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 16px;
    color: #333;
}

.rpm-preview h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #667eea;
}

.rpm-preview-content {
    display: flex;
    gap: 25px;
    align-items: center;
}

.rpm-avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rpm-preview-info {
    flex: 1;
}

.rpm-status {
    font-size: 18px;
    font-weight: 700;
    color: #28a745;
    margin: 0 0 15px 0;
}

.rpm-processing {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
}

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

/* ========== AVATURN.ME STYLES ========== */
.avaturn-container {
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: white;
}

.avaturn-info {
    margin-bottom: 30px;
    text-align: center;
}

.avaturn-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.avaturn-info p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.avaturn-features {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.avaturn-features li {
    background: rgba(168, 85, 247, 0.15);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.avaturn-features li:hover {
    background: rgba(168, 85, 247, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.avaturn-iframe-wrapper {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.avaturn-iframe {
    width: 100%;
    height: 650px;
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.2);
}

.btn-avaturn {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-avaturn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #9333ea, #6d28d9);
}

.btn-avaturn-secondary {
    background: transparent;
    border: 2px solid rgba(168, 85, 247, 0.5);
    color: #a855f7;
}

.btn-avaturn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: #a855f7;
}

.avaturn-preview {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 16px;
    color: #333;
}

.avaturn-preview h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #a855f7;
}

.avaturn-preview-content {
    display: flex;
    gap: 25px;
    align-items: center;
}

.avaturn-avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #a855f7;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

.avaturn-preview-info {
    flex: 1;
}

.avaturn-status {
    font-size: 18px;
    font-weight: 700;
    color: #28a745;
    margin: 0 0 15px 0;
}

.avaturn-processing {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #a855f7;
    font-weight: 600;
}

.avaturn-processing .spinner {
    border-color: rgba(168, 85, 247, 0.3);
    border-top-color: #a855f7;
}

.avaturn-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Responsive Avaturn */
@media (max-width: 768px) {
    .avaturn-container {
        padding: 25px;
    }
    
    .avaturn-info h3 {
        font-size: 24px;
    }
    
    .avaturn-iframe {
        height: 500px;
    }
    
    .avaturn-preview-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Responsive filtri */
@media (max-width: 768px) {
    .filter-pills {
        justify-content: center;
    }
    
    .pill-filter {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .gender-toggle {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .toggle-buttons {
        flex-direction: column;
    }
}

/* ========== AVATAR GRID - BASE ========== */
.avatars-grid {
    display: grid;
    grid-template-columns: repeat(var(--reg-avatars-per-row, 4), 1fr);
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

/* ========== DISPLAY MODE: GALLERY (default grid) ========== */
.avatars-grid[data-display-mode="gallery"] {
    grid-template-columns: repeat(var(--reg-avatars-per-row, 4), 1fr);
    gap: 20px;
}

.avatars-grid[data-display-mode="gallery"] .avatar-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

/* ========== DISPLAY MODE: CARDS (larger cards with more info) ========== */
.avatars-grid[data-display-mode="cards"] {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.avatars-grid[data-display-mode="cards"] .avatar-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.avatars-grid[data-display-mode="cards"] .avatar-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.avatars-grid[data-display-mode="cards"] .avatar-image-wrapper {
    height: 200px;
    margin-bottom: 15px;
}

.avatars-grid[data-display-mode="cards"] .avatar-info {
    padding: 15px 0;
}

.avatars-grid[data-display-mode="cards"] .avatar-title {
    font-size: 18px;
    font-weight: 700;
}

.avatars-grid[data-display-mode="cards"] .avatar-subtitle {
    font-size: 14px;
    margin-top: 5px;
}

/* ========== DISPLAY MODE: LIST (horizontal list view) ========== */
.avatars-grid[data-display-mode="list"] {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.avatars-grid[data-display-mode="list"] .avatar-card {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.avatars-grid[data-display-mode="list"] .avatar-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.avatars-grid[data-display-mode="list"] .avatar-image-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 12px;
}

.avatars-grid[data-display-mode="list"] .avatar-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.avatars-grid[data-display-mode="list"] .avatar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.avatars-grid[data-display-mode="list"] .avatar-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.avatars-grid[data-display-mode="list"] .select-btn {
    width: auto;
    min-width: 120px;
}

/* ========== DISPLAY MODE: CAROUSEL (swipeable carousel) ========== */
.avatars-grid[data-display-mode="carousel"] {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.avatars-grid[data-display-mode="carousel"]::-webkit-scrollbar {
    height: 8px;
}

.avatars-grid[data-display-mode="carousel"]::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.avatars-grid[data-display-mode="carousel"]::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.avatars-grid[data-display-mode="carousel"]::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.avatars-grid[data-display-mode="carousel"] .avatar-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.avatars-grid[data-display-mode="carousel"] .avatar-card:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ========================================================================
   STYLE TEMPLATES - 4 Distinct Visual Themes
   ======================================================================== */

/* STYLE: MODERN (Glass Morphism & Blur Effects) */
[data-registration-style="modern"] .wizard-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-registration-style="modern"] .wizard-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-registration-style="modern"] .wizard-header h1 {
    background: linear-gradient(135deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

[data-registration-style="modern"] .wizard-progress {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

[data-registration-style="modern"] .step-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-registration-style="modern"] .step-item.active {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.3), rgba(50, 150, 255, 0.2));
    border-color: rgba(100, 200, 255, 0.5);
    box-shadow: 0 0 25px rgba(100, 200, 255, 0.4);
}

[data-registration-style="modern"] .avatar-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-registration-style="modern"] .avatar-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    box-shadow: 0 12px 40px rgba(100, 200, 255, 0.3);
    transform: translateY(-8px);
}

[data-registration-style="modern"] .btn-select-avatar {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.4);
}

[data-registration-style="modern"] .btn-select-avatar:hover {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    box-shadow: 0 6px 25px rgba(33, 150, 243, 0.6);
}

/* STYLE: CLASSIC (Second Life Traditional) */
[data-registration-style="classic"] .wizard-container {
    background: linear-gradient(135deg, #1e3c72, #2a5298, #1e3c72);
    border: 3px solid #d4af37;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4), inset 0 0 60px rgba(0, 0, 0, 0.3);
}

[data-registration-style="classic"] .wizard-header {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
    border-bottom: 3px double #d4af37;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

[data-registration-style="classic"] .wizard-header h1 {
    color: #d4af37;
    font-family: "Cinzel", "Georgia", serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

[data-registration-style="classic"] .wizard-progress {
    background: rgba(30, 60, 114, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

[data-registration-style="classic"] .step-circle {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    border: 2px solid #d4af37;
    color: #d4af37;
    font-weight: 700;
}

[data-registration-style="classic"] .step-item.active .step-circle {
    background: linear-gradient(135deg, #d4af37, #f4c542);
    color: #1e3c72;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
}

[data-registration-style="classic"] .avatar-card {
    background: linear-gradient(135deg, rgba(42, 82, 152, 0.4), rgba(30, 60, 114, 0.6));
    border: 2px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

[data-registration-style="classic"] .avatar-card:hover {
    border-color: #d4af37;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.3);
    transform: translateY(-6px) scale(1.02);
}

[data-registration-style="classic"] .btn-select-avatar {
    background: linear-gradient(135deg, #d4af37, #f4c542);
    color: #1e3c72;
    border: 2px solid #d4af37;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-registration-style="classic"] .btn-select-avatar:hover {
    background: linear-gradient(135deg, #f4c542, #d4af37);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.6);
}

[data-registration-style="classic"] .form-control {
    background: rgba(30, 60, 114, 0.5);
    border: 2px solid rgba(212, 175, 55, 0.4);
    color: #ffffff;
}

[data-registration-style="classic"] .form-control:focus {
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* STYLE: MINIMAL (Clean & Modern) */
[data-registration-style="minimal"] .wizard-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-registration-style="minimal"] .wizard-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

[data-registration-style="minimal"] .wizard-header h1 {
    color: #212529;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-registration-style="minimal"] .wizard-header p {
    color: #6c757d;
}

[data-registration-style="minimal"] .wizard-progress {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

[data-registration-style="minimal"] .step-circle {
    background: #e9ecef;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

[data-registration-style="minimal"] .step-item.active .step-circle {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

[data-registration-style="minimal"] .step-label {
    color: #495057;
}

[data-registration-style="minimal"] .step-item.active .step-label {
    color: #0d6efd;
    font-weight: 600;
}

[data-registration-style="minimal"] .avatar-card {
    background: white;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-registration-style="minimal"] .avatar-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-4px);
}

[data-registration-style="minimal"] .avatar-name {
    color: #212529;
}

[data-registration-style="minimal"] .btn-select-avatar {
    background: #0d6efd;
    border: 1px solid #0d6efd;
    color: white;
    font-weight: 500;
}

[data-registration-style="minimal"] .btn-select-avatar:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

[data-registration-style="minimal"] .form-control {
    background: white;
    border: 1px solid #ced4da;
    color: #495057;
}

[data-registration-style="minimal"] .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-registration-style="minimal"] .wizard-content {
    background: white;
}

/* STYLE: GAMING (Cyberpunk/Neon) */
[data-registration-style="gaming"] .wizard-container {
    background: linear-gradient(135deg, #0a0e27, #16213e, #0a0e27);
    border: 2px solid #00ff88;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.4), inset 0 0 100px rgba(0, 255, 136, 0.05);
}

[data-registration-style="gaming"] .wizard-header {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.15), rgba(255, 0, 255, 0.15));
    border-bottom: 2px solid #00ff88;
    position: relative;
    overflow: hidden;
}

[data-registration-style="gaming"] .wizard-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    animation: scan 3s infinite;
}

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

[data-registration-style="gaming"] .wizard-header h1 {
    color: #00ff88;
    font-family: "Orbitron", "Rajdhani", monospace;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8), 0 0 40px rgba(0, 255, 136, 0.5);
}

[data-registration-style="gaming"] .wizard-progress {
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

[data-registration-style="gaming"] .step-circle {
    background: linear-gradient(135deg, #0a0e27, #16213e);
    border: 2px solid #00ff88;
    color: #00ff88;
    font-family: "Orbitron", monospace;
    font-weight: 700;
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.2);
}

[data-registration-style="gaming"] .step-item.active .step-circle {
    background: #00ff88;
    color: #0a0e27;
    box-shadow: 0 0 40px rgba(0, 255, 136, 1), inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: pulse-neon 2s infinite;
}

@keyframes pulse-neon {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 255, 136, 1); }
    50% { box-shadow: 0 0 60px rgba(0, 255, 136, 1), 0 0 80px rgba(0, 255, 136, 0.6); }
}

[data-registration-style="gaming"] .step-label {
    color: #00ff88;
    font-family: "Rajdhani", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

[data-registration-style="gaming"] .avatar-card {
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.6), rgba(10, 14, 39, 0.8));
    border: 2px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(0, 255, 136, 0.05);
    position: relative;
    overflow: hidden;
}

[data-registration-style="gaming"] .avatar-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

[data-registration-style="gaming"] .avatar-card:hover::before {
    top: 100%;
    left: 100%;
}

[data-registration-style="gaming"] .avatar-card:hover {
    border-color: #00ff88;
    box-shadow: 0 8px 40px rgba(0, 255, 136, 0.6), 0 0 60px rgba(0, 255, 136, 0.4);
    transform: translateY(-8px) scale(1.02);
}

[data-registration-style="gaming"] .avatar-name {
    color: #00ff88;
    font-family: "Rajdhani", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-registration-style="gaming"] .btn-select-avatar {
    background: linear-gradient(135deg, #00ff88, #00cc6f);
    color: #0a0e27;
    border: 2px solid #00ff88;
    font-family: "Orbitron", monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

[data-registration-style="gaming"] .btn-select-avatar:hover {
    background: #00ff88;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.8), 0 0 80px rgba(0, 255, 136, 0.4);
    transform: scale(1.05);
}

[data-registration-style="gaming"] .form-control {
    background: rgba(10, 14, 39, 0.6);
    border: 2px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    font-family: "Rajdhani", sans-serif;
}

[data-registration-style="gaming"] .form-control:focus {
    border-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    background: rgba(10, 14, 39, 0.8);
}

[data-registration-style="gaming"] .form-control::placeholder {
    color: rgba(0, 255, 136, 0.5);
}

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-results-message h3 {
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 0 10px 0;
}

.no-results-message p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.avatar-card {
    background: rgba(255, 255, 255, var(--reg-glass-opacity, 0.15));
    backdrop-filter: blur(var(--reg-glass-blur, 10px));
    -webkit-backdrop-filter: blur(var(--reg-glass-blur, 10px));
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.avatar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    background: rgba(255, 255, 255, 0.25);
}

.avatar-card.selected {
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
    background: rgba(102, 126, 234, 0.2);
}

.avatar-image-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Gradienti per ogni tipo di avatar */
.avatar-card[data-type="male"] .avatar-image-wrapper {
    background: rgba(102, 126, 234, 0.8);
}

.avatar-card[data-type="female"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.avatar-card[data-type="boy"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.avatar-card[data-type="girl"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.avatar-card[data-type="fantasy"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #30cfd0, #330867);
}

.avatar-card[data-type="furry"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.avatar-card[data-type="scifi"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.avatar-card[data-type="vampire"] .avatar-image-wrapper {
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

.avatar-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.avatar-icon {
    width: 100px;
    height: 100px;
    color: white;
    opacity: 0.9;
}

/* Immagini avatar dal database */
img.avatar-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 180px;
    max-height: 180px;
    border-radius: 12px;
}

.avatar-info {
    padding: 20px;
}

.avatar-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.avatar-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.select-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 10px;
}

.avatar-card[data-type="male"] .select-btn {
    background: rgba(102, 126, 234, 0.8);
}

.avatar-card[data-type="female"] .select-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.avatar-card[data-type="boy"] .select-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.avatar-card[data-type="girl"] .select-btn {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.avatar-card[data-type="fantasy"] .select-btn {
    background: linear-gradient(135deg, #30cfd0, #330867);
}

.avatar-card[data-type="furry"] .select-btn {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #333;
}

.avatar-card[data-type="scifi"] .select-btn {
    background: linear-gradient(135deg, #0f2027, #203a43);
}

.avatar-card[data-type="vampire"] .select-btn {
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

.select-btn:hover {
    opacity: 0.9;
}

/* ========== READY PLAYER ME ========== */
.rpm-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px dashed #e0e0e0;
}

.rpm-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

#rpm-container {
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ========== STEP 2: CONFERMA ========== */
.confirmation-container {
    text-align: center;
}

.avatar-preview-large {
    width: 300px;
    height: 300px;
    margin: 30px auto;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    overflow: hidden;
}

.avatar-preview-large .avatar-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.avatar-preview-large .avatar-icon {
    width: 150px;
    height: 150px;
}

.avatar-preview-large img.avatar-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
}

.confirmation-details {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 30px;
    border-radius: 12px;
    margin: 20px auto;
    text-align: center;
    max-width: 400px;
    display: inline-block;
}

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

.confirmation-details h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: white;
    font-size: 18px;
}

.confirmation-details p {
    margin: 8px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.confirmation-details strong {
    color: white;
}

/* ========== STEP 3: REGISTRAZIONE ========== */
.registration-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .registration-layout {
        grid-template-columns: 1fr;
    }
}

.avatar-preview-sidebar {
    position: sticky;
    top: 20px;
}

.avatar-preview-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.avatar-preview-card h3 {
    margin-top: 0;
    font-size: 18px;
    color: white;
}

.avatar-preview-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    overflow: hidden;
}

.avatar-preview-image .avatar-icon {
    width: 120px;
    height: 120px;
}

.avatar-preview-image img.avatar-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-image .avatar-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.avatar-preview-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.avatar-preview-info p {
    margin: 8px 0;
}

.registration-form-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 30px;
    color: white;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #f8fafc;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

/* ========== GLASS EFFECT SU FORM FIELDS (FULLSCREEN) ========== */

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    color: white;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Stile specifico per campo data */
.form-group input[type="date"] {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    position: relative;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    border-radius: 4px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Placeholder per data vuota */
.form-group input[type="date"]:invalid {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input[type="date"]:valid {
    color: white;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.form-group .required {
    color: #ff6b6b;
}

.form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 2rem !important;
    row-gap: 1.5rem !important;
    gap: 1.5rem 2rem !important;
    margin-bottom: 1.5rem !important;
    align-items: start !important;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1.35rem !important;
    }
}

.form-group {
    margin-bottom: 1.35rem !important;
}

.form-row .form-group {
    margin-bottom: 0 !important;
    min-width: 0 !important;
    padding-right: 0.25rem !important;
}

.form-row .form-group:last-child {
    padding-right: 0 !important;
    padding-left: 0.25rem !important;
}

.form-group select {
    width: 100%;
    min-height: 2.75rem;
}

.form-hint {
    display: block !important;
    margin-top: 0.65rem !important;
    line-height: 1.45 !important;
    padding: 0.5rem 0.7rem !important;
}

.captcha-container {
    margin: 1.5rem 0;
    padding: 1rem 1.15rem;
    width: fit-content;
    max-width: 100%;
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 12px;
    color: #f8fafc !important;
    box-sizing: border-box;
}

.captcha-container h3 {
    margin: 0 0 0.75rem;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.captcha-container .form-check,
.captcha-container .checkbox,
.captcha-container label,
.captcha-container .captcha,
.captcha-container .g-recaptcha,
.captcha-container iframe {
    color: #f8fafc !important;
}

.captcha-container .form-check-label,
.captcha-container .checkbox label,
.captcha-container span,
.captcha-container p {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
}

/* Native Joomla captcha checkbox card */
.captcha-container > div,
.captcha-container .controls,
.captcha-container .captcha {
    width: fit-content;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #f8fafc !important;
}

/* ========== SEZIONE LEGALE (TERMS & PRIVACY) ========== */
.legal-section {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-section h3 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
}

.checkbox-group {
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.checkbox-text {
    color: white;
    font-size: 15px;
    line-height: 1.6;
}

.checkbox-text a.legal-link {
    color: #64B5F6;
    text-decoration: none;
    font-weight: 700;
    padding: 2px 6px;
    border-bottom: 2px solid #64B5F6;
    transition: all 0.3s ease;
}

.checkbox-text a.legal-link:hover {
    color: #90CAF9;
    border-bottom-color: #90CAF9;
    background: rgba(100, 181, 246, 0.1);
}

.checkbox-text .legal-text {
    font-weight: 600;
}

/* GDPR Notice Box */
.gdpr-notice {
    background: rgba(33, 150, 243, 0.15);
    border-left: 4px solid #2196F3;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.gdpr-text {
    color: white;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.gdpr-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: #90CAF9;
}

/* Legal Documents Buttons */
.legal-links-box {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legal-document-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    background: rgba(100, 181, 246, 0.2);
    border: 2px solid rgba(100, 181, 246, 0.5);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    display: inline-block;
}

.legal-document-btn:hover {
    background: rgba(100, 181, 246, 0.35);
    border-color: #64B5F6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
    color: white;
    text-decoration: none;
}

/* ========== CAMPO DATA MIGLIORATO ========== */
.birthdate-group {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.birthdate-group:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.birthdate-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.label-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.birthdate-input {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 500;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

.birthdate-input:hover {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

.birthdate-group,
.birthdate-group * {
    box-sizing: border-box;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: inherit;
}

.avatar-image-wrapper {
    position: relative;
    overflow: hidden;
}

.avatar-image-wrapper .avatar-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #fff;
}

.filter-section {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-sizing: border-box;
}

.filter-section .filter-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    margin-bottom: 0 !important;
    align-items: end;
}

.filter-section .filter-group {
    min-width: 0;
    width: 100%;
}

.filter-section .filter-group label {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.filter-section .filter-group select,
.filter-section .filter-group input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/*
 * Fix: testo filtri invisibile (color:white su select + option su fondo chiaro OS).
 * Forza contrasto leggibile chiuso e aperto, senza dipendere da :hover.
 */
.filter-section .filter-group label,
.filter-group label {
    color: #f8fafc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.filter-select,
.filter-input,
.filter-section .filter-group select,
.filter-section .filter-group input,
.step-content select.filter-select,
.step-content input.filter-input {
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    background-image: none;
    -webkit-text-fill-color: #f8fafc !important;
    opacity: 1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.filter-select:hover,
.filter-input:hover,
.filter-section .filter-group select:hover,
.filter-section .filter-group input:hover,
.step-content select.filter-select:hover,
.step-content input.filter-input:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.filter-select:focus,
.filter-input:focus,
.filter-section .filter-group select:focus,
.filter-section .filter-group input:focus,
.step-content select.filter-select:focus,
.step-content input.filter-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* Dropdown list (OS native): keep readable options on solid panel */
.filter-select option,
.filter-section .filter-group select option,
.step-content select.filter-select option {
    color: #0f172a !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #0f172a !important;
}

.filter-input::placeholder {
    color: rgba(248, 250, 252, 0.65) !important;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .filter-section .filter-row {
        grid-template-columns: 1fr !important;
    }
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.hint-icon {
    font-size: 14px;
}

/* ========== BUTTONS ========== */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-primary {
    background: rgba(0, 123, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    font-weight: 600;
}

.btn-primary:hover {
    background: rgba(0, 123, 255, 1);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 28px rgba(0, 123, 255, 0.5);
    transform: translateY(-3px);
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .wizard-header h1 {
        font-size: 32px;
    }
    
    .wizard-header p {
        font-size: 16px;
    }
    
    .wizard-content {
        padding: 20px;
    }
    
    .avatars-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .wizard-progress {
        padding: 20px;
    }
    
    .wizard-progress::before {
        left: 40px;
        right: 40px;
    }
}

/* ========== ENHANCEMENTS: live validation, password meter, 3D preview ========== */

/* Inline field state */
.step-content input.field-valid,
.step-content select.field-valid {
    border-color: #2ecc71 !important;
}

.step-content input.field-invalid,
.step-content select.field-invalid {
    border-color: #ff6b6b !important;
}

/* Avatar name availability feedback */
.name-availability {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
    transition: color 0.2s ease;
}

.name-availability.checking {
    color: #f0ad4e;
}

.name-availability.available {
    color: #2ecc71;
}

.name-availability.unavailable {
    color: #ff6b6b;
    font-weight: 600;
}

/* Password strength meter */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.password-strength-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(128, 128, 128, 0.25);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.password-strength-bar.weak { background: #ff6b6b; }
.password-strength-bar.fair { background: #f0ad4e; }
.password-strength-bar.good { background: #5bc0de; }
.password-strength-bar.strong { background: #2ecc71; }

.password-strength-label {
    font-size: 12px;
    min-width: 70px;
    text-align: right;
}

.password-match {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}

.password-match.ok { color: #2ecc71; }
.password-match.ko { color: #ff6b6b; }

/* Interactive 3D avatar preview canvas */
.avatar-3d-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 12px;
    cursor: grab;
    touch-action: pan-y;
}

.avatar-3d-canvas:active {
    cursor: grabbing;
}

/* Accessibility: visible keyboard focus */
.step-content input:focus-visible,
.step-content select:focus-visible,
.step-content textarea:focus-visible,
.avatar-card:focus-visible,
.btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Mobile refinements */
@media (max-width: 480px) {
    .step-content input[type="text"],
    .step-content input[type="email"],
    .step-content input[type="password"],
    .step-content input[type="date"],
    .step-content select {
        font-size: 16px; /* prevents iOS zoom on focus */
        min-height: 44px; /* touch target */
    }

    .btn,
    .select-btn {
        min-height: 44px;
    }

    .password-strength-label {
        min-width: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .avatar-card,
    .avatar-card:hover,
    .password-strength-bar {
        transition: none !important;
        transform: none !important;
    }
}
