:root {
    --bg-dark: #09090b;
    --bg-card: #18181b;
    --gold-primary: #dcb669;
    --gold-secondary: #b5904b;
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --border-color: rgba(255, 255, 255, 0.1);
    --header-height: 80px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: radial-gradient(at 0% 0%, rgba(220, 182, 105, 0.05) 0px, transparent 50%);
}

/* --- ANIMAZIONI --- */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--gold-primary) 0%, transparent 70%);
    animation-duration: 25s;
}

.orb-2 {
    bottom: -10%;
    right: -20%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #b5904b 0%, transparent 70%);
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    top: 30%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(220, 182, 105, 0.3) 0%, transparent 70%);
    animation-duration: 22s;
    animation-delay: -10s;
    opacity: 0.15;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 60px) scale(1.05);
    }
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    cursor: pointer;
    color: white;
    font-family: 'Playfair Display', serif;
    z-index: 101;
}

.nav-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.nav-btn:hover,
.nav-btn.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--gold-primary);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 101;
}

/* --- LAYOUT --- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 80px;
    padding-top: 100px;
    min-height: 100vh;
    position: relative;
    flex-grow: 1;
}

/* --- ABOUT --- */
.about-section {
    background-color: var(--gold-primary);
    color: #1a1a1a;
    border-radius: 30px;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 20px 0;
    z-index: 2;
}

.about-section::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40%;
    background-color: #0e0e0e;
    background-image: radial-gradient(#333 15%, transparent 16%);
    background-size: 16px 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 0;
    box-shadow: inset 10px 0 20px -10px rgba(0, 0, 0, 0.5);
}

.about-content-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    padding: 50px;
    position: relative;
    z-index: 1;
    width: 100%;
    align-items: center;
}

.about-text-col {
    animation: fadeIn 1s ease-out;
}

.eyebrow {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 24px;
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.about-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    line-height: 1;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: -1px;
}

.about-desc {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 400;
}

.about-media-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.album-frame {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1/1;
    background: #000;
    border: 8px solid rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border-radius: 12px;
    animation: float 6s ease-in-out infinite;
}

.album-art-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.album-frame:hover .album-art-placeholder {
    transform: scale(1.05);
}

.listen-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 18px 30px;
    margin-bottom: 15px;
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--gold-primary);
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.listen-btn:hover {
    background-color: var(--gold-primary);
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: #000;
}

/* --- AUTHOR --- */
.author-section {
    background-color: var(--gold-primary);
    color: #1a1a1a;
    border-radius: 30px;
    margin-top: 24px;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.author-avatar-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #000;
    margin-bottom: 30px;
    background: #000;
}

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

.author-name {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 30px;
    font-weight: 500;
}

.author-bio {
    font-size: 1.25rem;
    max-width: 900px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.social-icons-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    background: #000;
    color: var(--gold-primary);
    transform: translateY(-3px);
}

.social-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* --- GRIDS --- */
.hero {
    padding: 80px 20px 60px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
}

.hero h1 span {
    color: var(--gold-primary);
    font-style: italic;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.bacheca-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.card {
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bacheca-grid .card {
    width: 360px;
    max-width: 100%;
}

.card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(220, 182, 105, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: transform 0.5s ease;
    z-index: 0;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(220, 182, 105, 0.5);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(220, 182, 105, 0.1);
}

.card:hover::after {
    transform: scale(1.5);
}

.card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
    z-index: 2;
    margin-top: 0;
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    z-index: 2;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: auto;
    z-index: 2;
}

.badge {
    background: #000;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card:hover .badge {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
}

.card:hover .action-icon {
    background: var(--gold-primary);
    color: black;
    transform: rotate(-45deg);
}

/* --- QUADRATO PERFETTO PER LE IMMAGINI PODCAST --- */
.podcast-cover-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Forza il formato quadrato */
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    position: relative;
}

/* --- BUTTON FIX ADMIN --- */
.admin-actions {
    position: relative;
    z-index: 100;
    display: flex;
    gap: 10px;
}

/* --- WALL --- */
.wall-header {
    text-align: left;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.wall-title {
    font-size: 3rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.posts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px;
    padding: 20px 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

.post-it {
    font-family: 'Indie Flower', cursive;
    background: linear-gradient(135deg, #fef9c3 0%, #fde047 100%);
    color: #1c1917;
    padding: 24px;
    min-height: 260px;
    width: 300px;
    position: relative;
    box-shadow: 2px 10px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    transform: rotate(var(--rot));
    display: flex;
    flex-direction: column;
    font-size: 1.25rem;
}

.post-it:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.post-it::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 100px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 5px;
}

.post-body {
    flex-grow: 1;
    line-height: 1.4;
    word-break: break-word;
}

/* --- MODERN FORM GENERICA (es. Login) --- */
.modern-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin: 40px auto;
    z-index: 2;
    position: relative;
    max-width: 400px;
}

#wallView .modern-form {
    margin: 40px 0;
    max-width: 100%;
    width: 100%;
}

#adminView .modern-form {
    margin: 0 0 40px 0;
    max-width: 100%;
    width: 100%;
}

/* Privacy Form Style Override */
#privacyView .modern-form {
    max-width: 900px;
    margin: 0 auto;
}

input,
textarea,
select {
    width: 100%;
    background: #000;
    border: 1px solid var(--border-color);
    padding: 16px;
    color: white;
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* STYLE INPUT FILE SPECIFICO */
input[type="file"] {
    padding: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--gold-primary);
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--gold-primary);
    color: black;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s;
}

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

.btn-back {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    z-index: 2;
    position: relative;
}

.btn-back:hover {
    border-color: white;
    color: white;
}

/* Tabelle Admin */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    text-align: left;
    color: var(--gold-primary);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    vertical-align: middle;
}

.hidden {
    display: none !important;
}

/* ICONE ADMIN */
.delete-icon,
.approve-icon,
.view-icon,
.share-icon {
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    border: none;
    margin-right: 5px;
}

.delete-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.approve-icon {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.view-icon {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* NUOVO STILE SHARE ICON */
.share-icon {
    color: var(--gold-primary);
    background: rgba(220, 182, 105, 0.1);
    transition: all 0.2s;
}

.share-icon:hover {
    background: var(--gold-primary);
    color: #000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

/* --- FOOTER --- */
footer {
    background-color: rgba(9, 9, 11, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 40px 24px;
    text-align: center;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-content a {
    color: var(--gold-primary);
    text-decoration: none;
    border-bottom: 1px dotted var(--gold-primary);
    transition: all 0.2s;
}

.footer-content a:hover {
    color: white;
    border-bottom-style: solid;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .about-section {
        flex-direction: column;
        height: auto;
    }

    .about-section::after {
        width: 100%;
        height: 50px;
        top: auto;
        bottom: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .about-content-wrapper {
        grid-template-columns: 1fr;
        padding: 40px 24px 80px 24px;
        gap: 40px;
    }

    .about-text-col {
        order: 2;
        text-align: center;
    }

    .about-media-col {
        order: 1;
    }

    .about-title {
        font-size: 2.5rem;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(15px);
        padding: 40px 24px;
        border-bottom: 1px solid var(--border-color);
        align-items: center;
        gap: 20px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }

    .nav-btn {
        width: 100%;
        text-align: center;
        padding: 16px;
        font-size: 1.1rem;
    }
}

/* --- STILE BOTTONE EXTRA (Call to Action) --- */
#d_customBtn {
    /* Gradiente Dorato Premium */
    background: linear-gradient(135deg, var(--gold-primary) 0%, #fff0c7 100%);
    color: #09090b;
    /* Testo scuro per massimo contrasto */

    /* Tipografia */
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;

    /* Forma e Bordi */
    border: none;
    border-radius: 50px;
    /* Pillola */
    padding: 16px 40px !important;
    /* Più largo per importanza */

    /* Effetti */
    box-shadow: 0 4px 15px rgba(220, 182, 105, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Allineamento */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
}

/* Effetto Luce (Shine) al passaggio del mouse */
#d_customBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: none;
    z-index: -1;
}

/* Stato Hover */
#d_customBtn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(220, 182, 105, 0.5);
    /* Ombra più forte */
    background: linear-gradient(135deg, #fff0c7 0%, var(--gold-primary) 100%);
    /* Inverte gradiente */
}

#d_customBtn:hover::after {
    left: 150%;
    transition: left 0.7s ease-in-out;
}

/* Stato Active (Click) */
#d_customBtn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 182, 105, 0.4);
}