/* Stili principali per INSTASELL */
/* v2 - Material Design e animazioni */

:root {
    /* Colori principali */
    --primary-gradient-start: #9c27b0; /* Viola */
    --primary-gradient-end: #ff9800; /* Arancione */
    --text-primary-light: #212121;
    --text-secondary-light: #757575;
    --text-primary-dark: #ffffff;
    --text-secondary-dark: #b0b0b0;
    --divider-light: #e0e0e0;
    --divider-dark: #424242;
    --background-light: #f5f5f5;
    --background-dark: #121212;
    --card-background-light: #ffffff;
    --card-background-dark: #1e1e1e;
    --accent-color: #e91e63;
    --success-color: #4caf50;
    --warning-color: #ffc107;
    
    /* Elevazioni Material Design */
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --elevation-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    --elevation-3: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    --elevation-4: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    --elevation-5: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);
    
    /* Transizioni */
    --transition-standard: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-decelerate: all 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
    --transition-accelerate: all 0.3s cubic-bezier(0.4, 0.0, 1, 1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary-light);
    line-height: 1.6;
}

/* Tema scuro automatico */
@media (prefers-color-scheme: dark) {
    body.auto-theme {
        background-color: var(--background-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .sidebar-left,
    body.auto-theme .sidebar-right,
    body.auto-theme .product-card,
    body.auto-theme .welcome-message,
    body.auto-theme .profile-header,
    body.auto-theme .profile-tabs,
    body.auto-theme .profile-tab-content,
    body.auto-theme .user-list-item {
        background-color: var(--card-background-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .profile-tab {
        color: var(--text-secondary-dark);
    }
    
    body.auto-theme .profile-tab.active {
        color: var(--text-primary-dark);
        border-bottom-color: var(--primary-gradient-end);
    }
    
    body.auto-theme .user-stats,
    body.auto-theme .product-description,
    body.auto-theme .user-list-username {
        color: var(--text-secondary-dark);
    }
    
    body.auto-theme .sidebar-title,
    body.auto-theme .profile-section-title {
        border-bottom-color: var(--divider-dark);
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--elevation-2);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px;
    margin-right: 8px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    flex: 1;
    max-width: 400px;
    margin: 0 16px;
}

.search-bar i {
    margin-right: 8px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-icons {
    display: flex;
}

.icon-link {
    color: white;
    font-size: 24px;
    margin-left: 16px;
    text-decoration: none;
    position: relative;
    transition: var(--transition-standard);
}

.icon-link:hover {
    transform: scale(1.1);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.footer .icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    font-size: 20px;
}

.footer .icon-link span {
    font-size: 12px;
    margin-top: 4px;
}

/* Contenuto principale - Layout Instagram-style */
.main-content {
    display: flex;
    justify-content: center;
    padding: 16px;
    margin-bottom: 60px;
    min-height: calc(100vh - 120px);
}

/* Sidebar */
.sidebar-left, .sidebar-right {
    width: 280px;
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 16px;
    margin: 0 16px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
    transition: var(--transition-standard);
    height: fit-content;
    position: sticky;
    top: 80px;
}

/* Nascondi sidebar su schermi piccoli */
@media (max-width: 1200px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 992px) {
    .sidebar-left {
        display: none;
    }
}

.sidebar-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider-light);
}

/* Profili utente nella sidebar */
.user-profiles {
    height: 500px;
    overflow: hidden;
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
}

.user-stats {
    font-size: 12px;
    color: var(--text-secondary-light);
}

/* Pulsante segui */
.follow-btn {
    padding: 6px 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.follow-btn:hover {
    box-shadow: var(--elevation-1);
}

.follow-btn.following {
    background: #757575;
}

/* Vendite e recensioni nella sidebar */
.sale-review-container {
    height: 500px;
    overflow: hidden;
    position: relative;
}

.sale-review-item {
    display: flex;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: var(--transition-standard);
}

.sale-item {
    align-items: center;
}

.sale-image {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
}

.sale-info {
    flex: 1;
}

.sale-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.sale-price {
    color: var(--success-color);
    font-weight: 700;
    margin-bottom: 4px;
}

.sale-date {
    font-size: 12px;
    color: var(--text-secondary-light);
}

.review-item {
    flex-direction: column;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-stars {
    color: var(--warning-color);
}

.review-author {
    font-weight: 500;
}

.review-text {
    font-size: 14px;
}

/* Feed centrale - Instagram style */
.feed {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Messaggio di benvenuto */
.welcome-message {
    text-align: center;
    padding: 48px;
    background-color: var(--card-background-light);
    border-radius: 8px;
    box-shadow: var(--elevation-1);
    margin-bottom: 24px;
}

.welcome-message h2 {
    margin-bottom: 16px;
}

.welcome-message p {
    margin-bottom: 24px;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scheda prodotto - Instagram style */
.product-card {
    background-color: var(--card-background-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
    transition: var(--transition-standard);
    width: 100%;
}

.product-card:hover {
    box-shadow: var(--elevation-3);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}

.product-user {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.product-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.product-user-name {
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 16px;
}

.product-action {
    cursor: pointer;
    transition: var(--transition-standard);
}

.product-action:hover {
    color: var(--primary-gradient-start);
}

.product-action.liked {
    color: var(--accent-color);
}

.product-image-container {
    position: relative;
    padding-top: 100%;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: 16px;
}

.product-title {
    font-weight: 500;
    margin-bottom: 8px;
}

.product-description {
    font-size: 14px;
    color: var(--text-secondary-light);
    margin-bottom: 12px;
}

.product-price {
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 12px;
}

.product-spots {
    margin-bottom: 16px;
}

.spots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 14px;
}

.spots-progress {
    height: 4px;
    background-color: var(--divider-light);
    border-radius: 2px;
    overflow: hidden;
}

.spots-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    border-radius: 2px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--divider-light);
}

.product-footer-actions {
    display: flex;
    gap: 16px;
}

.product-book-btn {
    display: inline-block;
    padding: 10px 16px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
    text-decoration: none;
    text-align: center;
}

.product-book-btn:hover {
    box-shadow: var(--elevation-2);
}

/* Modal di prenotazione */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-standard);
}

.booking-modal.active {
    opacity: 1;
    visibility: visible;
}

.booking-modal-content {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--elevation-3);
}

.booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.booking-modal-title {
    font-size: 20px;
    font-weight: 500;
}

.booking-modal-close {
    cursor: pointer;
}

.booking-product-info {
    display: flex;
    margin-bottom: 24px;
}

.booking-product-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    margin-right: 16px;
    object-fit: cover;
}

.booking-product-details {
    flex: 1;
}

.booking-product-title {
    font-weight: 500;
    margin-bottom: 8px;
}

.booking-product-price {
    color: var(--success-color);
    font-weight: 700;
}

.booking-spots-container {
    margin-bottom: 24px;
}

.booking-spots-label {
    margin-bottom: 12px;
    font-weight: 500;
}

.booking-spots-selector {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.booking-spots-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--divider-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
}

.booking-spots-button:hover {
    background-color: var(--divider-dark);
    color: white;
}

.booking-spots-input {
    width: 60px;
    height: 36px;
    text-align: center;
    margin: 0 12px;
    border: 1px solid var(--divider-light);
    border-radius: 4px;
}

.booking-spots-total {
    font-weight: 500;
}

.booking-spots-price {
    color: var(--success-color);
    font-weight: 700;
}

.booking-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.booking-modal-action {
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
    margin-left: 12px;
}

.booking-modal-cancel {
    background-color: var(--divider-light);
}

.booking-modal-confirm {
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
}

.booking-modal-confirm:hover {
    box-shadow: var(--elevation-2);
}

/* Modal di condivisione */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-standard);
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--elevation-3);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.share-modal-title {
    font-size: 20px;
    font-weight: 500;
}

.share-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
    background: none;
    border: none;
    font-size: 24px;
}

.share-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.share-options {
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.share-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 8px;
    transition: var(--transition-standard);
}

.share-option:hover .share-option-icon {
    transform: scale(1.1);
}

.share-option-label {
    font-size: 12px;
}

.share-link {
    display: flex;
}

.share-link-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--divider-light);
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.share-link-copy {
    padding: 12px 16px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.share-link-copy:hover {
    box-shadow: var(--elevation-1);
}

/* Messaggi vuoti */
.empty-sidebar-message {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-message {
    text-align: center;
    padding: 16px;
}

.empty-message i {
    font-size: 32px;
    color: var(--primary-gradient-start);
    margin-bottom: 8px;
}

.empty-message p {
    font-size: 14px;
    color: var(--text-secondary-light);
}

/* Animazioni di scorrimento automatico */
.auto-scroll {
    animation: scroll-y linear infinite;
}

@keyframes scroll-y {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Effetti Material Design */
.material-elevation {
    box-shadow: var(--elevation-1);
    transition: var(--elevation-standard);
}

.material-elevation:hover {
    box-shadow: var(--elevation-2);
}

.material-hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Notifiche */
.notification {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #323232;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: var(--elevation-2);
    z-index: 1000;
    transition: var(--transition-standard);
    opacity: 0;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Pagina di login e registrazione */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
    background-color: var(--card-background-light);
    border-radius: 8px;
    box-shadow: var(--elevation-1);
    margin-top: 48px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header img {
    height: 48px;
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary-light);
}

.auth-form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider-light);
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: var(--primary-gradient-start);
    outline: none;
}

.auth-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.auth-btn:hover {
    box-shadow: var(--elevation-2);
}

.auth-links {
    text-align: center;
    font-size: 14px;
}

.auth-links a {
    color: var(--primary-gradient-start);
    text-decoration: none;
}

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

/* Pagina di verifica email */
.verify-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
    background-color: var(--card-background-light);
    border-radius: 8px;
    box-shadow: var(--elevation-1);
    margin-top: 48px;
    text-align: center;
}

.verify-header {
    margin-bottom: 24px;
}

.verify-header i {
    font-size: 48px;
    color: var(--primary-gradient-start);
    margin-bottom: 16px;
}

.verify-header h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.verify-header p {
    font-size: 14px;
    color: var(--text-secondary-light);
}

.verify-code {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.verify-code input {
    width: 40px;
    height: 48px;
    text-align: center;
    font-size: 24px;
    border: 1px solid var(--divider-light);
    border-radius: 4px;
}

.verify-code input:focus {
    border-color: var(--primary-gradient-start);
    outline: none;
}

.verify-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.verify-btn:hover {
    box-shadow: var(--elevation-2);
}

.verify-resend {
    margin-top: 16px;
    font-size: 14px;
}

.verify-resend a {
    color: var(--primary-gradient-start);
    text-decoration: none;
}

.verify-resend a:hover {
    text-decoration: underline;
}

/* Pagina di profilo */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    margin-bottom: 60px;
}

.profile-header {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--elevation-1);
    display: flex;
    flex-wrap: wrap;
}

.profile-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 24px;
    cursor: pointer;
    position: relative;
}

.profile-avatar-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: var(--transition-standard);
}

.profile-avatar-container:hover::after {
    opacity: 1;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-bio {
    font-size: 14px;
    color: var(--text-secondary-light);
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.profile-stat-count {
    font-size: 18px;
    font-weight: 700;
}

.profile-stat-label {
    font-size: 12px;
    color: var(--text-secondary-light);
}

.profile-actions {
    display: flex;
    gap: 16px;
}

.profile-action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.edit-profile-btn {
    background-color: var(--divider-light);
    color: var(--text-primary-light);
    border: none;
}

.follow-profile-btn {
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
}

.follow-profile-btn.following {
    background: #757575;
}

.profile-tabs {
    background-color: var(--card-background-light);
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: var(--elevation-1);
    display: flex;
    overflow-x: auto;
}

.profile-tab {
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary-light);
    cursor: pointer;
    transition: var(--transition-standard);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.profile-tab.active {
    color: var(--text-primary-light);
    border-bottom-color: var(--primary-gradient-end);
}

.profile-tab-content {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--elevation-1);
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* Prodotti nel profilo */
.profile-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.profile-product-card {
    background-color: var(--card-background-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
    transition: var(--transition-standard);
}

.profile-product-card:hover {
    box-shadow: var(--elevation-2);
}

.profile-product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.profile-product-content {
    padding: 12px;
}

.profile-product-title {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-product-price {
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 8px;
}

.profile-product-spots {
    margin-bottom: 12px;
}

.profile-spots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
}

.profile-spots-progress {
    height: 4px;
    background-color: var(--divider-light);
    border-radius: 2px;
    overflow: hidden;
}

.profile-spots-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    border-radius: 2px;
}

.profile-product-actions {
    display: flex;
    justify-content: space-between;
}

.profile-product-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
    background-color: var(--divider-light);
}

.profile-product-action:hover {
    background-color: var(--divider-dark);
    color: white;
}

.profile-product-action.liked {
    color: var(--accent-color);
}

/* Numeri accreditati */
.booking-code-item {
    background-color: var(--card-background-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
    margin-bottom: 16px;
}

.booking-code-header {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--divider-light);
}

.booking-code-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    margin-right: 16px;
    object-fit: cover;
}

.booking-code-info {
    flex: 1;
}

.booking-code-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.booking-code-price {
    color: var(--success-color);
    font-weight: 700;
}

.booking-code-list {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.booking-code {
    background-color: var(--divider-light);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
}

.booking-code-number {
    font-weight: 700;
    margin-bottom: 4px;
}

.booking-code-date {
    font-size: 12px;
    color: var(--text-secondary-light);
}

/* Modal di follower/seguiti */
.user-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-standard);
}

.user-list-modal.active {
    opacity: 1;
    visibility: visible;
}

.user-list-content {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--elevation-3);
}

.user-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--divider-light);
}

.user-list-title {
    font-size: 20px;
    font-weight: 500;
}

.user-list-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
    background: none;
    border: none;
    font-size: 24px;
}

.user-list-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-standard);
}

.user-list-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.user-list-info {
    flex: 1;
}

.user-list-name {
    font-weight: 500;
}

.user-list-username {
    font-size: 12px;
    color: var(--text-secondary-light);
}

.user-list-follow-btn {
    padding: 6px 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.user-list-follow-btn:hover {
    box-shadow: var(--elevation-1);
}

.user-list-follow-btn.following {
    background: #757575;
}

/* Modal dell'avatar */
.avatar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-standard);
}

.avatar-modal.active {
    opacity: 1;
    visibility: visible;
}

.avatar-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.avatar-modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
}

.avatar-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
}

.avatar-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Pagina di caricamento prodotto */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    margin-bottom: 60px;
}

.upload-header {
    margin-bottom: 24px;
}

.upload-header h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.upload-header p {
    font-size: 14px;
    color: var(--text-secondary-light);
}

.upload-form {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--elevation-1);
}

.upload-section {
    margin-bottom: 24px;
}

.upload-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider-light);
}

.upload-field {
    margin-bottom: 16px;
}

.upload-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-field input,
.upload-field textarea,
.upload-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider-light);
    border-radius: 4px;
    font-size: 14px;
}

.upload-field input:focus,
.upload-field textarea:focus,
.upload-field select:focus {
    border-color: var(--primary-gradient-start);
    outline: none;
}

.upload-field textarea {
    min-height: 120px;
    resize: vertical;
}

.upload-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.upload-image-item {
    position: relative;
    padding-top: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
}

.upload-image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
}

.upload-image-remove:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.upload-image-add {
    padding-top: 100%;
    border: 2px dashed var(--divider-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-standard);
    position: relative;
}

.upload-image-add:hover {
    border-color: var(--primary-gradient-start);
}

.upload-image-add i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: var(--text-secondary-light);
}

.upload-image-input {
    display: none;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.upload-btn:hover {
    box-shadow: var(--elevation-2);
}

/* Pagina di pagamento */
.payment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    margin-bottom: 60px;
}

.payment-header {
    margin-bottom: 24px;
}

.payment-header h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.payment-header p {
    font-size: 14px;
    color: var(--text-secondary-light);
}

.payment-summary {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--elevation-1);
}

.payment-product {
    display: flex;
    margin-bottom: 24px;
}

.payment-product-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    margin-right: 16px;
    object-fit: cover;
}

.payment-product-details {
    flex: 1;
}

.payment-product-title {
    font-weight: 500;
    margin-bottom: 8px;
}

.payment-product-price {
    color: var(--success-color);
    font-weight: 700;
}

.payment-details {
    margin-bottom: 24px;
}

.payment-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.payment-detail-label {
    font-weight: 500;
}

.payment-detail-value {
    font-weight: 700;
}

.payment-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--divider-light);
    font-size: 18px;
}

.payment-total-label {
    font-weight: 500;
}

.payment-total-value {
    font-weight: 700;
    color: var(--success-color);
}

.payment-methods {
    background-color: var(--card-background-light);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--elevation-1);
}

.payment-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider-light);
}

.payment-method {
    margin-bottom: 16px;
}

.payment-method-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

.payment-method-radio {
    margin-right: 8px;
}

.payment-method-label {
    font-weight: 500;
    margin-right: 8px;
}

.payment-method-icon {
    width: 32px;
    height: 20px;
    object-fit: contain;
}

.payment-method-content {
    padding-left: 24px;
    display: none;
}

.payment-method-content.active {
    display: block;
}

.payment-field {
    margin-bottom: 16px;
}

.payment-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.payment-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider-light);
    border-radius: 4px;
    font-size: 14px;
}

.payment-field input:focus {
    border-color: var(--primary-gradient-start);
    outline: none;
}

.payment-card-row {
    display: flex;
    gap: 16px;
}

.payment-card-row .payment-field {
    flex: 1;
}

.payment-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
    margin-top: 24px;
}

.payment-btn:hover {
    box-shadow: var(--elevation-2);
}

/* Pagina di notifiche */
.notifications-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    margin-bottom: 60px;
}

.notifications-header {
    margin-bottom: 24px;
}

.notifications-header h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
}

.notifications-header p {
    font-size: 14px;
    color: var(--text-secondary-light);
}

.notifications-list {
    background-color: var(--card-background-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--elevation-1);
}

.notification-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--divider-light);
    transition: var(--transition-standard);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.notification-item.unread {
    background-color: rgba(156, 39, 176, 0.05);
}

.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 16px;
    object-fit: cover;
}

.notification-content {
    flex: 1;
}

.notification-text {
    margin-bottom: 4px;
}

.notification-text a {
    font-weight: 500;
    color: var(--text-primary-light);
    text-decoration: none;
}

.notification-text a:hover {
    text-decoration: underline;
}

.notification-time {
    font-size: 12px;
    color: var(--text-secondary-light);
}

.notification-action {
    margin-left: 16px;
    align-self: center;
}

.notification-btn {
    padding: 6px 12px;
    background: linear-gradient(to right, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-standard);
}

.notification-btn:hover {
    box-shadow: var(--elevation-1);
}

.notification-btn.following {
    background: #757575;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar-container {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .payment-card-row {
        flex-direction: column;
        gap: 0;
    }
    
    .booking-modal-content,
    .share-modal-content,
    .user-list-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .profile-products {
        grid-template-columns: 1fr;
    }
    
    .upload-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .booking-code-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animazioni di transizione tra pagine */
.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Stili per la modalità scura */
body.dark-theme {
    background-color: var(--background-dark);
    color: var(--text-primary-dark);
}

body.dark-theme .sidebar-left,
body.dark-theme .sidebar-right,
body.dark-theme .product-card,
body.dark-theme .welcome-message,
body.dark-theme .profile-header,
body.dark-theme .profile-tabs,
body.dark-theme .profile-tab-content,
body.dark-theme .user-list-item,
body.dark-theme .booking-modal-content,
body.dark-theme .share-modal-content,
body.dark-theme .user-list-content,
body.dark-theme .auth-container,
body.dark-theme .verify-container,
body.dark-theme .upload-form,
body.dark-theme .payment-summary,
body.dark-theme .payment-methods,
body.dark-theme .notifications-list {
    background-color: var(--card-background-dark);
    color: var(--text-primary-dark);
}

body.dark-theme .profile-tab {
    color: var(--text-secondary-dark);
}

body.dark-theme .profile-tab.active {
    color: var(--text-primary-dark);
    border-bottom-color: var(--primary-gradient-end);
}

body.dark-theme .user-stats,
body.dark-theme .product-description,
body.dark-theme .user-list-username,
body.dark-theme .profile-bio,
body.dark-theme .profile-stat-label,
body.dark-theme .booking-code-date,
body.dark-theme .auth-header p,
body.dark-theme .upload-header p,
body.dark-theme .payment-header p,
body.dark-theme .notifications-header p,
body.dark-theme .notification-time {
    color: var(--text-secondary-dark);
}

body.dark-theme .sidebar-title,
body.dark-theme .profile-section-title,
body.dark-theme .upload-section-title,
body.dark-theme .payment-section-title,
body.dark-theme .user-list-header,
body.dark-theme .payment-total {
    border-bottom-color: var(--divider-dark);
}

body.dark-theme .upload-image-add {
    border-color: var(--divider-dark);
}

body.dark-theme .upload-field input,
body.dark-theme .upload-field textarea,
body.dark-theme .upload-field select,
body.dark-theme .payment-field input,
body.dark-theme .form-group input,
body.dark-theme .booking-spots-input,
body.dark-theme .share-link-input,
body.dark-theme .verify-code input {
    background-color: var(--card-background-dark);
    color: var(--text-primary-dark);
    border-color: var(--divider-dark);
}

body.dark-theme .notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .notification-item.unread {
    background-color: rgba(156, 39, 176, 0.15);
}

body.dark-theme .notification-text a {
    color: var(--text-primary-dark);
}

body.dark-theme .user-profile:hover,
body.dark-theme .user-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .edit-profile-btn {
    background-color: var(--divider-dark);
    color: var(--text-primary-dark);
}

body.dark-theme .booking-spots-button {
    background-color: var(--divider-dark);
    color: var(--text-primary-dark);
}

body.dark-theme .booking-spots-button:hover {
    background-color: var(--divider-light);
    color: var(--text-primary-light);
}

body.dark-theme .booking-modal-cancel {
    background-color: var(--divider-dark);
    color: var(--text-primary-dark);
}

body.dark-theme .profile-product-action {
    background-color: var(--divider-dark);
    color: var(--text-primary-dark);
}

body.dark-theme .profile-product-action:hover {
    background-color: var(--divider-light);
    color: var(--text-primary-light);
}

body.dark-theme .booking-code {
    background-color: var(--divider-dark);
    color: var(--text-primary-dark);
}

/* Stili per il tema automatico */
@media (prefers-color-scheme: dark) {
    body.auto-theme {
        background-color: var(--background-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .sidebar-left,
    body.auto-theme .sidebar-right,
    body.auto-theme .product-card,
    body.auto-theme .welcome-message,
    body.auto-theme .profile-header,
    body.auto-theme .profile-tabs,
    body.auto-theme .profile-tab-content,
    body.auto-theme .user-list-item,
    body.auto-theme .booking-modal-content,
    body.auto-theme .share-modal-content,
    body.auto-theme .user-list-content,
    body.auto-theme .auth-container,
    body.auto-theme .verify-container,
    body.auto-theme .upload-form,
    body.auto-theme .payment-summary,
    body.auto-theme .payment-methods,
    body.auto-theme .notifications-list {
        background-color: var(--card-background-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .profile-tab {
        color: var(--text-secondary-dark);
    }
    
    body.auto-theme .profile-tab.active {
        color: var(--text-primary-dark);
        border-bottom-color: var(--primary-gradient-end);
    }
    
    body.auto-theme .user-stats,
    body.auto-theme .product-description,
    body.auto-theme .user-list-username,
    body.auto-theme .profile-bio,
    body.auto-theme .profile-stat-label,
    body.auto-theme .booking-code-date,
    body.auto-theme .auth-header p,
    body.auto-theme .upload-header p,
    body.auto-theme .payment-header p,
    body.auto-theme .notifications-header p,
    body.auto-theme .notification-time {
        color: var(--text-secondary-dark);
    }
    
    body.auto-theme .sidebar-title,
    body.auto-theme .profile-section-title,
    body.auto-theme .upload-section-title,
    body.auto-theme .payment-section-title,
    body.auto-theme .user-list-header,
    body.auto-theme .payment-total {
        border-bottom-color: var(--divider-dark);
    }
    
    body.auto-theme .upload-image-add {
        border-color: var(--divider-dark);
    }
    
    body.auto-theme .upload-field input,
    body.auto-theme .upload-field textarea,
    body.auto-theme .upload-field select,
    body.auto-theme .payment-field input,
    body.auto-theme .form-group input,
    body.auto-theme .booking-spots-input,
    body.auto-theme .share-link-input,
    body.auto-theme .verify-code input {
        background-color: var(--card-background-dark);
        color: var(--text-primary-dark);
        border-color: var(--divider-dark);
    }
    
    body.auto-theme .notification-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    body.auto-theme .notification-item.unread {
        background-color: rgba(156, 39, 176, 0.15);
    }
    
    body.auto-theme .notification-text a {
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .user-profile:hover,
    body.auto-theme .user-list-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    body.auto-theme .edit-profile-btn {
        background-color: var(--divider-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .booking-spots-button {
        background-color: var(--divider-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .booking-spots-button:hover {
        background-color: var(--divider-light);
        color: var(--text-primary-light);
    }
    
    body.auto-theme .booking-modal-cancel {
        background-color: var(--divider-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .profile-product-action {
        background-color: var(--divider-dark);
        color: var(--text-primary-dark);
    }
    
    body.auto-theme .profile-product-action:hover {
        background-color: var(--divider-light);
        color: var(--text-primary-light);
    }
    
    body.auto-theme .booking-code {
        background-color: var(--divider-dark);
        color: var(--text-primary-dark);
    }
}
