:root {
    --bg-color: #0c0e14;
    --surface-color: rgba(26, 29, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f1f5;
    --text-secondary: #a0a6b5;
    --accent-color: #6c5ce7;
    --accent-hover: #a29bfe;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-blur: blur(12px);
    --header-height: 70px;
    --sidebar-width: 280px;
    --red: #ff7675;
    --green: #55efc4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.header-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #6c5ce7, #00d2ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-logo span {
    color: #00d2ff;
}

.header-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.header-nav a {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 15px;
    padding: 5px 0;
    position: relative;
}

.header-nav a:hover, .header-nav a.active {
    color: var(--text-primary);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: 0.3s;
}

.header-nav a:hover::after, .header-nav a.active::after {
    width: 100%;
}

.header-search input {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 18px;
    color: white;
    width: 250px;
    outline: none;
    transition: 0.3s;
}

.header-search input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Layout Grid */
.main-container {
    max-width: 1400px;
    margin: var(--header-height) auto 0;
    display: flex;
    padding: 30px 40px;
    min-height: calc(100vh - var(--header-height));
    gap: 30px;
}

/* Sidebar */
.main-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 30px);
    height: fit-content;
}

.sidebar-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.source-list, .cat-list {
    list-style: none;
}

.source-list li, .cat-list li {
    margin-bottom: 12px;
}

.source-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    padding: 5px;
    border-radius: 10px;
}

.source-list a img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
    background: white;
}

.source-list a:hover, .cat-list a:hover {
    background: var(--glass-bg);
    padding-right: 10px;
}

.cat-list a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* News Card */
.news-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.card-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
}

.news-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(108, 92, 231, 0.9);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

.card-content {
    padding: 24px;
}

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

.source-logo-mini {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.source-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: auto;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-snippet {
    font-size: 14px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.react-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-emoji {
    font-size: 20px;
}

.total-reacts {
    font-size: 13px;
    font-weight: 600;
}

.btn-read-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
}

/* Load More Button */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.btn-load-more {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
    transition: 0.3s;
}

.btn-load-more:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

/* Footer */
.main-footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    .main-container {
        padding: 20px;
    }
}
