/**
 * AITabs Hugo — Main Stylesheet (Dark Theme)
 * Adapted from WordPress aitabs-linear.css
 */

/* ── Root Variables ─────────────────────────────────────────── */
:root {
    --bg: #0d0d0d;
    --bg-secondary: #141414;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.14);
    --text: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-1: #FACC15;
    --gradient: linear-gradient(135deg, #FACC15 0%, #FACC15 100%);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Global Reset ───────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── Navigation ─────────────────────────────────────────────── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 48px;
    height: 56px;
    background: rgba(13,13,13,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-logo {
    font-size: 20px; font-weight: 600; color: var(--text);
    letter-spacing: -0.01em; text-decoration: none;
    transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.75; }
.nav-logo .logo-ai { color: var(--accent-1); font-weight: 800; }
.nav-logo .logo-tabs { color: var(--text); font-weight: 700; }
.nav-logo .logo-dot { color: var(--accent-1); font-weight: 800; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
    font-size: 14px; color: var(--text-muted); font-weight: 500;
    transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover { color: var(--accent-1); text-shadow: 0 0 12px rgba(250,204,21,0.4); }
.nav-cta {
    padding: 7px 16px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    color: #000 !important;
    transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }
.nav-toggle { display: none; font-size: 24px; color: var(--text); }

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
    min-height: 82vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(250,204,21,0.14) 0%, transparent 60%),
        var(--bg);
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(250,204,21,0.15);
    border: 1px solid rgba(250,204,21,0.25);
    border-radius: 100px;
    font-size: 13px; font-weight: 500; color: #FACC15;
    margin-bottom: 28px;
}
.hero-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-1);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text);
    max-width: 780px;
    margin-bottom: 20px;
}
.hero h1 .gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.65;
    margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px;
    background: var(--gradient);
    color: #000; border-radius: var(--radius);
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px;
    background: var(--bg-card);
    color: var(--text); border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 15px; font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.hero-stats {
    display: flex; gap: 48px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.stat-num { font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Layout (3-column) ─────────────────────────────────────── */
.aitabs-layout {
    display: grid;
    grid-template-columns: 160px 1fr 260px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 56px);
    padding-top: 56px;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.aitabs-sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 12px;
    gap: 4px;
    border-right: 1px solid var(--border);
    background: rgba(13,13,13,0.5);
    overflow-y: auto;
}
.sidebar-btn {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.2s;
    font-family: var(--font);
}
.sidebar-btn:hover { background: var(--bg-secondary); color: var(--text); }
.sidebar-btn.active { background: var(--accent-1); color: #000; font-weight: 600; }
.sidebar-btn .sidebar-icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.sidebar-btn.active .sidebar-icon { background: rgba(0,0,0,0.2); border-color: rgba(0,0,0,0.2); }
.sidebar-btn:hover .sidebar-icon { border-color: var(--accent-1); background: rgba(250,204,21,0.08); }
.sidebar-btn .sidebar-label { font-weight: 500; white-space: nowrap; }
.sidebar-divider { width: 100%; height: 1px; background: var(--border); margin: 10px 0; }
.sidebar-section-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-muted);
    padding: 0 12px 6px;
}

/* ── Center Content ─────────────────────────────────────────── */
.aitabs-center { padding: 32px 24px 80px; overflow-y: auto; }
.center-hero { margin-bottom: 24px; }
.center-hero p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }

/* Search */
.search-wrap { position: relative; max-width: 480px; }
.search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
}
.search {
    width: 100%;
    padding: 10px 16px 10px 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(250,204,21,0.15); }
.search::placeholder { color: var(--text-muted); }

/* Section Header */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.section-title {
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.tool-count { font-size: 12px; color: var(--text-muted); }

/* Featured Articles List */
.article-featured-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.article-featured-card {
    display: flex; align-items: center; gap: 16px;
    background: rgba(250,204,21,0.04);
    border: 1px solid rgba(250,204,21,0.15);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.article-featured-card:hover { border-color: var(--accent-1); background: rgba(250,204,21,0.06); }
.article-featured-card:hover .article-arrow { color: var(--accent-1); }
.article-featured-inner { flex: 1; min-width: 0; }
.article-featured-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.article-featured-badge {
    font-size: 11px; font-weight: 600; color: #000;
    background: var(--accent-1); padding: 2px 8px; border-radius: 20px;
}
.article-featured-date { font-size: 11px; color: var(--text-muted); }
.article-featured-title {
    font-size: 15px; font-weight: 600; color: #ffffff;
    line-height: 1.3; display: block;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.article-featured-excerpt {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.5; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-arrow { color: var(--text-muted); font-size: 18px; flex-shrink: 0; transition: transform 0.15s; }

/* New Articles List */
.new-articles-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.new-article-item {
    display: flex; align-items: center; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 0;
    text-decoration: none; transition: all 0.15s; overflow: hidden;
}
.new-article-item:hover {
    border-color: var(--accent-1); background: var(--bg-secondary);
    text-decoration: none; transform: translateY(-1px);
}
.new-article-img {
    width: 80px; min-height: 80px; height: auto; flex-shrink: 0;
    align-self: stretch; display: flex; align-items: center;
    justify-content: center; font-size: 32px;
    border-right: 1px solid var(--border);
    background: var(--bg-secondary);
}
.new-article-body {
    flex: 1; padding: 12px 18px; display: flex;
    flex-direction: column; gap: 2px; min-height: 0; justify-content: center;
}
.new-article-title {
    font-size: 15px; font-weight: 600; color: #ffffff;
    line-height: 1.4; display: block;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.new-article-excerpt {
    font-size: 12px; color: var(--text-secondary);
    line-height: 1.5; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.new-article-meta { display: flex; align-items: center; gap: 8px; }
.new-article-tag {
    font-size: 10px; font-weight: 700; color: #000;
    background: var(--accent-1); padding: 2px 8px;
    border-radius: 20px; text-transform: uppercase;
}
.new-article-date { font-size: 12px; color: var(--text-muted); }
.new-article-item .tool-arrow {
    padding: 0 16px; color: var(--text-muted); font-size: 18px;
    transition: transform 0.2s; flex-shrink: 0;
}
.new-article-item:hover .tool-arrow { transform: translateX(3px); color: var(--accent-1); }

/* Load More Button */
.load-more-btn {
    display: block; width: 100%; padding: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-secondary);
    font-size: 13px; font-weight: 500; font-family: var(--font);
    cursor: pointer; transition: all 0.15s;
    margin-bottom: 20px;
}
.load-more-btn:hover { border-color: var(--accent-1); color: var(--text); background: var(--bg-secondary); }

/* ── Right Sidebar ──────────────────────────────────────────── */
.aitabs-rightbar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    padding: 24px 16px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rightbar-title {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.rightbar-divider { width: 100%; height: 1px; background: var(--border); }
.rightbar-stat {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-muted);
    padding: 4px 0; border-bottom: 1px solid var(--border);
}
.rightbar-stat span:last-child { color: var(--text); font-weight: 500; }

/* Social Icon Links */
.social-icon-link {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all 0.15s; color: var(--text-secondary) !important;
    text-decoration: none !important;
}
.social-icon-link:hover { border-color: var(--accent-1); color: var(--accent-1) !important; }

/* Spotlight Cards (Trending) */
.spotlight-card {
    display: flex; align-items: center; gap: 10px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.spotlight-card:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 16px rgba(250,204,21,0.12);
}
.spotlight-icon {
    width: 32px; height: 32px;
    background: var(--accent-1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #000;
    flex-shrink: 0;
}
.spotlight-text { flex: 1; min-width: 0; }
.spotlight-name {
    font-size: 12px; font-weight: 600; color: var(--text);
    margin-bottom: 2px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 8em;
}
.spotlight-desc {
    font-size: 11px; color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.spotlight-badge {
    font-size: 9px; font-weight: 600; color: #000;
    background: var(--accent-1); padding: 2px 6px;
    border-radius: 20px; flex-shrink: 0;
}

/* Newsletter */
.newsletter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}
.newsletter-card h3 { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.newsletter-card p { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.newsletter-form { display: flex; flex-direction: column; gap: 6px; }
.newsletter-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text);
    font-family: var(--font);
    box-sizing: border-box;
}
.newsletter-input:focus { outline: none; border-color: var(--accent-1); }
.newsletter-btn {
    width: 100%;
    background: var(--accent-1);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
}
.newsletter-btn:hover { opacity: 0.9; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.footer a { color: var(--text-secondary) !important; }
.footer a:hover { color: var(--text) !important; }
.footer-logo .logo-ai { color: var(--accent-1); font-weight: 600; }
.footer-logo .logo-dot { color: var(--accent-1); font-weight: 700; }

/* ── Article Cards (list pages) ─────────────────────────────── */
.page-header { margin-bottom: 32px; }
.page-title { font-size: 32px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.page-subtitle { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

.articles-grid { display: flex; flex-direction: column; gap: 12px; }
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: row; align-items: center; overflow: hidden;
}
.article-card:hover {
    border-color: var(--accent-1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.article-card-img {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}
.article-card-body {
    padding: 16px 18px; display: flex;
    flex-direction: column; gap: 6px; flex: 1; min-width: 0;
}
.article-card-meta { display: flex; align-items: center; gap: 8px; }
.article-card-tag {
    font-size: 10px; font-weight: 700; color: #000;
    background: var(--accent-1); padding: 2px 8px;
    border-radius: 20px; text-transform: uppercase;
}
.article-card-date { font-size: 12px; color: var(--text-muted); }
.article-card-title {
    font-size: 15px; font-weight: 600; color: var(--text);
    line-height: 1.4; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.article-card-excerpt {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-arrow {
    font-size: 16px; color: var(--text-muted);
    margin-left: auto; flex-shrink: 0; padding-right: 4px;
    transition: transform 0.15s, color 0.15s;
}
.article-card:hover .article-card-arrow { transform: translateX(3px); color: var(--accent-1); }

/* ── Related Articles ───────────────────────────────────────── */
.related-articles {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.related-articles h3 {
    font-size: 18px; font-weight: 600; color: var(--text);
    margin-bottom: 16px;
}
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}
.related-card:hover { border-color: var(--accent-1); }
.related-card-title { font-size: 14px; font-weight: 500; color: var(--text); }
.related-card-date { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ── Responsive Design ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .aitabs-layout { grid-template-columns: 160px 1fr; }
    .aitabs-rightbar { display: none; }
}
@media (max-width: 768px) {
    nav { padding: 0 20px; }
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.active {
        display: flex; flex-direction: column;
        position: absolute; top: 56px; left: 0; right: 0;
        background: rgba(13,13,13,0.98);
        padding: 20px; gap: 16px;
        border-bottom: 1px solid var(--border);
    }
    .aitabs-layout { grid-template-columns: 1fr; }
    .aitabs-sidebar { display: none; }
    .aitabs-center { padding: 20px 16px 60px; }
    .hero { min-height: 70vh; padding-top: 90px; }
    .hero-stats { gap: 28px; flex-wrap: wrap; justify-content: center; }
    .article-featured-card { flex-direction: column; align-items: flex-start; }
    .footer { text-align: center; padding: 24px; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-stats { gap: 20px; }
    .new-article-img { width: 60px; min-height: 60px; font-size: 24px; }
}
