/**
 * Fan Community - Frontend Styles
 *
 * Matches design mockup exactly with Tailwind-like utility classes
 *
 * @package TeenSerie
 */

/* ===== Variables ===== */
:root {
    --accent-pink: #EC4899;
    --secondary-purple: #8B5CF6;
    --primary-lime: #A3E635;
}

/* ===== Reset button defaults ===== */
.fc-section > button,
.fc-toggle-btn {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none; /* Fix gradient conflicts */
}

.fc-section > button:focus,
.fc-toggle-btn:focus {
    outline: none !important;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3) !important;
}

/* Report modal buttons */
#report-modal button {
    border: none !important;
    outline: none !important;
    background-image: none !important; /* Fix gradient conflicts */
}

#report-modal button:focus {
    outline: none !important;
}

/* CRITICAL: Override Tailwind only on form buttons */
.fc-form button,
#report-modal button {
    background-image: none !important;
}

/* ===== CRITICAL: Fix for Tailwind Preflight Reset ===== */
/* When Tailwind is compiled, Preflight resets button styles */
/* These rules restore the correct appearance for filter buttons */

/* Genre filter buttons (discover page and similar) */
.filter-btn-genre,
.filter-btn-year,
.filter-btn-type,
.filter-btn-age {
    /* Force background to not be transparent (Preflight sets it to transparent) */
    background-color: #f1f5f9 !important; /* bg-slate-100 */
    color: #334155 !important; /* text-slate-700 */
    border: 1px solid #cbd5e1 !important; /* border-slate-300 */
    border-radius: 0.5rem !important; /* rounded-lg */
    padding: 0.5rem 1rem !important; /* px-4 py-2 */
    font-weight: 500 !important; /* font-medium */
    font-size: 0.875rem !important; /* text-sm */
    line-height: 1.25rem !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode for filter buttons (inactive) */
body.dark-mode .filter-btn-genre:not(.active),
body.dark-mode .filter-btn-year:not(.active),
body.dark-mode .filter-btn-type:not(.active),
body.dark-mode .filter-btn-age:not(.active),
html.dark .filter-btn-genre:not(.active),
html.dark .filter-btn-year:not(.active),
html.dark .filter-btn-type:not(.active),
html.dark .filter-btn-age:not(.active) {
    background-color: rgba(51, 65, 85, 0.5) !important; /* dark:bg-slate-700/50 */
    color: #cbd5e1 !important; /* dark:text-slate-300 */
    border-color: #475569 !important; /* dark:border-slate-600 */
}

/* Active state for filter buttons */
.filter-btn-genre.active,
.filter-btn-year.active,
.filter-btn-type.active,
.filter-btn-age.active {
    background-color: #A3E635 !important; /* bg-primary-lime */
    color: #0f172a !important; /* text-slate-900 */
    border-color: #A3E635 !important;
}

/* Hover state for filter buttons (inactive) */
.filter-btn-genre:not(.active):hover,
.filter-btn-year:not(.active):hover,
.filter-btn-type:not(.active):hover,
.filter-btn-age:not(.active):hover {
    background-color: #e2e8f0 !important; /* hover:bg-slate-200 */
}

body.dark-mode .filter-btn-genre:not(.active):hover,
body.dark-mode .filter-btn-year:not(.active):hover,
body.dark-mode .filter-btn-type:not(.active):hover,
body.dark-mode .filter-btn-age:not(.active):hover,
html.dark .filter-btn-genre:not(.active):hover,
html.dark .filter-btn-year:not(.active):hover,
html.dark .filter-btn-type:not(.active):hover,
html.dark .filter-btn-age:not(.active):hover {
    background-color: #475569 !important; /* dark:hover:bg-slate-600 */
}

/* ===== CRITICAL: Fix Article Cards Headings (Preflight Reset) ===== */
/* Related articles section - force correct h3 size */
section a h3,
section a.group h3 {
    font-size: 1rem !important; /* text-base */
    line-height: 1.5rem !important; /* leading-tight */
    font-weight: 700 !important; /* font-bold */
    color: #ffffff !important; /* text-white */
    margin: 0.5rem 0 0 0 !important; /* mt-2 */
}

/* Line clamp for article titles */
section a h3.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Category badge in article cards */
section a span.text-xs {
    font-size: 0.75rem !important; /* text-xs */
    line-height: 1rem !important;
    font-weight: 700 !important; /* font-bold */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important; /* tracking-wider */
}

/* ===== Fan Community Section ===== */
.fc-section {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ===== Section Header ===== */
.fc-section .fc-header {
    margin-bottom: 1rem;
}

.fc-section .fc-header h2 {
    position: relative;
    display: inline-block;
    font-weight: 900;
    font-size: 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background-color: var(--accent-pink);
    color: #ffffff;
    clip-path: polygon(0px 0px, 95% 0px, 100% 100%, 0% 100%);
}

@media (min-width: 768px) {
    .fc-section .fc-header h2 {
        font-size: 1.875rem;
    }
}

.fc-section .fc-header h2 svg {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-block;
    margin-right: 0.5rem;
}

/* ===== Cards Container ===== */
.fc-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ===== Individual Card ===== */
.fc-card {
    transition-property: all !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
    transition-duration: 300ms !important;
    cursor: pointer !important;
}

.fc-card > div {
    transition-property: all !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
    transition-duration: 300ms !important;
}

.fc-card:hover > div {
    transform: translateY(-0.25rem) !important;
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.1) !important;
}

.dark .fc-card:hover > div {
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.15) !important;
}

.fc-card .fc-card-inner {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.dark .fc-card .fc-card-inner {
    background-color: #1e293b;
}

.fc-card .fc-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fc-card .fc-card-icon {
    width: 3rem;
    height: 3rem;
    background-image: linear-gradient(to bottom right, var(--accent-pink), var(--secondary-purple));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-card .fc-card-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #ffffff;
}

.fc-card .fc-card-info h3 {
    font-weight: 700;
    color: #0f172a;
}

.dark .fc-card .fc-card-info h3 {
    color: #f1f5f9;
}

.fc-card .fc-card-info p {
    font-size: 0.875rem;
    color: #64748b;
}

.dark .fc-card .fc-card-info p {
    color: #94a3b8;
}

.fc-card .fc-card-arrow svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #94a3b8;
}

/* ===== Pagination ===== */
.fc-pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.fc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.fc-pagination button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.fc-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fc-pagination button:not(:disabled):hover {
    background-color: #f1f5f9;
}

.dark .fc-pagination button:not(:disabled):hover {
    background-color: #1e293b;
}

.fc-pagination button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.fc-pagination .fc-page-info {
    font-weight: 700;
    font-size: 0.875rem;
    color: #475569;
}

.dark .fc-pagination .fc-page-info {
    color: #94a3b8;
}

/* ===== Toggle Form Button ===== */
.fc-toggle-btn {
    background-color: var(--accent-pink);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.fc-toggle-btn:hover {
    background-color: rgba(236, 72, 153, 0.9);
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3);
}

.fc-toggle-btn svg {
    width: 1rem;
    height: 1rem;
}

/* ===== Form Modal ===== */
.fc-form-container {
    margin-top: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.dark .fc-form-container {
    background-color: #1e293b;
}

.fc-form-container.hidden {
    display: none;
}

.fc-form-container.opacity-0 {
    opacity: 0;
}

.fc-form-container.opacity-100 {
    opacity: 1;
}

.fc-form-container.-translate-y-4 {
    transform: translateY(-1rem);
}

.fc-form-container.translate-y-0 {
    transform: translateY(0);
}

.fc-form-container h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #0f172a;
}

.dark .fc-form-container h4 {
    color: #f1f5f9;
}

.fc-form-container .fc-form-description {
    font-size: 0.875rem;
    color: #475569;
    text-align: center;
    margin-bottom: 1.5rem;
}

.dark .fc-form-container .fc-form-description {
    color: #94a3b8;
}

/* ===== Form Fields ===== */
.fc-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fc-form .fc-field {
    display: flex;
    flex-direction: column;
}

.fc-form .fc-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.dark .fc-form .fc-field label {
    color: #cbd5e1;
}

.fc-form .fc-field input,
.fc-form .fc-field textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.dark .fc-form .fc-field input,
.dark .fc-form .fc-field textarea {
    background-color: #334155;
    color: #f1f5f9;
}

.fc-form .fc-field input:focus,
.fc-form .fc-field textarea:focus {
    outline: none;
    ring: 2px solid var(--accent-pink);
    border-color: var(--accent-pink);
}

.fc-form .fc-field input:disabled {
    cursor: not-allowed;
    color: #64748b;
}

.dark .fc-form .fc-field input:disabled {
    color: #94a3b8;
    background-color: rgba(15, 23, 42, 0.5);
}

.fc-form .fc-field .fc-field-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.dark .fc-form .fc-field .fc-field-hint {
    color: #94a3b8;
}

.fc-form .fc-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .fc-form .fc-field-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fc-form button[type="submit"] {
    width: 100%;
    background-color: var(--accent-pink);
    color: #ffffff;
    font-weight: 700;
    padding: 0.625rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fc-form button[type="submit"]:hover {
    background-color: rgba(236, 72, 153, 0.9);
}

.fc-form button[type="submit"] svg {
    width: 1rem;
    height: 1rem;
}

.fc-form .fc-form-note {
    font-size: 0.75rem;
    text-align: center;
    color: #64748b;
}

.dark .fc-form .fc-form-note {
    color: #94a3b8;
}

/* ===== Form Messages ===== */
.fc-form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.fc-form-message.success {
    background-color: #d1fae5;
    color: #065f46;
}

.fc-form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
}

.dark .fc-form-message.success {
    background-color: #064e3b;
    color: #6ee7b7;
}

.dark .fc-form-message.error {
    background-color: #7f1d1d;
    color: #fca5a5;
}

/* ===== Bottom Sheet Modal ===== */
#fc-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

#fc-modal-overlay.opacity-0 {
    opacity: 0;
}

#fc-modal-overlay.opacity-100 {
    opacity: 1;
}

#fc-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background-color: #ffffff;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 400ms;
}

.dark #fc-modal {
    background-color: #1e293b;
}

#fc-modal.translate-y-0 {
    transform: translateY(0);
}

#fc-modal.translate-y-full {
    transform: translateY(100%);
}

.fc-modal-header {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

.dark .fc-modal-header {
    background-color: #1e293b;
    border-bottom-color: #334155;
}

.fc-modal-handle {
    width: 3rem;
    height: 0.375rem;
    background-color: #cbd5e1;
    border-radius: 9999px;
    margin-left: auto;
    margin-right: auto;
}

.dark .fc-modal-handle {
    background-color: #475569;
}

.fc-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 9999px;
    cursor: pointer;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.fc-modal-close:hover {
    background-color: #f1f5f9;
}

.dark .fc-modal-close:hover {
    background-color: #334155;
}

.fc-modal-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.fc-modal-content {
    padding: 1.5rem;
}

.fc-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fc-modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fc-modal-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background-image: linear-gradient(to bottom right, var(--accent-pink), var(--secondary-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-modal-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: #ffffff;
}

.fc-modal-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
}

.dark .fc-modal-title {
    color: #f1f5f9;
}

.fc-modal-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-lime);
    color: #0f172a;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.fc-modal-description {
    color: #334155;
}

.dark .fc-modal-description {
    color: #cbd5e1;
}

.fc-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 0.875rem;
    background-color: #f1f5f9;
    padding: 1rem;
    border-radius: 0.75rem;
}

.dark .fc-modal-info-grid {
    background-color: rgba(51, 65, 85, 0.5);
}

.fc-modal-info-item p:first-child {
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
}

.dark .fc-modal-info-item p:first-child {
    color: #f1f5f9;
}

.fc-modal-info-item p:first-child svg {
    width: 1rem;
    height: 1rem;
}

.fc-modal-info-item p:last-child {
    color: #475569;
    padding-left: 1.5rem;
}

.dark .fc-modal-info-item p:last-child {
    color: #94a3b8;
}

.fc-modal-disclaimer {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

.dark .fc-modal-disclaimer {
    color: #94a3b8;
}

.fc-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fc-modal-btn-primary {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background-color: var(--primary-lime);
    color: #0f172a;
    font-weight: 900;
    border-radius: 0.75rem;
    text-decoration: none;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fc-modal-btn-primary:hover {
    background-color: rgba(190, 242, 100, 0.9);
}

.fc-modal-btn-primary svg {
    width: 1rem;
    height: 1rem;
}

.fc-modal-btn-report {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-weight: 900;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.fc-modal-btn-report:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

.fc-modal-btn-report svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ===== Report Modal ===== */
#report-modal-overlay,
#fc-report-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

#report-modal,
#fc-report-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.fc-report-content {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 24rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .fc-report-content {
    background-color: #1e293b;
}

.fc-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.fc-report-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.dark .fc-report-header h3 {
    color: #f1f5f9;
}

.fc-report-header button {
    padding: 0.25rem;
    border: none;
    background: transparent;
    border-radius: 9999px;
    cursor: pointer;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.fc-report-header button:hover {
    background-color: #f1f5f9;
}

.dark .fc-report-header button:hover {
    background-color: #334155;
}

.fc-report-header button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.fc-report-description {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 1rem;
}

.dark .fc-report-description {
    color: #94a3b8;
}

.fc-report-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fc-report-options button {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
    color: #0f172a;
}

.dark .fc-report-options button {
    background-color: #334155;
    color: #f1f5f9;
}

.fc-report-options button:hover {
    background-color: #e2e8f0;
}

.dark .fc-report-options button:hover {
    background-color: #475569;
}

/* ===== Body Lock ===== */
body.fc-modal-open {
    overflow: hidden !important;
}

/* ===== Centered Modal (Scheda Community) ===== */
#community-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    transition-property: opacity, pointer-events !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
    transition-duration: 300ms !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Mobile: Assicura che il backdrop non causi scroll orizzontale */
@media (max-width: 767px) {
    #community-modal-backdrop {
        padding: 0.75rem !important;
        align-items: center !important;
    }
}

#community-modal-backdrop.pointer-events-none {
    pointer-events: none;
}

#community-modal-backdrop.pointer-events-auto {
    pointer-events: auto;
}

#community-modal-backdrop.opacity-0 {
    opacity: 0;
}

#community-modal-backdrop.opacity-100 {
    opacity: 1;
}

#community-modal-panel {
    background-color: #ffffff;
    width: 100%;
    max-width: 42rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.95);
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* Mobile: Modal perfettamente centrato con margini laterali */
@media (max-width: 767px) {
    #community-modal-panel {
        max-width: calc(100vw - 1.5rem) !important;
        margin: 0 0.75rem !important;
        max-height: calc(100vh - 1.5rem) !important;
        border-radius: 1rem !important;
    }

    #community-modal-panel .p-4 {
        padding: 0.75rem !important;
    }

    #community-modal-panel .p-6 {
        padding: 1rem !important;
    }

    #community-modal-panel .p-8 {
        padding: 1rem !important;
    }

    #community-modal-panel .mt-8 {
        margin-top: 1rem !important;
    }

    #community-modal-panel .gap-6 {
        gap: 1rem !important;
    }

    #community-modal-panel .gap-8 {
        gap: 1rem !important;
    }

    /* Icona platform più piccola su mobile */
    #community-modal-panel .w-24,
    #community-modal-panel .h-24 {
        width: 5rem !important;
        height: 5rem !important;
    }

    /* Testi più compatti su mobile */
    #community-modal-panel .text-3xl {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }

    #community-modal-panel .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }
}

.dark #community-modal-panel,
body.dark-mode #community-modal-panel {
    background-color: #0f172a;
}

#community-modal-panel.opacity-0 {
    opacity: 0;
}

#community-modal-panel.opacity-100 {
    opacity: 1;
}

#community-modal-panel.scale-95 {
    transform: scale(0.95);
}

#community-modal-panel.scale-100 {
    transform: scale(1);
}

/* Accent colors for centered modal and cards */
.text-accent-teal {
    color: #14B8A6;
}

.text-secondary-purple {
    color: #8B5CF6;
}

.text-accent-pink {
    color: #EC4899;
}

.bg-accent-pink {
    background-color: #EC4899;
}

.bg-accent-pink\/20 {
    background-color: rgba(236, 72, 153, 0.2);
}

.bg-primary-lime {
    background-color: #A3E635;
}

.hover\:bg-lime-400:hover {
    background-color: #a3e635;
    background-color: rgb(190, 242, 100);
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to));
}

.from-accent-pink {
    --tw-gradient-from: #EC4899;
}

.to-secondary-purple {
    --tw-gradient-to: #8B5CF6;
}

.shadow-accent-pink\/20 {
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.2);
}

.hover\:shadow-primary-lime\/25:hover {
    box-shadow: 0 10px 15px -3px rgba(163, 230, 53, 0.25);
}

/* Stats grid and borders */
.bg-slate-50 {
    background-color: #f8fafc;
}

.dark .bg-slate-50,
body.dark-mode .bg-slate-50 {
    background-color: rgba(30, 41, 59, 0.5);
}

.bg-slate-800\/50 {
    background-color: rgba(30, 41, 59, 0.5);
}

.border-slate-100 {
    border-color: #f1f5f9;
}

.dark .border-slate-100,
body.dark-mode .border-slate-100 {
    border-color: #334155;
}

.border-slate-700 {
    border-color: #334155;
}

.dark .border-slate-700,
body.dark-mode .border-slate-700 {
    border-color: #334155;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* Text colors for modal */
.text-slate-900 {
    color: #0f172a;
}

/* Solo i titoli principali diventano bianchi in dark mode */
#community-modal-panel .text-slate-900:is(h1, h2, h3, h4, h5, h6) {
    color: #0f172a;
}

.dark #community-modal-panel .text-slate-900:is(h1, h2, h3, h4, h5, h6),
body.dark-mode #community-modal-panel .text-slate-900:is(h1, h2, h3, h4, h5, h6) {
    color: #ffffff;
}

.text-slate-600 {
    color: #475569;
}

.dark .text-slate-600,
body.dark-mode .text-slate-600 {
    color: #94a3b8;
}

.text-slate-400 {
    color: #94a3b8;
}

.dark .text-slate-400,
body.dark-mode .text-slate-400 {
    color: #94a3b8;
}

.text-white {
    color: #ffffff;
}

/* Button colors in modal */
#community-modal-panel .bg-white {
    background-color: #ffffff;
}

.dark #community-modal-panel .bg-white,
body.dark-mode #community-modal-panel .bg-white {
    background-color: #1e293b;
}

#community-modal-panel .bg-slate-800 {
    background-color: #1e293b;
}

.dark #community-modal-panel .border-slate-200,
body.dark-mode #community-modal-panel .border-slate-200 {
    border-color: #334155;
}

/* CRITICAL: Force dark text on lime button (light background) */
#community-modal-panel .bg-primary-lime,
.dark #community-modal-panel .bg-primary-lime,
body.dark-mode #community-modal-panel .bg-primary-lime,
#community-modal-panel .bg-primary-lime *,
.dark #community-modal-panel .bg-primary-lime *,
body.dark-mode #community-modal-panel .bg-primary-lime * {
    color: #0f172a !important;
}

/* Icon styling for centered modal */
#community-modal-panel .bg-gradient-to-br i {
    font-size: 3.5rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    #community-modal-panel .bg-gradient-to-br i {
        font-size: 4.5rem !important;
    }
}

/* ===== Bottom Sheet Modal (Click su card) ===== */
/* CSS commentato: ora usa Tailwind CSS via CDN */
/*
#fc-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 40;
    transition: opacity 0.3s ease-in-out;
}

#fc-modal-overlay.opacity-0 {
    opacity: 0;
}

#fc-modal-overlay.opacity-100 {
    opacity: 1;
}

#community-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: #ffffff;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    box-shadow: 0 -25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 85vh;
    overflow-y: auto;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#community-modal.translate-y-full {
    transform: translateY(100%);
}

#community-modal.translate-y-0 {
    transform: translateY(0);
}

.dark #community-modal,
body.dark-mode #community-modal {
    background-color: #1e293b;
}

#community-modal .sticky {
    position: sticky;
    top: 0;
}

#community-modal button {
    cursor: pointer;
    border: none;
    background: none;
    transition: background-color 0.2s;
}

#community-modal .p-2 {
    padding: 0.5rem;
}

#community-modal .p-4 {
    padding: 1rem;
}

#community-modal .p-6 {
    padding: 1.5rem;
}

#community-modal .rounded-full {
    border-radius: 9999px;
}

#community-modal .hover\:bg-slate-100:hover {
    background-color: #f1f5f9;
}

.dark #community-modal .hover\:bg-slate-700:hover,
body.dark-mode #community-modal .hover\:bg-slate-700:hover {
    background-color: #334155;
}

#community-modal .space-y-6 > * + * {
    margin-top: 1.5rem;
}

#community-modal .flex {
    display: flex;
}

#community-modal .items-center {
    align-items: center;
}

#community-modal .gap-3 {
    gap: 0.75rem;
}

#community-modal .flex-wrap {
    flex-wrap: wrap;
}

#community-modal .flex-shrink-0 {
    flex-shrink: 0;
}

#community-modal .w-14 {
    width: 3.5rem;
}

#community-modal .h-14 {
    height: 3.5rem;
}

#community-modal .text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

#community-modal .font-black {
    font-weight: 900;
}

#community-modal .inline-block {
    display: inline-block;
}

#community-modal .px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#community-modal .py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

#community-modal .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

#community-modal .grid {
    display: grid;
}

#community-modal .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#community-modal .gap-4 {
    gap: 1rem;
}

#community-modal .font-bold {
    font-weight: 700;
}

#community-modal .mb-1 {
    margin-bottom: 0.25rem;
}

#community-modal .mb-4 {
    margin-bottom: 1rem;
}

#community-modal .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

#community-modal .text-center {
    text-align: center;
}

#community-modal .flex-1 {
    flex: 1 1 0%;
}

#community-modal .py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#community-modal .justify-center {
    justify-content: center;
}

#community-modal .w-12 {
    width: 3rem;
}

#community-modal .h-12 {
    height: 3rem;
}

#community-modal a {
    text-decoration: none;
}

#community-modal .border-b {
    border-bottom-width: 1px;
}

#community-modal .border-slate-200 {
    border-color: #e2e8f0;
}

.dark #community-modal .border-slate-700,
body.dark-mode #community-modal .border-slate-700 {
    border-color: #334155;
}

#community-modal .justify-between {
    justify-content: space-between;
}

#community-modal .absolute {
    position: absolute;
}

#community-modal .top-4 {
    top: 1rem;
}

#community-modal .right-4 {
    right: 1rem;
}

#community-modal .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

#community-modal .w-12.h-1\.5 {
    width: 3rem;
    height: 0.375rem;
}

#community-modal .bg-slate-300 {
    background-color: #cbd5e1;
}

.dark #community-modal .bg-slate-600,
body.dark-mode #community-modal .bg-slate-600 {
    background-color: #475569;
}

#community-modal .z-10 {
    z-index: 10;
}

#community-modal .rounded-t-3xl {
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

#community-modal .text-slate-700 {
    color: #334155;
}

.dark #community-modal .text-slate-300,
body.dark-mode #community-modal .text-slate-300 {
    color: #cbd5e1;
}

#community-modal .text-slate-600 {
    color: #475569;
}

.dark #community-modal .text-slate-400,
body.dark-mode #community-modal .text-slate-400 {
    color: #94a3b8;
}

#community-modal .text-slate-500 {
    color: #64748b;
}

#community-modal .text-slate-900 {
    color: #0f172a;
}

.dark #community-modal .text-white,
body.dark-mode #community-modal .text-white {
    color: #ffffff;
}

#community-modal .text-white {
    color: #ffffff;
}

#community-modal .bg-primary-lime {
    background-color: var(--primary-lime);
}

#community-modal .hover\:bg-primary-lime\/90:hover {
    background-color: rgba(163, 230, 53, 0.9);
}

#community-modal .bg-red-500\/20 {
    background-color: rgba(239, 68, 68, 0.2);
}

#community-modal .text-red-500 {
    color: #ef4444;
}

#community-modal .hover\:bg-red-500\/30:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

#community-modal .rounded-xl {
    border-radius: 0.75rem;
}

#community-modal .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

#community-modal .bg-slate-100 {
    background-color: #f1f5f9;
}

.dark #community-modal .bg-slate-700\/50,
body.dark-mode #community-modal .bg-slate-700\/50 {
    background-color: rgba(51, 65, 85, 0.5);
}

#community-modal .pl-6 {
    padding-left: 1.5rem;
}
*/

/* ===== Form Container (Inline sotto pulsante) ===== */
#add-fanpage-form-container {
    margin-top: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition-property: opacity, transform;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}

.dark #add-fanpage-form-container,
body.dark-mode #add-fanpage-form-container {
    background-color: #1e293b;
}

#add-fanpage-form-container h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #0f172a;
}

.dark #add-fanpage-form-container h4,
body.dark-mode #add-fanpage-form-container h4 {
    color: #ffffff;
}

#add-fanpage-form-container > p {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 1.5rem;
}

.dark #add-fanpage-form-container > p,
body.dark-mode #add-fanpage-form-container > p {
    color: #94a3b8;
}

#add-fanpage-form-container > p strong {
    color: #0f172a;
}

.dark #add-fanpage-form-container > p strong,
body.dark-mode #add-fanpage-form-container > p strong {
    color: #ffffff;
}

#add-fanpage-form-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#add-fanpage-form-container form > div {
    display: flex;
    flex-direction: column;
}

#add-fanpage-form-container label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.dark #add-fanpage-form-container label,
body.dark-mode #add-fanpage-form-container label {
    color: #cbd5e1;
}

#add-fanpage-form-container input,
#add-fanpage-form-container textarea,
#add-fanpage-form-container select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: #0f172a;
    font-family: inherit;
}

.dark #add-fanpage-form-container input,
.dark #add-fanpage-form-container textarea,
.dark #add-fanpage-form-container select,
body.dark-mode #add-fanpage-form-container input,
body.dark-mode #add-fanpage-form-container textarea,
body.dark-mode #add-fanpage-form-container select {
    background-color: #334155;
    color: #f1f5f9;
}

/* Input disabilitato */
#add-fanpage-form-container input:disabled {
    background-color: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

.dark #add-fanpage-form-container input:disabled,
body.dark-mode #add-fanpage-form-container input:disabled {
    background-color: rgba(15, 23, 42, 0.5);
    color: #94a3b8;
}

#add-fanpage-form-container input:focus,
#add-fanpage-form-container textarea:focus,
#add-fanpage-form-container select:focus {
    outline: none;
    border-color: var(--accent-pink);
    background-color: #ffffff;
}

.dark #add-fanpage-form-container input:focus,
.dark #add-fanpage-form-container textarea:focus,
.dark #add-fanpage-form-container select:focus,
body.dark-mode #add-fanpage-form-container input:focus,
body.dark-mode #add-fanpage-form-container textarea:focus,
body.dark-mode #add-fanpage-form-container select:focus {
    background-color: #475569;
}

#add-fanpage-form-container input::placeholder,
#add-fanpage-form-container textarea::placeholder {
    color: #94a3b8;
}

#add-fanpage-form-container textarea {
    resize: vertical;
    min-height: 5rem;
}

/* Testo piccolo sotto input */
#add-fanpage-form-container .mt-1 {
    margin-top: 0.25rem;
}

#add-fanpage-form-container form > div > p {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.dark #add-fanpage-form-container form > div > p,
body.dark-mode #add-fanpage-form-container form > div > p {
    color: #94a3b8;
}

#add-fanpage-form-container button[type="submit"] {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background-color: var(--accent-pink);
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.2);
    font-size: 0.875rem;
}

#add-fanpage-form-container button[type="submit"]:hover {
    background-color: #db2777;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3);
}

#add-fanpage-form-container button[type="submit"] svg {
    width: 1.25rem;
    height: 1.25rem;
}

#add-fanpage-form-container .grid {
    display: grid;
}

#add-fanpage-form-container .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    #add-fanpage-form-container .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#add-fanpage-form-container .gap-4 {
    gap: 1rem;
}

#add-fanpage-form-container form > p:last-child {
    font-size: 0.75rem;
    text-align: center;
    color: #64748b;
    margin-top: 0;
}

.dark #add-fanpage-form-container form > p:last-child,
body.dark-mode #add-fanpage-form-container form > p:last-child {
    color: #94a3b8;
}

/* ===== Toast Notification ===== */
#toast-notification {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    transition: opacity 0.3s ease-in-out;
}

#toast-notification > div {
    background-color: var(--primary-lime);
    color: #0f172a;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== Hide reCAPTCHA Badge ===== */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ========================================
   FIX CARD FAN COMMUNITY
   ======================================== */

/* Ridurre dimensione titolo card */
.fc-card h3 {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    margin-bottom: 0.75rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* CSS rimosso - ora usiamo items-baseline e leading-none in Tailwind per allineare perfettamente */

/* Dimensione corretta badge platform */
.fc-card .flex-1 > div:last-child span {
    font-size: 0.75rem;
    line-height: 1rem;
}

/* ========================================
   FIX MODAL FAN COMMUNITY HEADER
   ======================================== */

/* Header modal - sfondo deve coprire tutta la larghezza */
#community-modal-panel > div:first-child {
    background-color: rgba(248, 250, 252, 0.5) !important;
    margin: 0 !important;
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}

body.dark-mode #community-modal-panel > div:first-child,
.dark #community-modal-panel > div:first-child {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

/* Rimuovi padding dal modal panel */
#community-modal-panel {
    padding: 0 !important;
}

/* Titolo header modal */
#community-modal-panel > div:first-child h3 {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
}

body.dark-mode #community-modal-panel > div:first-child h3,
.dark #community-modal-panel > div:first-child h3 {
    color: #94a3b8 !important;
}

/* ========================================
   FIX PULSANTE REPORT
   ======================================== */

/* Pulsante report diventa rosso al hover */
#community-modal-panel button[title*="Report"]:hover,
#community-modal-panel button[title*="Segnala"]:hover {
    color: #ef4444 !important;
    border-color: #fecaca !important;
}

.dark #community-modal-panel button[title*="Report"]:hover,
.dark #community-modal-panel button[title*="Segnala"]:hover {
    border-color: rgba(127, 29, 29, 0.5) !important;
}

/* ========================================
   FIX ANIMAZIONE MODAL REPORT
   ======================================== */

/* Modal report con animazione fluida */
#report-modal,
#report-modal-overlay {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
    transition-duration: 400ms !important;
}
