* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.2);
    --glass: rgba(30, 41, 59, 0.7);
    --glass-strong: rgba(15, 23, 42, 0.9);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --gradient-bg: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--gradient-bg);
    min-height: 100vh;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    transition: all 0.3s ease;
}

.header:hover {
    border-bottom-color: rgba(99, 102, 241, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: '✨';
    font-size: 1.4rem;
    -webkit-text-fill-color: #8b5cf6;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav a:hover {
    color: var(--text-primary);
}

.nav a:hover::after {
    width: 100%;
}

.lang-switch {
    position: relative;
}

.lang-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--glass-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    min-width: 160px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 14px 20px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

.lang-dropdown a:last-child {
    border-bottom: none;
}

.lang-dropdown a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding-left: 28px;
}

.main {
    padding: 60px 0 100px;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 60px;
}

.search-input {
    width: 100%;
    padding: 18px 28px;
    font-size: 1.05rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.post-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}

.post-card:hover::before {
    opacity: 0.05;
}

.post-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-light);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-summary {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.02rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.article-header {
    margin-bottom: 48px;
    text-align: center;
}

.article-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 28px;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin: 40px 0 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.article-content h1 {
    font-size: 2.2rem;
}

.article-content h2 {
    font-size: 1.8rem;
}

.article-content h3 {
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content code {
    background: rgba(99, 102, 241, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: "SF Mono", "Fira Code", Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #a5b4fc;
}

.article-content pre {
    background: rgba(15, 23, 42, 0.8);
    padding: 24px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 32px 0;
    border: 1px solid var(--border);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 24px;
    margin: 32px 0;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(99, 102, 241, 0.05);
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
}

.article-footer {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-posts {
    margin-bottom: 40px;
}

.related-posts h3 {
    font-size: 1.4rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: rgba(15, 23, 42, 0.5);
}

.footer p {
    margin-bottom: 8px;
}

.admin-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .logo {
    color: white;
}

.admin-nav {
    display: flex;
    gap: 28px;
}

.admin-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.admin-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.admin-nav a:hover {
    color: var(--text-primary);
}

.admin-nav a:hover::after {
    width: 100%;
}

.admin-main {
    padding: 48px 0 80px;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    min-height: 300px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

.alert {
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 28px;
    font-weight: 500;
    border: 1px solid;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.login-box {
    max-width: 440px;
    margin: 80px auto;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-card);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading {
    display: none;
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.loading.show {
    display: block;
}

.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav {
        gap: 16px;
    }
    
    .header .container {
        flex-wrap: wrap;
        gap: 16px;
    }
}
