/* Overclocked / 超限域 - 极简博客系统 */
:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-hover: #1a1a1a;
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #ff6b35;
    --accent-glow: rgba(255, 107, 53, 0.3);
    --border: #2a2a2a;
    --success: #00d084;
    --warning: #ffcc00;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* 顶部导航 */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 0 2rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span { color: var(--text); font-weight: 400; font-size: 0.9rem; margin-left: 0.5rem; opacity: 0.7; }

.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-box input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 20px;
    width: 200px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    width: 280px;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

/* 语言选择器 */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.lang-btn:hover { border-color: var(--accent); }

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 150px;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lang-dropdown.active { display: block; }

.lang-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.lang-option:hover { background: var(--surface-hover); }

.lang-option.active { color: var(--accent); font-weight: 600; }

/* 主内容区 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 4rem;
}

/* 文章列表 */
.articles-grid {
    display: grid;
    gap: 1.5rem;
}

/* 文章卡片 - 新布局支持图片 */
.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.article-date { display: flex; align-items: center; gap: 0.3rem; }

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.3;
}

.article-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.article-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.stat { display: flex; align-items: center; gap: 0.3rem; }

/* 加载动画 */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 翻译提示 */
.translation-notice {
    background: var(--surface-hover);
    border-left: 3px solid var(--warning);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.translation-notice strong { color: var(--warning); }

/* 响应式布局 */
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    nav { padding: 0 1rem; }
    .search-box input { width: 120px; }
    .search-box input:focus { width: 160px; }
    main { padding: 80px 1rem 2rem; }
    .article-card { padding: 0; }
    .article-content { padding: 1rem; }
    .article-image { height: 150px; }
}

/* Editor Link in Nav */
.nav-controls .btn-icon {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.3s;
}

.nav-controls .btn-icon:hover {
    border-color: var(--accent);
    background: var(--surface-hover);
}

@media (max-width: 768px) {
    .nav-controls .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
}

.btn-login {
    background: var(--accent);
    color: var(--bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

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

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-btn:hover {
    border-color: var(--accent);
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-name {
    font-size: 0.85rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 150px;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1001;
}

.user-dropdown.active {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--surface-hover);
}

/* Comment login prompt */
.login-prompt {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.login-prompt a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Editor link in nav */
.nav-controls .btn-icon[href="editor.html"] {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.3s;
}

.nav-controls .btn-icon[href="editor.html"]:hover {
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    .nav-controls .btn-icon[href="editor.html"] {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}
