/**
 * Stili per le pagine di autenticazione e profilo utente
 * /u/login, /u/register, /u/profile, /u/complete-profile
 */

/* Container principale */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* Language switcher nelle pagine auth - posizionato in alto a destra */
.auth-lang-switcher {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.auth-lang-switcher .lang-button {
    background: rgba(255,255,255,0.95);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.auth-lang-switcher .lang-button:hover {
    background: white;
}

.auth-lang-switcher .lang-dropdown {
    right: 0;
}

/* Card centrale */
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-card.wide {
    max-width: 560px;
    padding: 2.5rem;
}

.auth-card.extra-wide {
    max-width: 700px;
    padding: 2rem;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-logo .logo-icon {
    color: #667eea;
}

/* Titoli */
.auth-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group label .optional {
    font-weight: 400;
    color: #999;
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input:read-only {
    background: #f5f5f5;
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Form row (due colonne) */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Social grid */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Messaggi */
.error-message {
    background: #fee;
    color: #c00;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.success-message {
    background: #efe;
    color: #060;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Pulsanti */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    width: 100%;
    padding: 1rem;
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 0.75rem;
}

.btn-secondary:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.btn-skip {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-skip:hover {
    color: #667eea;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: #999;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
}

/* Social buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
}

.btn-social:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.btn-social svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Section title */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* ========================
   Pagina Profilo
   ======================== */

.profile-page {
    min-height: 100vh;
    background: #f5f5f5;
}

.profile-header-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
}

.profile-header-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header-bar .logo {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-lang-switcher .lang-button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.profile-lang-switcher .lang-button:hover {
    background: rgba(255,255,255,0.3);
}

.profile-lang-switcher .lang-code {
    color: white;
}

.profile-lang-switcher .lang-arrow {
    color: rgba(255,255,255,0.7);
}

.profile-header-bar .back-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

.profile-header-bar .back-link:hover {
    opacity: 1;
}

.profile-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
}

.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    font-weight: 600;
}

/* Complete profile: avatar centrato */
.profile-header.centered {
    flex-direction: column;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
}

.profile-header.centered .profile-avatar,
.profile-header.centered .profile-avatar-placeholder {
    margin: 0 auto 1rem;
}

.profile-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.profile-info p {
    color: #666;
    font-size: 0.95rem;
}

.profile-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.badge-creator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-editor {
    background: linear-gradient(135deg, #bcfdb9 0%, #7acb72 100%);
    color: black;
}


.badge-user {
    background: #e0e0e0;
    color: #666;
}

/* Creator info box */
.creator-info {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.creator-info h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.creator-info p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* ========================
   Responsive
   ======================== */

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .auth-card {
        padding: 2rem;
    }
}
