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

:root {
    --primary: #9D4EDD;
    --secondary: #C77DFF;
    --dark-purple: #5A189A;
    --deep-purple: #3C096C;
    --light-purple: #E0AAFF;
    --black: #0A0A0A;
    --dark-gray: #1A1A1A;
    --light-gray: #2A2A2A;
    --white: #FAFAFA;
    --accent: #B185DB;
}

body {
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(135deg, #0A0A0A 0%, #3C096C 50%, #240046 100%);
    color: var(--white);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(199, 125, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(224, 170, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
    z-index: 1;
}

header {
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 8px 32px rgba(157, 78, 221, 0.2);
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
}

h1 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #C77DFF 0%, #E0AAFF 50%, #9D4EDD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-style: italic;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}

.tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
    padding-top: 20px;
}

.tab {
    padding: 16px 40px;
    text-decoration: none;
    color: rgba(250, 250, 250, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Raleway', sans-serif;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.6);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(199, 125, 255, 0.5);
}

.tab:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.tab.active {
    color: var(--secondary);
    font-weight: 600;
    text-shadow: 0 0 20px rgba(199, 125, 255, 0.6);
}

.tab.active::before {
    transform: translateX(-50%) scaleX(1);
}

.content {
    background: linear-gradient(135deg, 
        rgba(60, 9, 108, 0.4) 0%, 
        rgba(90, 24, 154, 0.3) 50%,
        rgba(157, 78, 221, 0.2) 100%);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 16px;
    border: 1px solid rgba(199, 125, 255, 0.3);
    box-shadow: 
        0 20px 60px rgba(157, 78, 221, 0.3),
        inset 0 1px 0 rgba(224, 170, 255, 0.1),
        0 0 80px rgba(157, 78, 221, 0.2);
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(199, 125, 255, 0.6), 
        transparent);
    box-shadow: 0 0 15px rgba(199, 125, 255, 0.4);
}

h2 {
    font-family: 'Playfair Display', serif;
    color: var(--light-purple);
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-style: italic;
    text-shadow: 0 0 30px rgba(224, 170, 255, 0.4);
}

p {
    color: rgba(250, 250, 250, 0.85);
    font-size: 1.05rem;
    line-height: 1.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Animazione elegante per il caricamento */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar personalizzata */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--dark-purple));
    border-radius: 6px;
    border: 2px solid var(--black);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--primary));
    box-shadow: 0 0 15px rgba(199, 125, 255, 0.7);
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(250, 250, 250, 0.6);
    font-weight: 300;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* Influencers Grid */
.influencers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Influencer Card */
.influencer-card {
    background: linear-gradient(135deg, 
        rgba(60, 9, 108, 0.5) 0%, 
        rgba(90, 24, 154, 0.4) 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(199, 125, 255, 0.2);
    box-shadow: 
        0 10px 40px rgba(157, 78, 221, 0.2),
        inset 0 1px 0 rgba(224, 170, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.influencer-card:hover {
    transform: translateY(-10px);
    border-color: rgba(199, 125, 255, 0.5);
    box-shadow: 
        0 20px 60px rgba(157, 78, 221, 0.4),
        inset 0 1px 0 rgba(224, 170, 255, 0.2),
        0 0 40px rgba(199, 125, 255, 0.3);
}

.card-image {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.influencer-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, 
        rgba(10, 10, 10, 0.9) 0%, 
        rgba(10, 10, 10, 0.5) 50%,
        transparent 100%);
    pointer-events: none;
}

.card-content {
    padding: 25px;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.8) 0%, 
        rgba(42, 42, 42, 0.6) 100%);
}

.influencer-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--light-purple);
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-style: italic;
    text-shadow: 0 0 20px rgba(224, 170, 255, 0.3);
}

.influencer-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: rgba(250, 250, 250, 0.7);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.info-item svg {
    color: var(--secondary);
    filter: drop-shadow(0 0 5px rgba(199, 125, 255, 0.5));
}

/* Animazioni per le card */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.influencer-card {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.influencer-card:nth-child(1) { animation-delay: 0.1s; }
.influencer-card:nth-child(2) { animation-delay: 0.2s; }
.influencer-card:nth-child(3) { animation-delay: 0.3s; }
.influencer-card:nth-child(4) { animation-delay: 0.4s; }
.influencer-card:nth-child(5) { animation-delay: 0.5s; }
.influencer-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
    .influencers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

/* Header with Action Button */
.header-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: 
        0 8px 24px rgba(157, 78, 221, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(157, 78, 221, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 30px rgba(199, 125, 255, 0.4);
}

.btn-secondary {
    background: rgba(42, 42, 42, 0.8);
    color: rgba(250, 250, 250, 0.8);
    border: 1px solid rgba(199, 125, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(60, 9, 108, 0.4);
    border-color: rgba(199, 125, 255, 0.5);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    color: var(--white);
    box-shadow: 
        0 8px 24px rgba(220, 38, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(220, 38, 38, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 30px rgba(239, 68, 68, 0.4);
}

/* Edit Icon on Cards */
.card-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.action-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(199, 125, 255, 0.3);
    color: var(--secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.edit-icon:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(199, 125, 255, 0.6);
}

.delete-icon {
    border-color: rgba(220, 38, 38, 0.3);
    color: #EF4444;
}

.delete-icon:hover {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    border-color: #EF4444;
}

/* Detail Page */
.header-with-back {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(250, 250, 250, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: fit-content;
}

.back-link:hover {
    color: var(--secondary);
    gap: 12px;
}

.detail-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Form Styles */
.influencer-form {
    background: linear-gradient(135deg, 
        rgba(60, 9, 108, 0.5) 0%, 
        rgba(90, 24, 154, 0.4) 100%);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(199, 125, 255, 0.3);
    box-shadow: 
        0 20px 60px rgba(157, 78, 221, 0.3),
        inset 0 1px 0 rgba(224, 170, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-section {
    position: sticky;
    top: 20px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.8) 0%, 
        rgba(42, 42, 42, 0.6) 100%);
    border: 2px solid rgba(199, 125, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 40px rgba(157, 78, 221, 0.2),
        inset 0 1px 0 rgba(224, 170, 255, 0.1);
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(199, 125, 255, 0.3);
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    background: rgba(60, 9, 108, 0.3);
    color: var(--secondary);
}

.btn-upload:hover {
    background: rgba(90, 24, 154, 0.5);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(157, 78, 221, 0.3);
}

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

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: rgba(250, 250, 250, 0.4);
}

.image-placeholder svg {
    color: var(--secondary);
    opacity: 0.5;
}

.image-placeholder p {
    font-size: 0.9rem;
    font-weight: 300;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-purple);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input {
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(199, 125, 255, 0.3);
    background: rgba(26, 26, 26, 0.6);
    color: var(--white);
    font-size: 1rem;
    font-family: 'Raleway', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-group textarea {
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(199, 125, 255, 0.3);
    background: rgba(26, 26, 26, 0.6);
    color: var(--white);
    font-size: 1rem;
    font-family: 'Raleway', sans-serif;
    transition: all 0.3s ease;
    outline: none;
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--secondary);
    background: rgba(26, 26, 26, 0.8);
    box-shadow: 0 0 20px rgba(199, 125, 255, 0.3);
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: rgba(250, 250, 250, 0.3);
}

.form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-hint {
    font-size: 0.85rem;
    color: rgba(250, 250, 250, 0.5);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(199, 125, 255, 0.2);
}

/* Responsive Form */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .image-section {
        position: static;
    }
    
    .form-row-inline {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .header-title-section {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Reference Images Section */
.reference-images-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.6) 0%, 
        rgba(42, 42, 42, 0.4) 100%);
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--light-purple);
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-style: italic;
}

.section-subtitle {
    font-size: 0.95rem;
    color: rgba(250, 250, 250, 0.6);
    margin-bottom: 25px;
    font-weight: 300;
}

.reference-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.reference-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(26, 26, 26, 0.4);
    border: 1px solid rgba(199, 125, 255, 0.2);
    transition: all 0.3s ease;
}

.reference-image-item:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(157, 78, 221, 0.3);
}

.reference-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-reference-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.reference-image-item:hover .delete-reference-btn {
    opacity: 1;
}

.delete-reference-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.delete-reference-btn svg {
    color: white;
}

.no-references {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: rgba(250, 250, 250, 0.4);
}

.no-references svg {
    color: rgba(199, 125, 255, 0.3);
    margin-bottom: 15px;
}

.no-references p {
    font-size: 1rem;
    font-weight: 300;
}

.upload-reference-form {
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .reference-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .reference-images-section {
        padding: 20px;
        margin-top: 30px;
    }
}

/* Contents Page Styles */
.contents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.contents-header h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin: 0;
}

.contents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.content-card {
    background: linear-gradient(135deg, 
        rgba(60, 9, 108, 0.5) 0%, 
        rgba(90, 24, 154, 0.4) 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(199, 125, 255, 0.2);
    box-shadow: 
        0 10px 40px rgba(157, 78, 221, 0.2),
        inset 0 1px 0 rgba(224, 170, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.content-card:hover {
    transform: translateY(-10px);
    border-color: rgba(199, 125, 255, 0.5);
    box-shadow: 
        0 20px 60px rgba(157, 78, 221, 0.4),
        inset 0 1px 0 rgba(224, 170, 255, 0.2),
        0 0 40px rgba(199, 125, 255, 0.3);
}

.content-card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(157, 78, 221, 0.2);
    position: absolute;
    left: 0;
    right: 0;
    z-index: 4;
}

.content-type-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.content-type-carousel {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.content-type-video {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.content-media {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
}

.content-image,
.content-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover .content-image,
.content-card:hover .content-video {
    transform: scale(1.1);
}

.content-carousel {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    height: 100%;
    scroll-snap-type: x mandatory;
}

.content-carousel::-webkit-scrollbar {
    height: 8px;
}

.content-carousel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.content-carousel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.carousel-image {
    flex: 0 0 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.content-body {
    padding: 25px;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.8) 0%, 
        rgba(42, 42, 42, 0.6) 100%);
}

.content-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--light-purple);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-style: italic;
    text-shadow: 0 0 20px rgba(224, 170, 255, 0.3);
}

.content-description {
    color: rgba(250, 250, 250, 0.7);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
}

.content-influencer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
}

.influencer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.content-influencer span {
    color: rgba(250, 250, 250, 0.7);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Animazioni per le card dei contenuti */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.content-card {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }
.content-card:nth-child(5) { animation-delay: 0.5s; }
.content-card:nth-child(6) { animation-delay: 0.6s; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(60, 9, 108, 0.95) 100%);
    border: 1px solid rgba(157, 78, 221, 0.4);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(157, 78, 221, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
}

.modal-header h3 {
    margin: 0;
    color: var(--secondary);
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(157, 78, 221, 0.2);
    transform: rotate(90deg);
}

#contentForm {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--light-purple);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
}

.form-control option {
    background: var(--dark-gray);
    color: var(--white);
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--light-purple);
    opacity: 0.7;
    font-size: 0.85rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--light-purple);
}

.empty-state svg {
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.empty-state p {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .contents-grid {
        grid-template-columns: 1fr;
    }
    
    .contents-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* Content Detail Page Styles */
.content-form {
    width: 100%;
}

.content-form .form-section {
    width: 100%;
}

.content-form select,
.content-form input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
}

.content-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
}

.content-form select option {
    background: var(--dark-gray);
    color: var(--white);
}

.content-form input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.content-form input[type="file"]::file-selector-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.content-form input[type="file"]::file-selector-button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.content-preview-section {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-preview-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 20px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(157, 78, 221, 0.2), inset 0 1px 0 rgba(224, 170, 255, 0.1);
}

.content-placeholder {
    text-align: center;
    color: var(--light-purple);
    opacity: 0.5;
    padding: 40px 20px;
}

.content-placeholder svg {
    margin-bottom: 15px;
    opacity: 0.3;
}

.content-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.content-placeholder small {
    font-size: 0.85rem;
    opacity: 0.7;
}

.preview-content-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-content-carousel {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.preview-carousel-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.preview-content-video {
    width: 100%;
    height: auto;
    max-height: 100%;
}

.content-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .content-preview-section {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .content-preview-container {
        min-height: 300px;
    }
    
    .content-form .form-actions {
        flex-direction: column;
    }
    
    .content-form .form-actions .btn,
    .content-form .form-actions form {
        width: 100%;
    }
    
    .content-form .form-actions .btn {
        justify-content: center;
    }
}

/* AI Drawer Styles */
.btn-ai {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(102, 126, 234, 0.5);
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    background: #667eea;
    color: white;
}

.btn-ai:hover {
    background: #764ba2;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.ai-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    visibility: hidden;
}

.ai-drawer.open {
    pointer-events: auto;
    visibility: visible;
}

.ai-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    cursor: pointer;
}

.ai-drawer.open .ai-drawer-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.ai-drawer-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(180deg, #1A1A1A 0%, #240046 100%);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 2px solid rgba(157, 78, 221, 0.3);
}

.ai-drawer.open .ai-drawer-content {
    transform: translateX(0);
}

.ai-drawer-header {
    padding: 30px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.ai-drawer-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.ai-drawer-close {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ai-drawer-close:hover {
    background: rgba(157, 78, 221, 0.2);
    transform: rotate(90deg);
}

.ai-drawer-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ai-drawer-description {
    color: var(--light-purple);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 15px;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.ai-drawer-description strong {
    color: var(--secondary);
}

.ai-preview-container {
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(157, 78, 221, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.ai-preview-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 600px;
}

.ai-drawer-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
}

.ai-drawer .form-group {
    flex: 1;
}

.ai-drawer .form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1rem;
}

.ai-drawer .form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 12px;
    color: var(--white);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
    transition: all 0.3s ease;
}

.ai-drawer .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
}

.ai-drawer .form-group textarea::placeholder {
    color: rgba(224, 170, 255, 0.5);
}

@media (max-width: 768px) {
    .ai-drawer-content {
        width: 100%;
        max-width: 100%;
    }
    
    .ai-drawer-actions {
        flex-direction: column;
    }
    
    .ai-drawer-actions button {
        width: 100%;
    }
}

/* Animazione spin per loading */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Styles for Reference Images AI Drawer */
.upload-reference-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.existing-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.selectable-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(199, 125, 255, 0.2);
    transition: all 0.3s ease;
}

.selectable-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selectable-image:hover {
    border-color: rgba(199, 125, 255, 0.5);
    transform: scale(1.05);
}

.selectable-image.selected {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.image-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(199, 125, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.selectable-image:hover .image-checkbox {
    opacity: 1;
}

.selectable-image.selected .image-checkbox {
    opacity: 1;
    background: var(--primary);
    border-color: var(--primary);
}

.image-checkbox svg {
    color: white;
    display: none;
}

.selectable-image.selected .image-checkbox svg {
    display: block;
}

.selected-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.selected-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.selected-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-image-item button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(220, 38, 38, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.selected-image-item:hover button {
    opacity: 1;
}

.selected-image-item button:hover {
    background: #DC2626;
    transform: scale(1.1);
}

.selected-image-item button svg {
    color: white;
}

.no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(250, 250, 250, 0.4);
    font-size: 0.95rem;
}

/* Carousel selection styles */
.carousel-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.selectable-carousel-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(199, 125, 255, 0.2);
    transition: all 0.3s ease;
}

.selectable-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selectable-carousel-image:hover {
    border-color: rgba(199, 125, 255, 0.5);
    transform: scale(1.05);
}

.selectable-carousel-image.selected {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.selectable-carousel-image .image-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(199, 125, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.selectable-carousel-image:hover .image-checkbox {
    opacity: 1;
}

.selectable-carousel-image.selected .image-checkbox {
    opacity: 1;
    background: var(--primary);
    border-color: var(--primary);
}

.selectable-carousel-image .image-checkbox svg {
    color: white;
    display: none;
}

.selectable-carousel-image.selected .image-checkbox svg {
    display: block;
}
