:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #6366f1;
    /* Example accent */
    --secondary-bg: #1a1a1a;
    --border-color: #333;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ccc;
}

.main-nav a:hover {
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #888;
}

.lang-switch a {
    color: #888;
    font-weight: 500;
}

.lang-switch a:hover,
.lang-switch a.active {
    color: #fff;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #fff;
    color: #000;
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: #fff;
}

.badge {
    background-color: #ffcc00;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 5px;
}

/* Hero */
.hero {
    padding: 150px 0 80px;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 70%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtext {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 40px;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
}

.view-all {
    color: var(--accent-color);
    font-weight: 500;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Cards */
.card {
    background-color: var(--secondary-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

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

.card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background-color: #333;
}

.badge-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff0055;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content p {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.card-footer .author {
    color: #fff;
}

/* Categories */
.category-list {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.cat-btn {
    background-color: var(--secondary-bg);
    color: #ccc;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.cat-btn:hover,
.cat-btn.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.tag {
    background-color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    color: #ccc;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
    color: #666;
}

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

/* Auth pages */
.auth-main {
    padding-top: 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-main .container {
    display: flex;
    justify-content: center;
}

.auth-card {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    max-width: 520px; /* 加宽登录/注册卡片 */
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
    .auth-card {
        max-width: 100%; /* 小屏保持自适应 */
    }
}

.auth-card h1,
.auth-card h2 {
    margin-bottom: 24px;
    font-size: 1.6rem;
}

.auth-card .form-group {
    margin-bottom: 16px;
}

.auth-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #ccc;
}

.auth-card input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #111;
    color: #fff;
    font-size: 0.95rem;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.auth-card .btn-primary {
    width: 100%;
}

.auth-card .error-msg {
    background-color: #3b0f0f;
    border: 1px solid #aa0000;
    color: #fee;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.auth-card .links {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

.auth-card .links a {
    color: var(--accent-color);
}