/* Frontend Styles */
:root {
    --primary: #e94560;
    --dark: #1a1a2e;
    --accent: #0f3460;
    --light: #f8f9fa;
    --gray: #6c757d;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--primary); }

.container { max-width: 1200px; }

/* Header */
.site-header {
    background: var(--dark);
    color: #fff;
}

.top-bar {
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.date { opacity: 0.7; }

.social-links a {
    display: inline-block;
    margin-left: 12px;
    opacity: 0.7;
}
.social-links a:hover { opacity: 1; color: var(--primary); }

.logo-section { padding: 20px 0; }

.logo {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}

.tagline {
    color: rgba(255,255,255,0.6);
    margin: 5px 0 0;
    font-size: 14px;
}

/* Navigation */
.main-nav {
    background: var(--accent);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--primary);
}

.nav-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 10px;
    display: none;
}

/* Price Ticker */
.price-ticker-bar {
    background: #0d1117;
    overflow: hidden;
    padding: 10px 0;
    border-bottom: 1px solid #21262d;
}

.ticker-marquee {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-marquee:hover {
    animation-play-state: paused;
}

.ticker-coin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 25px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.ticker-coin strong {
    color: #f0b90b;
}

.ticker-coin .up {
    color: #3ba55c;
}

.ticker-coin .down {
    color: #ef4444;
}

.price-ticker {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    padding: 10px 0;
}

.ticker-wrap {
    display: flex;
    overflow: hidden;
}

.ticker {
    display: flex;
    animation: ticker 60s linear infinite;
    white-space: nowrap;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 25px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.ticker-symbol {
    font-weight: 700;
    color: #fff;
    font-size: 14px;
}

.ticker-price {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.ticker-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.ticker-change.up {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.ticker-change.down {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}

/* Featured Section */
.featured-section { margin-bottom: 30px; }

.featured-card {
    height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.featured-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px;
    width: 100%;
    color: #fff;
}

.category-badge {
    display: inline-block;
    background: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.featured-overlay h2 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-overlay p {
    opacity: 0.8;
    margin-bottom: 15px;
}

.featured-overlay .meta span {
    margin-right: 20px;
    font-size: 13px;
    opacity: 0.7;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    opacity: 0.5;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* News Grid */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.section-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.news-image {
    flex: 0 0 280px;
}

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

.news-content {
    padding: 20px;
    flex: 1;
}

.category-tag {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-content h4 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.news-content h4 a:hover { color: var(--primary); }

.news-content p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--gray);
}

.news-meta i { margin-right: 5px; }

/* Sidebar */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.widget-title {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

/* Trending */
.trending-list { display: flex; flex-direction: column; gap: 15px; }

.trending-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.trending-item .rank {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.5;
    line-height: 1;
}

.trending-item a {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.trending-item small { color: var(--gray); font-size: 12px; }

/* Newsletter */
.newsletter-widget {
    background: var(--dark);
    color: #fff;
}

.newsletter-widget p { opacity: 0.8; font-size: 14px; }

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
}

.newsletter-form button {
    padding: 12px 18px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-form button:hover { background: #d63850; }

/* Category List */
.category-list { list-style: none; padding: 0; margin: 0; }

.category-list li a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.category-list li:last-child a { border-bottom: none; }

.category-list .count {
    background: var(--light);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--gray);
}

/* Ad Banners */
.ad-banner {
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.ad-banner img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

/* Single Post */
.single-post {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
}

.post-header { margin-bottom: 30px; }

.post-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.post-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--dark);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--gray);
    font-size: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.post-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

.post-content {
    font-size: 17px;
    line-height: 1.8;
}

.post-content p { margin-bottom: 20px; }

.post-content h2, 
.post-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--dark);
}

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

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tag-label {
    font-weight: 600;
    margin-right: 10px;
}

.post-tags a {
    display: inline-block;
    background: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    margin: 5px 5px 0 0;
    transition: background 0.2s;
}

.post-tags a:hover {
    background: var(--primary);
    color: #fff;
}

/* Related Posts */
.related-posts { margin-top: 40px; }

.related-posts h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.related-card:hover { transform: translateY(-3px); }

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-card-content { padding: 15px; }

.related-card h5 {
    font-size: 14px;
    margin: 0 0 10px;
    line-height: 1.4;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 5px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 18px;
    background: #fff;
    border-radius: 8px;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a:hover { background: var(--primary); color: #fff; }
.pagination .active { background: var(--primary); color: #fff; }

/* Footer */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.site-footer h5 {
    color: #fff;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin-bottom: 10px; }

.footer-links a:hover { color: var(--primary); }

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .news-card { flex-direction: column; }
    .news-image { flex: none; height: 200px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
    }
    .nav-menu.active { display: flex; }
    .nav-menu li a { padding: 12px 20px; }
    .featured-card { height: 350px; }
    .featured-overlay h2 { font-size: 22px; }
    .single-post { padding: 20px; }
    .post-title { font-size: 24px; }
    .related-grid { grid-template-columns: 1fr; }
    .logo { font-size: 28px; }
}

/* Link Ads */
.link-ads-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-ads-list li {
    border-bottom: 1px solid #eee;
}

.link-ads-list li:last-child {
    border-bottom: none;
}

.link-ads-list li a {
    display: block;
    padding: 12px 0;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
}

.link-ads-list li a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.link-ads-list li a i {
    color: var(--primary);
}

.link-ads-widget .widget-title {
    border-bottom-color: #f0ad4e;
}

.link-ads-widget .widget-title i {
    color: #f0ad4e;
}
