html {
    scroll-behavior: smooth;
}

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.15);
}

body * {
    -webkit-text-stroke: 0.5px rgba(50, 50, 50, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

body {
    font-family: 'HarmonyOS Sans SC', 'InterVariable', 'Apple Color Emoji', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: #ffffff;
    font-weight: 600;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Background Wallpaper */
.bg-wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 130%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    will-change: transform;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(1px);
    z-index: -1;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header.scrolled .nav {
    height: 52px;
}

.header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), transparent);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    transition: height 0.3s ease;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
    -webkit-text-stroke: 0.5px rgba(50, 50, 50, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.logo span {
    color: #ffffff;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    height: 38px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    padding: 0 10px;
    width: 160px;
    font-size: 13px;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.5;
}

/* Main Content */
.main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    padding: 24px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    margin-top: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Sidebar */
.sidebar .widget {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}

.sidebar h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.author-card {
    text-align: center;
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 16px;
    object-fit: cover;
    border: 2px solid var(--border);
}

.author-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.author-card p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.categories {
    list-style: none;
}

.categories li {
    margin-bottom: 2px;
}

.categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.categories a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.categories span {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-item:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: #ffffff;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 40px;
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .search-box {
        display: none;
    }
}

/* Quote Card */
.quote-card {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 16px;
    overflow: hidden;
}

.quote-mark {
    position: absolute;
    top: -10px;
    left: 16px;
    font-size: 80px;
    color: var(--accent);
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-text {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.7;
    letter-spacing: 0.2px;
    padding-left: 24px;
    transition: opacity 0.3s ease;
    -webkit-text-stroke: 0.5px rgba(50, 50, 50, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.quote-refresh {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-glass);
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
}

.quote-refresh:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    transform: rotate(90deg);
}

/* Splash Loading Screen */
.splash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, #1a1a24 0%, var(--bg-primary) 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.splash-logo {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    animation: pulse 1.5s ease-in-out infinite;
    -webkit-text-stroke: 0.5px rgba(50, 50, 50, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.splash-logo span {
    color: #ffffff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.splash-bar {
    width: 180px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.splash-bar-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #6366f1);
    transition: width 1.5s ease;
}

.splash-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.splash-quote {
    max-width: 320px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
    min-height: 44px;
    -webkit-text-stroke: 0.5px rgba(50, 50, 50, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #6366f1);
    box-shadow: 0 0 10px var(--accent-glow);
    z-index: 300;
    transition: width 0.1s linear;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    transition: all 0.3s ease;
    z-index: 200;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
}

/* Fade In */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
