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

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-hover: #f0f4ff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #6366f1;
    --accent: #0891b2;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 8px 30px rgba(79, 70, 229, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

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

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

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

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

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link-primary {
    padding: 6px 14px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
}

.nav-link-primary:hover {
    background: var(--primary-hover);
    color: #fff !important;
}

.nav-user {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Main */
.site-main {
    flex: 1;
}

/* Carousel */
.carousel-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.carousel {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0.15) 100%);
}

.carousel-content {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    max-width: 560px;
    padding-left: 20px;
}

.carousel-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text);
}

.carousel-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.carousel-btn {
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.carousel-arrow:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(100, 116, 139, 0.35);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--primary);
    transform: scale(1.15);
}

/* Search */
.search-section {
    padding: 28px 0 8px;
}

.search-form {
    max-width: 640px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-clear {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

.search-clear:hover {
    color: var(--primary);
}

.search-result-tip {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Filter */
.filter-section {
    padding: 20px 0 32px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface-hover);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Resource grid */
.resource-section {
    padding-bottom: 64px;
}

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

.resource-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #c7d2fe;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
}

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

.resource-card:hover .card-cover img {
    transform: scale(1.05);
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: #f1f5f9;
}

.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.category-badge.large {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.4;
}

.card-title a {
    color: var(--text);
    text-decoration: none;
}

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

.card-intro {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-outline {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface-hover);
}

.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Detail page */
.detail-section {
    padding: 40px 0 64px;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 28px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.detail-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--text);
}

.detail-date,
.detail-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

/* Gallery */
.album-gallery {
    margin: 32px 0;
}

.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8fafc;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.thumb-btn {
    width: 100px;
    height: 64px;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--surface);
    opacity: 0.75;
    transition: all 0.2s;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-btn:hover,
.thumb-btn.active {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.detail-content {
    margin: 32px 0;
}

.detail-content h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.detail-intro {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.download-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    margin-top: 32px;
}

.download-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.download-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Detail recommend resources */
.detail-recommend {
    margin-top: 40px;
}

.detail-recommend-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text);
}

.detail-recommend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.detail-recommend-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.detail-recommend-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #c7d2fe;
}

.detail-recommend-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
}

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

.detail-recommend-card:hover .detail-recommend-cover img {
    transform: scale(1.04);
}

.detail-recommend-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-recommend-name {
    font-size: 0.95rem;
    line-height: 1.4;
}

.detail-recommend-name a {
    color: var(--text);
    text-decoration: none;
}

.detail-recommend-name a:hover {
    color: var(--primary);
}

.detail-recommend-intro {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detail ads (WeChat-style feed cards) */
.detail-ads {
    margin-top: 40px;
}

.detail-ads-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.detail-ad-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.detail-ad-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #c7d2fe;
}

.detail-ad-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
}

.detail-ad-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-ad-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-ad-title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* User layout */
.user-layout-section {
    padding: 32px 0 64px;
}

.user-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

.user-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
}

.sidebar-user {
    text-align: center;
    padding: 0 16px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.sidebar-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.sidebar-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.sidebar-link.active {
    background: #eef2ff;
    color: var(--primary);
    font-weight: 500;
}

.sidebar-footer {
    margin-top: 16px;
    padding: 12px 16px 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link-muted {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar-link-muted:hover {
    color: var(--primary);
}

.user-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.user-panel h1,
.user-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.panel-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.panel-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.panel-header-row h1 {
    margin-bottom: 8px;
}

.panel-header-row .panel-desc {
    margin-bottom: 0;
}

.empty-inline p {
    margin-bottom: 16px;
}

.readonly-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
}

.auth-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
    width: 100%;
}

.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    background: var(--surface);
    width: 100%;
}

.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.readonly-field .readonly-value {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.my-resource-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-resource-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-wrap: wrap;
}

.my-resource-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.inline-form {
    display: inline;
    margin: 0;
}

.my-resource-cover {
    width: 72px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.my-resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-resource-info {
    flex: 1;
    min-width: 0;
}

.my-resource-info h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-resource-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.existing-album {
    margin-bottom: 12px;
}

.existing-album-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.existing-album-item {
    position: relative;
    width: 88px;
}

.existing-album-item img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}

.album-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.album-remove:hover {
    background: #dc2626;
}

.upload-count {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.empty-inline {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.field-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sub-label {
    display: block;
    margin: 16px 0 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.album-upload {
    margin-bottom: 4px;
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 20px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--surface-hover);
}

.upload-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 40px;
    font-weight: 300;
}

.upload-text {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-input {
    display: none;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.preview-item {
    width: 88px;
    text-align: center;
}

.preview-item img {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}

.preview-name {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Auth */
.auth-section,
.user-section {
    padding: 48px 0 80px;
}

.auth-card,
.user-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow);
}

.user-card {
    max-width: 520px;
    text-align: center;
}

.auth-card h1,
.user-card h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.auth-desc,
.user-welcome {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-block {
    width: 100%;
    padding: 12px;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

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

/* User center */
.user-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    text-align: left;
    margin: 28px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Pagination */
.pagination {
    margin-top: 36px;
    text-align: center;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel {
        height: 280px;
    }

    .carousel-title {
        font-size: 1.4rem;
    }

    .carousel-subtitle {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .carousel-content {
        max-width: 75%;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .search-box {
        flex-direction: column;
    }

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

    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        gap: 10px;
    }

    .user-actions {
        flex-direction: column;
    }

    .user-layout {
        grid-template-columns: 1fr;
    }

    .user-sidebar {
        position: static;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .my-resource-item {
        flex-wrap: wrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .download-box {
        flex-direction: column;
        text-align: center;
    }

    .detail-recommend-grid {
        grid-template-columns: 1fr;
    }

    .detail-ads-list {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-direction: column;
    }
}
