/* --- NEWS SYSTEM STYLES --- */


/* Minimal Top Bar */
.news-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.minimal-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.minimal-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-3px);
}

.mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #a855f7;
    /* Neon Purple */
    cursor: pointer;
    transition: transform 0.2s;
}

.mini-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

/* Index Page */
.news-index-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: #a1a1aa;
    font-size: 1.1rem;
}

.news-grid-full {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- SIMPLIFIED NEWS INDEX --- */
.news-list-simple {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-article-simple {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 30px;
    position: relative;
}

.news-article-simple.is-pinned {
    border-color: rgba(245, 158, 11, 0.3);
}

.news-article-simple .pinned-badge {
    position: absolute;
    top: -10px;
    left: 25px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.article-title-simple {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.article-date-simple {
    color: #71717a;
    font-size: 0.85rem;
    font-style: italic;
}

.article-content-simple {
    color: #d4d4d8;
    font-size: 1rem;
    line-height: 1.8;
}

.article-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-admin-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-admin-action:hover {
    background: #a855f7;
    color: #fff;
}

.news-article-simple.placeholder {
    border-style: dashed;
    opacity: 0.7;
}

/* Author Info - Inline Style */
.news-author-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.news-author-inline .author-name {
    color: #fff;
    font-weight: 600;
}

.news-author-inline .author-rank {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.news-author-inline .author-rank.rank-owner {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.news-author-inline .author-rank.rank-administrador {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.news-author-inline .author-rank.rank-moderador {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.news-author-inline .author-rank.rank-helper {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.news-author-inline .author-separator {
    color: #52525b;
}

.news-author-inline .news-time {
    color: #71717a;
}


.news-card-listing {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.news-card-listing:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
    border-color: rgba(168, 85, 247, 0.3);
    /* Purple hint */
}

.listing-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #18181b;
    padding: 10px;
    border-radius: 8px;
    min-width: 60px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.listing-date .day {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.listing-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #a1a1aa;
}

.listing-content {
    flex: 1;
}

.listing-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.listing-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #71717a;
}

.listing-arrow {
    color: #52525b;
}


/* Single News Page */
.news-single-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a1a1aa;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

.news-article-card {
    background: #09090b;
    /* Darker than body */
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

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

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #a855f7;
}

.author-meta {
    display: flex;
    flex-direction: column;
}

.author-name {
    color: #fff;
    font-weight: 700;
}

.publish-date {
    color: #71717a;
    font-size: 0.85rem;
}

.article-stats-badge {
    background: #18181b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #a1a1aa;
    border: 1px solid #27272a;
}

.neon-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    margin: 20px 0 30px 0;
    opacity: 0.5;
}

.article-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 30px;
    line-height: 1.3;
}

.article-content {
    color: #d4d4d8;
    font-size: 1.1rem;
    line-height: 1.8;
    /* Styles for plain text content */
}

.article-footer {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.btn-favorable {
    background: #18181b;
    color: #fff;
    border: 1px solid #27272a;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-favorable:hover {
    border-color: #22c55e;
    /* Green for "Favorable" concept */
    color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.1);
}

.btn-favorable.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

@media (max-width: 768px) {
    .news-article-card {
        padding: 20px;
    }

    .article-title {
        font-size: 1.5rem;
    }
}

/* --- COMMENTS SECTION --- */
.comments-section {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
}

.comments-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.comment-input {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-input:focus {
    outline: none;
    border-color: #a855f7;
}

.btn-submit-comment {
    align-self: flex-end;
    background: #a855f7;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-comment:hover {
    background: #9333ea;
    transform: translateY(-2px);
}

.login-prompt {
    color: #a1a1aa;
    text-align: center;
    padding: 20px;
}

.login-prompt a {
    color: #a855f7;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.comment-author {
    color: #fff;
    font-weight: 600;
}

.comment-date {
    color: #71717a;
    font-size: 0.85rem;
}

.comment-text {
    color: #d4d4d8;
    line-height: 1.6;
}

.no-comments {
    color: #71717a;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* --- FORM STYLES (Create/Edit) --- */
.news-form-card {
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.form-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #a1a1aa;
    margin-bottom: 30px;
}

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

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

.form-input,
.form-textarea {
    width: 100%;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #a855f7;
}

.form-textarea {
    resize: vertical;
    min-height: 200px;
}

.btn-submit {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
}

/* --- ACTION BUTTONS --- */
.btn-create-news {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    color: #fff;
    padding: 12px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.2s;
}

.btn-create-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
}

.article-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-edit-news {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border: 1px solid #a855f7;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-edit-news:hover {
    background: #a855f7;
    color: #fff;
}

/* --- PINNED STYLES --- */
.news-card-listing {
    position: relative;
}

.news-card-listing.is-pinned {
    background: rgba(234, 179, 8, 0.05);
    border-color: rgba(234, 179, 8, 0.3);
}

.pinned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-pin-news {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(234, 179, 8, 0.1);
    color: #f59e0b;
    border: 1px solid #f59e0b;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pin-news:hover {
    background: #f59e0b;
    color: #000;
}

.btn-pin-news.is-pinned {
    background: #f59e0b;
    color: #000;
}

.btn-pin-news.is-pinned:hover {
    background: transparent;
    color: #f59e0b;
}