/* Aggiungi queste regole alla fine del file CSS esistente */

/* Thoughts Grid */
.thoughts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.thought-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 235, 205, 0.9));
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.thought-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    transition: transform 0.6s ease;
    transform: scale(0);
}

.thought-card:hover::before {
    transform: scale(1);
}

.thought-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.7);
}

.thought-image {
    width: 100%;
    height: 350px !important;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1rem;
    border: 3px solid rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.thought-card:hover .thought-image {
    border-color: rgba(255, 215, 0, 0.8);
}

.thought-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #8b0000;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.3);
    line-height: 1.2;
}

.thought-author {
    color: #b22222;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    font-style: italic;
    font-size: 0.9rem;
}

.thought-preview {
    flex: 1;
    color: #8b0000;
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: justify;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.thought-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Thought Details */
.thought-details-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.thought-details-header h2 {
    font-family: 'Dancing Script', cursive;
    color: #8b0000;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.3);
    line-height: 1.2;
}

.thought-details-header h3 {
    color: #b22222;
    font-size: 1.1rem;
    font-style: italic;
}

.thought-content {
    margin: 1.5rem 0;
}

.content-container {
    background: linear-gradient(145deg, rgba(255, 235, 205, 0.8), rgba(255, 255, 255, 0.8));
    padding: 2rem;
    border-radius: 15px;
    white-space: pre-wrap;
    line-height: 1.8;
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #8b0000;
    box-shadow: inset 0 3px 10px rgba(255, 215, 0, 0.2);
    font-size: 1rem;
    text-align: justify;
}

.thought-meta {
    background: rgba(255, 215, 0, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.thought-meta p {
    margin: 0.5rem 0;
    color: #b22222;
    font-size: 0.9rem;
}

/* Admin Thoughts */
.admin-thoughts-list {
    /* Eredita dagli stili admin esistenti */
}

.admin-thought-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.admin-thought-item:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateX(3px);
}

.admin-thought-info {
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.admin-thought-info h4 {
    margin-bottom: 0.25rem;
    color: #8b0000;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-thought-info p {
    color: #b22222;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-thought-info small {
    color: #999;
    font-size: 0.75rem;
}

.admin-thought-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Mobile Optimizations for Thoughts */
@media (max-width: 768px) {
    .thoughts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .thought-card {
        padding: 1.2rem;
        min-height: 320px;
    }

    .thought-image {
        height: 140px;
    }

    .thought-title {
        font-size: 1.2rem;
    }

    .thought-author {
        font-size: 0.85rem;
    }

    .thought-preview {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }

    .thought-details-header h2 {
        font-size: 1.6rem;
    }

    .thought-details-header h3 {
        font-size: 1rem;
    }

    .content-container {
        padding: 1.5rem;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .admin-thought-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding: 1rem;
    }

    .admin-thought-info {
        margin-right: 0;
        text-align: center;
    }

    .admin-thought-info h4,
    .admin-thought-info p {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
    }

    .admin-thought-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .thought-card {
        padding: 1rem;
    }

    .thought-image {
        height: 120px;
    }

    .thought-title {
        font-size: 1.1rem;
    }

    .thought-details-header h2 {
        font-size: 1.4rem;
    }

    .content-container {
        padding: 1rem;
        font-size: 0.85rem;
    }
}