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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
    color: #2c3e50;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.stats {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
}

.stat-value {
    font-weight: bold;
    color: #2c3e50;
    font-size: 18px;
}

.folders-section, .feeds-section {
    margin-bottom: 30px;
}

.folders-section h3, .feeds-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.folders-list, .feeds-list {
    list-style: none;
}

.folder-item, .feed-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.folder-item:hover, .feed-item:hover {
    background: #ecf0f1;
}

.folder-item.active, .feed-item.active {
    background: #3498db;
    color: white;
}

.feed-item {
    font-size: 14px;
    padding-left: 20px;
}

.content-area {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.filter-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.articles-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.articles-container::-webkit-scrollbar {
    width: 8px;
}

.articles-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.articles-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.articles-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.articles-table {
    width: 100%;
    border-collapse: collapse;
}

.articles-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.articles-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    background: #f8f9fa;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.articles-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.articles-table tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.articles-table tr.unread {
    font-weight: 600;
}

.article-title {
    color: #2c3e50;
    font-size: 15px;
}

.article-feed {
    color: #7f8c8d;
    font-size: 12px;
}

.article-date {
    color: #95a5a6;
    font-size: 12px;
    white-space: nowrap;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #7f8c8d;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.modal-large .modal-content {
    max-width: 900px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input[type="text"] {
    display: inline-block;
    width: calc(100% - 120px);
    margin-right: 10px;
}

.folders-manage-list {
    list-style: none;
    margin-top: 20px;
}

.folder-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 6px;
}

.folder-manage-item button {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.folder-manage-item button:hover {
    background: #c0392b;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.feeds-manage-list {
    margin-top: 20px;
}

.feed-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.feed-manage-info {
    flex: 1;
}

.feed-manage-info strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.feed-manage-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
    font-size: 13px;
    color: #7f8c8d;
}

.feed-manage-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.feed-manage-actions {
    display: flex;
    gap: 8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

#articleDetail {
    padding: 20px 0;
}

.article-detail-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.article-detail-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-detail-meta {
    color: #7f8c8d;
    font-size: 14px;
}

.article-detail-meta a {
    color: #3498db;
    text-decoration: none;
}

.article-detail-meta a:hover {
    text-decoration: underline;
}

.article-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #34495e;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

.article-detail-content a {
    color: #3498db;
    text-decoration: none;
}

.article-detail-content a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-actions {
        flex-wrap: wrap;
    }
    
    .content-area {
        height: auto;
        max-height: calc(100vh - 200px);
    }
}

