/* CSS Variables - Matching original site color scheme */
:root {
    --primary: #6d28d9;
    --primary-light: #7c3aed;
    --primary-dark: #5b21b6;
    --primary-foreground: #ffffff;
    --secondary: #f59e0b;
    --secondary-foreground: #1a1a1a;
    --accent: #8b5cf6;
    --accent-foreground: #ffffff;
    --background: #f8fafc;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --border: #e2e8f0;
    --radius: 0.75rem;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

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

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--primary);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-foreground);
    font-size: 1.25rem;
    font-weight: 700;
}

.site-logo svg {
    width: 1.5rem;
    height: 1.5rem;
}

.site-logo:hover {
    color: var(--primary-foreground);
    opacity: 0.9;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    color: var(--primary-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.15);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form input {
    width: 16rem;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    color: var(--primary-foreground);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-form input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}

.search-form .search-icon {
    position: absolute;
    left: 0.75rem;
    color: rgba(255,255,255,0.5);
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.5;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.btn-secondary:hover {
    background: #d97706;
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background: var(--muted);
}

.btn-ghost {
    background: transparent;
    color: inherit;
}

.btn-ghost:hover {
    background: rgba(0,0,0,0.05);
}

.btn-login {
    background: var(--secondary);
    color: var(--secondary-foreground);
    font-weight: 600;
}

.btn-login:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}

/* User dropdown */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.user-avatar:hover {
    border-color: rgba(255,255,255,0.5);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 14rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
    overflow: hidden;
}

.user-menu:hover .user-dropdown,
.user-dropdown:hover {
    display: block;
}

.user-dropdown-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.user-dropdown-header .name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-dropdown-header .role {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.user-dropdown a:hover {
    background: var(--muted);
}

.user-dropdown .divider {
    border-top: 1px solid var(--border);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-foreground);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 4rem;
    right: 0;
    width: 16rem;
    height: calc(100vh - 4rem);
    background: var(--card);
    border-left: 1px solid var(--border);
    z-index: 50;
    padding: 2rem 1rem;
    box-shadow: var(--shadow-lg);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
    border-radius: var(--radius);
}

.mobile-nav a:hover {
    background: var(--muted);
    color: var(--primary);
}

/* ===== CAROUSEL / BANNER ===== */
.hero-section {
    margin-bottom: 3rem;
    background: linear-gradient(to bottom, rgba(109,40,217,0.05), transparent);
}

.carousel-wrapper {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
}

.carousel-slide .slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
}

.carousel-slide .slide-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.carousel-slide .slide-content p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
}

.carousel-btn.prev {
    left: 1.5rem;
}

.carousel-btn.next {
    right: 1.5rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dots .dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dots .dot.active {
    background: white;
    width: 1.5rem;
    border-radius: 0.25rem;
}

/* ===== CATEGORY CARDS ===== */
.category-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(109,40,217,0.5);
    transform: translateY(-2px);
}

.category-card .icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ===== MAIN LAYOUT ===== */
.main-content {
    flex: 1;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding-bottom: 3rem;
}

.content-main {
    min-width: 0;
}

.content-sidebar {
    min-width: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.section-title .line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary), transparent);
    border-radius: 1rem;
}

/* ===== ARTICLE LIST (Home - horizontal cards) ===== */
.article-list-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.article-list-item:hover {
    background: var(--card);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.article-list-item .thumb {
    flex-shrink: 0;
    width: 12rem;
    height: 8rem;
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;
    background: var(--muted);
}

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

.article-list-item:hover .thumb img {
    transform: scale(1.05);
}

.article-list-item .info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-list-item .info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-list-item .info h3 a:hover {
    color: var(--primary);
}

.article-list-item .excerpt {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== ARTICLE GRID (Category/Tag/Search - 3 column cards) ===== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.article-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.article-card .card-image {
    width: 100%;
    height: 12rem;
    overflow: hidden;
    background: var(--muted);
}

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

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

.article-card .card-body {
    padding: 1rem;
}

.article-card .card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.article-card .card-body h3 a:hover {
    color: var(--primary);
}

.article-card .card-excerpt {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

/* ===== SIDEBAR ===== */
.sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: box-shadow 0.3s;
    margin-bottom: 1.5rem;
}

.sidebar-card:hover {
    box-shadow: var(--shadow-lg);
}

.sidebar-card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card-header h3 svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

.sidebar-card-body {
    padding: 1rem;
}

/* Hot articles list */
.hot-article-item {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    transition: all 0.2s;
}

.hot-article-item:hover .hot-article-title {
    color: var(--primary);
}

.hot-article-rank {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(109,40,217,0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.hot-article-item:hover .hot-article-rank {
    background: var(--primary);
    color: white;
}

.hot-article-title {
    font-size: 0.875rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.hot-article-views {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* Tags cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--foreground);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.tag-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Psychological test card */
.test-card .test-question {
    margin-bottom: 1rem;
}

.test-card .test-question p {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.test-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.test-option {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: transparent;
}

.test-option:hover,
.test-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.test-result {
    text-align: center;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
}

.test-result .score {
    font-size: 2rem;
    font-weight: 700;
}

.test-result .level {
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ===== ARTICLE DETAIL ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

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

.breadcrumb .separator {
    color: var(--border);
}

.article-detail {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.article-detail .article-header {
    margin-bottom: 2rem;
}

.article-detail .article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-detail .article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--foreground);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 700;
    margin: 1.5em 0 0.75em;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.article-content h3 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content img {
    border-radius: var(--radius);
    margin: 1rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: var(--muted);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.25rem;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    text-align: left;
}

.article-content th {
    background: var(--muted);
    font-weight: 600;
}

.article-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.article-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
    overflow: hidden;
}

.article-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.article-nav .next {
    justify-content: flex-end;
    text-align: right;
}

.article-nav .title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-articles {
    margin-top: 3rem;
}

.related-articles h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ===== LIST PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 3rem 0;
    margin-bottom: 2rem;
    color: white;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.page-header .search-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--foreground);
}

.pagination a:hover {
    background: rgba(109,40,217,0.1);
    color: var(--primary);
    border-color: rgba(109,40,217,0.5);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pagination .page-info {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    border: none;
    min-width: auto;
    padding: 0 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--foreground);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

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

.footer-brand h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
    opacity: 0.8;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.footer-links a {
    display: block;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ===== LOGIN / REGISTER ===== */
.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--background);
}

.auth-container {
    width: 100%;
    max-width: 28rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.auth-header .logo svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

.auth-header p {
    color: var(--muted-foreground);
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.auth-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-card .subtitle {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--muted);
    border-radius: var(--radius);
    padding: 0.25rem;
}

.auth-tabs a {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: calc(var(--radius) - 2px);
    color: var(--muted-foreground);
    transition: all 0.2s;
}

.auth-tabs a.active {
    background: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
    color: var(--foreground);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(109,40,217,0.1);
}

.form-textarea {
    min-height: 8rem;
    resize: vertical;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== 404 PAGE ===== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted);
}

.error-page .error-content {
    text-align: center;
}

.error-page h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.error-page p {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

/* ===== BADGE / TAG ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--foreground);
    background: var(--background);
}

.badge-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.badge-muted {
    background: var(--muted);
    color: var(--muted-foreground);
    border-color: transparent;
}

/* ===== ALERT ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .search-form {
        display: none;
    }

    .header-inner {
        padding: 0 0.5rem;
    }

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

    .content-sidebar {
        order: 2;
    }

    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .article-list-item {
        flex-direction: column;
    }

    .article-list-item .thumb {
        width: 100%;
        height: 12rem;
    }

    .carousel-slide {
        height: 300px;
    }

    .carousel-slide .slide-content {
        padding: 1.5rem;
    }

    .carousel-slide .slide-content h2 {
        font-size: 1.25rem;
    }

    .carousel-slide .slide-content p {
        font-size: 0.875rem;
    }

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

    .article-detail {
        padding: 1rem;
    }

    .article-detail .article-title {
        font-size: 1.5rem;
    }

    .article-nav {
        grid-template-columns: 1fr;
    }

    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .category-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .category-card {
        padding: 1rem;
    }

    .category-card .icon {
        width: 2rem;
        height: 2rem;
    }

    .category-card h3 {
        font-size: 0.875rem;
    }
}

/* ===== ADMIN STYLES ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 16rem;
    background: var(--foreground);
    color: white;
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 40;
}

.admin-sidebar .sidebar-logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar nav a svg {
    width: 1.25rem;
    height: 1.25rem;
}

.admin-main {
    flex: 1;
    margin-left: 16rem;
    padding: 2rem;
    background: var(--background);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Admin cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.stat-card .label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th {
    background: var(--muted);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--muted);
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.hidden { display: none; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
