/* RSS Reader - Feedly-inspiriertes Design */

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

:root {
    --primary: #2490ff;
    --primary-dark: #1a7acc;
    --text-primary: #1c1c1c;
    --text-secondary: #525252;
    --text-light: #888;
    --border: #e8e8e8;
    --bg-primary: #ffffff;
    --bg-secondary: #f7f9fb;
    --bg-hover: #f3f4f6;
    --sidebar-width: 280px;
    --header-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Sidebar */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-link {
    font-size: 1.25rem;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.admin-link:hover {
    opacity: 1;
}

.sidebar-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.section-header {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.refresh-btn {
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    padding: 0.25rem;
}

.refresh-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.sidebar-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
    gap: 0.75rem;
}

.sidebar-item:hover {
    background: var(--bg-hover);
}

.sidebar-item.active {
    background: var(--bg-hover);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-item .icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.sidebar-item .label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item .count {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.feed-item {
    padding-left: 3rem;
}

/* Content Header */
.content-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.article-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.icon-button {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.icon-button:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Articles Container */
.articles-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Article Card */
.article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.article-card.read {
    opacity: 0.6;
}

.article-card.read:hover {
    opacity: 1;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.feed-badge {
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.article-actions {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
    padding: 0.25rem;
}

.action-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.action-button.active {
    opacity: 1;
    color: #fbbf24;
}

.article-content {
    cursor: pointer;
}

.article-image {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

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

/* Article Modal */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

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

.article-modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.article-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.close-button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: color 0.2s;
}

.close-button:hover {
    color: var(--text-primary);
}

.article-modal-body {
    padding: 2rem;
}

.article-detail-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.article-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-detail-author {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.article-detail-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.article-detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-detail-content p {
    margin-bottom: 1rem;
}

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

.article-detail-content a {
    color: var(--primary);
    text-decoration: none;
}

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

.article-detail-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.read-more-link:hover {
    color: var(--primary-dark);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-light);
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-header {
        padding: 1rem;
    }
    
    .articles-container {
        padding: 1rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .article-modal {
        padding: 1rem;
    }
    
    .article-modal-body {
        padding: 1rem;
    }
    
    .article-detail-title {
        font-size: 1.5rem;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    .sidebar,
    .content-header,
    .article-actions {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .article-card {
        page-break-inside: avoid;
    }
}

