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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Ad Space */
.ad-banner {
    background: #fff;
    border: 2px dashed #ddd;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.platform-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.platform-tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #667eea;
}

.platform-tab:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.platform-tab.active {
    background: #667eea;
    color: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.news-card .platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #667eea;
    color: white;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.news-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.news-card .date {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.news-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-card .source {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.2rem;
}

.loading:after {
    content: '...';
    animation: dots 1.5s infinite;
}

.error {
    background: #fee;
    border: 2px solid #fcc;
    padding: 1.5rem;
    border-radius: 8px;
    color: #c33;
    text-align: center;
    margin: 2rem 0;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

.sidebar-ad {
    position: sticky;
    top: 20px;
    background: white;
    border: 2px dashed #ddd;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar-ad {
        display: none;
    }
}

.last-updated {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.stats {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Affiliate area styles */
#affiliateArea {
    margin-top: 0.75rem;
    color: #ddd;
    font-size: 0.9rem;
}

#affiliateArea input[type="text"] {
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #666;
    background: #222;
    color: #fff;
    margin-left: 0.5rem;
}

#affiliateArea button {
    margin-left: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: none;
    background: #667eea;
    color: white;
    cursor: pointer;
}

#affiliateStatus {
    display: inline-block;
    margin-left: 0.75rem;
    color: #9fdf9f;
}

/* Pagination styles */
.pagination {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.pagination-btn {
    padding: 0.6rem 1.2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    font-weight: 600;
    color: #667eea;
    min-width: 120px;
    text-align: center;
    font-size: 0.95rem;
}
