* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f0f2f5;
    color: #1c1e21;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1877f2;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #1c1e21;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #e4e6eb;
}

/* Main Layout with Ads */
.main-layout {
    display: flex;
    gap: 15px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px 10px;
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 1440px;
}

/* Advertisement Sections */
.ad-section {
    width: 200px;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.ad-section h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #65676b;
    padding: 0 5px;
    text-align: center;
    font-weight: 600;
}

.ads-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    animation: fadeIn 0.5s;
}

.ad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ad-card-media {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.ad-card-media img,
.ad-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-card-content {
    padding: 15px;
}

.ad-card-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #1c1e21;
}

.ad-card-content p {
    font-size: 14px;
    color: #65676b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 10px;
}

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.slider {
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px;
}

.slide-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.slide-content .meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

/* News Feed */
.feed-container {
    margin-top: 30px;
}

.feed-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Featured News Section (Big) */
.featured-news {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.featured-media {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.featured-media img,
.featured-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-media.no-media {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-content {
    padding: 25px;
}

.featured-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #1c1e21;
    line-height: 1.3;
}

.featured-content p {
    font-size: 16px;
    color: #65676b;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #65676b;
}

/* News Grid (4 items with thumbnails) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.news-grid-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.news-grid-media {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.news-grid-media img,
.news-grid-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-grid-media.no-media {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.news-grid-content {
    padding: 15px;
}

.news-grid-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #1c1e21;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-grid-meta {
    font-size: 13px;
    color: #65676b;
}

/* Text-only News List (4 items) */
.news-text-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.news-text-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #1877f2;
}

.news-text-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.news-text-item h4 {
    font-size: 16px;
    color: #1c1e21;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-text-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #65676b;
}

/* Standard News Cards Section */
.news-cards-section {
    display: grid;
    gap: 20px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.news-card-media {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.news-card-media img,
.news-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-content {
    padding: 20px;
}

.news-card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1c1e21;
}

.news-card-content p {
    color: #65676b;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #e4e6eb;
    font-size: 14px;
    color: #65676b;
}

.news-stats {
    display: flex;
    gap: 20px;
}

.news-actions {
    display: flex;
    gap: 15px;
    padding: 10px 20px;
    border-top: 1px solid #e4e6eb;
}

.action-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: #f0f2f5;
}

.action-btn.liked {
    color: #1877f2;
}

/* Shorts Style Feed (for complaints) */
.shorts-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shorts-card {
    position: relative;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.shorts-card:hover {
    transform: scale(1.02);
}

.shorts-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shorts-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    padding: 20px;
}

.shorts-overlay h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.shorts-overlay p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shorts-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    margin: 30px auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s;
}

.modal-content.large {
    max-width: 900px;
    max-height: 95vh;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

form input,
form textarea,
form select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: #1877f2;
}

form button {
    background: #1877f2;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background: #166fe5;
}

/* Detail View */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e4e6eb;
}

.detail-author {
    flex: 1;
}

.detail-author h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.detail-author span {
    font-size: 14px;
    color: #65676b;
}

.detail-media {
    width: 100%;
    max-height: 500px;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.detail-media img,
.detail-media video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.detail-content {
    margin-bottom: 20px;
}

.detail-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.detail-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #1c1e21;
}

.comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e4e6eb;
}

.comments-section h3 {
    margin-bottom: 20px;
}

.comment {
    background: #f0f2f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: bold;
}

.comment-time {
    font-size: 12px;
    color: #65676b;
}

.comment-text {
    color: #1c1e21;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.comment-form input {
    flex: 1;
}

/* Loading */
.loading,
.slider-loading {
    text-align: center;
    padding: 40px;
    color: #65676b;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-layout {
        flex-direction: column;
    }

    .ad-section {
        width: 100%;
        position: static;
    }

    .left-ads {
        order: 1;
    }

    .main-content {
        order: 2;
    }

    .right-ads {
        order: 3;
    }

    .ads-container {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
    }

    .ad-card {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: space-around;
    }

    .main-layout {
        padding: 10px;
        gap: 15px;
    }

    .slider-container {
        height: 300px;
    }

    .slide-content h3 {
        font-size: 20px;
    }

    .news-card-media {
        height: 200px;
    }

    .shorts-feed {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .shorts-card {
        height: 350px;
    }

    .modal-content {
        margin: 20px auto;
        width: 95%;
        padding: 20px;
    }

    .detail-content h2 {
        font-size: 22px;
    }

    .ad-card {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 14px;
    }

    .slider-container {
        height: 250px;
    }

    .slide-content {
        padding: 20px;
    }

    .slide-content h3 {
        font-size: 18px;
    }

    .news-card-content h3 {
        font-size: 18px;
    }

    .shorts-card {
        height: 300px;
    }

    .action-btn {
        font-size: 14px;
    }

    .ad-card {
        min-width: 180px;
    }

    .ad-card-media {
        height: 150px;
    }
}

