/* ============================================
   BASE CSS — Shared across all themes
   ============================================ */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, opacity 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

input {
    font: inherit;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    padding: 8px 0;
    font-size: 12px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-text {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.top-bar-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.top-bar-social a {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.top-bar-social a:hover {
    opacity: 1;
}

/* Header */
.header {
    padding: 16px 0;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-tagline {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-follow {
    font-size: 13px;
    opacity: 0.6;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Navigation */
.nav {
    padding: 0;
    transition: background-color 0.4s ease, border-color 0.4s ease;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-link {
    display: block;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
}

/* Theme Indicator */
.theme-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.theme-indicator.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Main Content */
.main {
    padding: 30px 0 60px;
    min-height: 60vh;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.articles-column {
    flex: 1;
    min-width: 0;
}

/* Article Card */
.article-card {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-card:not(:last-child) {
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.article-card:hover {
    transform: translateX(4px);
}

.article-text {
    flex: 1;
    min-width: 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.article-category {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    font-size: 13px;
    opacity: 0.5;
}

.article-title {
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 8px;
    font-weight: 700;
}

.article-title a {
    transition: color 0.2s ease;
}

.article-perex {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.5;
}

.article-read {
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

/* Article Image */
.article-image {
    width: 180px;
    min-height: 130px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image {
    transform: scale(1.03);
}

/* Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-widget {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.widget-text {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 12px;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-input {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    font-size: 14px;
    transition: border-color 0.2s ease, background-color 0.4s ease;
    outline: none;
}

.newsletter-input:focus {
    border-color: currentColor;
}

.newsletter-btn {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newsletter-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Category List */
.category-list li {
    padding: 6px 0;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: opacity 0.2s;
}

.category-list a:hover {
    opacity: 0.7;
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Tags */
.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    transform: translateY(-1px);
}

/* Article Detail */
.article-detail {
    max-width: 100%;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.6;
    transition: opacity 0.2s;
}

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

.article-detail-hero {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-author-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    opacity: 0.6;
}

.article-detail-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 900;
}

.article-detail-content {
    font-size: 16px;
    line-height: 1.8;
}

.article-detail-content p {
    margin-bottom: 18px;
}

/* Share */
.article-share {
    margin-top: 30px;
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 500;
}

.share-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-1px);
}

/* Related Articles */
.related-articles {
    margin-top: 40px;
    padding-top: 30px;
}

.related-articles h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

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

.related-card {
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: block;
}

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

.related-image {
    height: 80px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.related-card h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-size: 12px;
    opacity: 0.5;
}

/* Footer */
.footer {
    padding: 40px 0 20px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.7;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-col ul a:hover {
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.footer-social a {
    font-size: 13px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

    .content-wrapper {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar-text {
        font-size: 11px;
    }

    .header-follow {
        display: none;
    }

    .logo-name {
        font-size: 22px;
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }

    .article-card {
        flex-direction: column-reverse;
        gap: 12px;
        padding: 18px 0;
    }

    .article-image {
        width: 100%;
        min-height: 160px;
    }

    .article-title {
        font-size: 16px;
    }

    .article-detail-title {
        font-size: 24px;
    }

    .article-detail-hero {
        height: 180px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
