/* Article Image Styles */
.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    background-color: var(--background-tertiary);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image img:hover {
    transform: scale(1.05);
}

/* Article Image Left Styles */
.article-image-left {
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
    background-color: var(--background-tertiary);
    margin-right: 0;
    align-self: stretch;
}

.article-image-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image-left img:hover {
    transform: scale(1.05);
}

/* Placeholder Icon Styles */
.placeholder-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background-color: #6366f1;
    color: white;
    border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
}

/* Article Preview Styles */
.article-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 12px 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Article Classification Styles */
.article-classification {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.topic-badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subtopic-badge {
    background: var(--background-tertiary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

.tone-badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Tone-specific colors */
.tone-positive { background: #dcfce7; color: #166534; }
.tone-negative { background: #fee2e2; color: #991b1b; }
.tone-neutral { background: #f3f4f6; color: #374151; }
.tone-enthusiastic { background: #fef3c7; color: #92400e; }
.tone-concerned { background: #fed7aa; color: #9a3412; }
.tone-informative { background: #dbeafe; color: #1e40af; }
.tone-objective { background: #e5e7eb; color: #4b5563; }
.tone-editorial { background: #f3e8ff; color: #7c2d12; }
.tone-investigative { background: #fce7f3; color: #be185d; }
.tone-breaking-news { background: #fef2f2; color: #dc2626; }
.tone-analytical { background: #ecfdf5; color: #065f46; }
.tone-cautious { background: #fff7ed; color: #c2410c; }
.tone-alarming { background: #fef2f2; color: #dc2626; }
.tone-critical { background: #fef2f2; color: #b91c1c; }
.tone-supportive { background: #f0fdf4; color: #15803d; }
.tone-controversial { background: #fef3c7; color: #a16207; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--background-secondary);
    padding: 32px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-heavy);
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
}

.modal h2 {
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-medium);
    font-family: var(--font-text);
    font-size: 0.875rem;
    background-color: var(--background-tertiary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--background-secondary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

/* Article Cards */
.article-card {
    background-color: var(--background-secondary);
    border-radius: var(--radius-large);
    padding: 20px;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

/* Full Width Article Cards */
.article-card-full {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 0;
    overflow: hidden;
}

.article-card-content {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    min-height: 200px;
}

.article-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    justify-content: space-between;
}

.article-content-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
    min-height: 48px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: var(--background-tertiary);
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
}

.article-category:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.article-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.article-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    flex: 1;
    max-width: 60%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-title a {
    color: inherit;
    text-decoration: none !important;
}

.article-title:hover,
.article-title a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}


.article-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--background-tertiary);
}

/* Remove footer styling for full-width cards */
.article-card-full .article-footer {
    display: none;
}

.article-source {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}

.article-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-style: italic;
}

/* Article Bottom Bar */
.article-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

.article-classifications {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.article-author-center {
    flex: 1;
    text-align: center;
}

.article-actions-inline {
    display: flex;
    gap: 8px;
}

.article-actions {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background-color: var(--background-tertiary);
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.action-btn:hover {
    background-color: var(--accent-color);
    color: var(--text-white);
    transform: scale(1.1);
}

.action-btn.active {
    background-color: var(--accent-color);
    color: var(--text-white);
}

/* Loading States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--background-tertiary);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--background-secondary);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    border-left: 4px solid var(--accent-color);
    z-index: 1001;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.success {
    border-left-color: var(--green);
}

.toast.warning {
    border-left-color: var(--orange);
}

.toast.error {
    border-left-color: var(--red);
}

.toast-content {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background-color: var(--background-tertiary);
    color: var(--text-primary);
}

/* Stats and Dashboard Elements */
.stat-card {
    background-color: var(--background-secondary);
    border-radius: var(--radius-large);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--green);
}

.stat-change.negative {
    color: var(--red);
}

/* Filters and Controls */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background-color: var(--background-tertiary);
    border-radius: var(--radius-medium);
    overflow-x: auto;
}

.filter-tab {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-small);
    background-color: transparent;
    color: var(--text-secondary);
    font-family: var(--font-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-tab.active,
.filter-tab:hover {
    background-color: var(--background-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
}

/* Badge and Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: var(--accent-color);
    color: var(--text-white);
}

.badge-secondary {
    background-color: var(--background-tertiary);
    color: var(--text-secondary);
}

.badge-success {
    background-color: var(--green);
    color: var(--text-white);
}

.badge-warning {
    background-color: var(--orange);
    color: var(--text-white);
}

.badge-error {
    background-color: var(--red);
    color: var(--text-white);
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    margin-top: 4px;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--background-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--background-tertiary);
}

.search-result-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Responsive adjustments for components */
@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
        margin: 20px;
    }
    
    .article-card {
        padding: 16px;
    }
    
    .article-card-full {
        padding: 20px;
    }
    
    .article-card-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .article-sidebar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: unset;
        width: 100%;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .toast {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .filter-tabs {
        padding: 2px;
    }
    
    .filter-tab {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1rem;
    }
    
    .article-summary {
        font-size: 0.8125rem;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--background-tertiary) 25%, rgba(255, 255, 255, 0.3) 50%, var(--background-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: var(--radius-small);
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}