/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #1a1a2e;
    min-height: 100vh;
    color: #2d3436;
    line-height: 1.6;
}

/* ========== 导航栏 ========== */
header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 2rem;
}
nav {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
nav .logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3436;
    text-decoration: none;
    letter-spacing: -0.5px;
}
nav .logo span { color: #6c5ce7; }
nav .nav-links { display: flex; gap: 3rem; }
nav .nav-links a {
    text-decoration: none;
    color: #636e72;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.3rem 0;
    position: relative;
}
nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6c5ce7;
    transition: width 0.2s;
}
nav .nav-links a:hover { color: #2d3436; }
nav .nav-links a:hover::after { width: 100%; }
nav .nav-links a.active { color: #6c5ce7; }
nav .nav-links a.active::after { width: 100%; }

/* ========== 主体 ========== */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 120px);
}

/* ========== Hero 区域 ========== */
.hero {
    text-align: center;
    padding: 5rem 1rem 3rem;
}
.hero .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 30px rgba(108,92,231,0.3);
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2d3436, #636e72);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.15rem;
    color: #636e72;
    max-width: 500px;
    margin: 0 auto 2rem;
}
.hero .cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.hero .btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s;
}
.hero .btn-primary {
    background: #6c5ce7;
    color: white;
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}
.hero .btn-secondary {
    background: white;
    color: #2d3436;
    border: 1px solid #e0e0e0;
}
.hero .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* ========== 最近文章 ========== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-grid {
    display: grid;
    gap: 1.2rem;
}
.post-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.25s;
    cursor: pointer;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: #6c5ce7;
}
.post-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}
.post-card h3 a {
    color: #2d3436;
    text-decoration: none;
}
.post-card h3 a:hover { color: #6c5ce7; }
.post-card .meta {
    font-size: 0.85rem;
    color: #b2bec3;
    margin-bottom: 0.6rem;
}
.post-card .summary {
    color: #636e72;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========== 文章详情 ========== */
.post-detail {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}
.post-detail h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}
.post-detail .meta {
    color: #b2bec3;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}
.post-detail .content {
    line-height: 1.9;
    color: #2d3436;
}
.post-detail .content h2 { font-size: 1.5rem; margin: 2rem 0 0.8rem; }
.post-detail .content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.6rem; }
.post-detail .content p { margin-bottom: 1rem; }
.post-detail .content code {
    background: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e17055;
}
.post-detail .content pre {
    background: #2d3436;
    color: #dfe6e9;
    padding: 1.2rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.2rem 0;
    font-size: 0.9rem;
}
.post-detail .content pre code { background: none; color: inherit; padding: 0; }
.post-detail .content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.post-detail .content ul, .post-detail .content ol { margin: 0.5rem 0 1rem 1.5rem; }
.post-detail .content blockquote {
    border-left: 4px solid #6c5ce7;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    color: #636e72;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* ========== 关于页 ========== */
.about-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    text-align: center;
    max-width: 600px;
    margin: 2rem auto;
}
.about-card .big-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}
.about-card h2 { margin-bottom: 0.5rem; }
.about-card p { color: #636e72; margin-bottom: 0.8rem; }

/* ========== 管理后台 ========== */
.login-box {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
}
.login-box h2 { margin-bottom: 1.5rem; }
.login-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.login-box input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.login-box .btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: #6c5ce7;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.login-box .btn:hover { background: #5a4bd1; }
.login-box .error {
    color: #e17055;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 管理面板 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.admin-header .btn {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.admin-header .btn-primary {
    background: #6c5ce7;
    color: white;
}
.admin-header .btn-outline {
    border: 1px solid #e0e0e0;
    color: #636e72;
}
.admin-header .btn-outline:hover { border-color: #e17055; color: #e17055; }

.admin-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}
.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #2d3436;
}
.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    margin-bottom: 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.admin-form input:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.admin-form textarea {
    min-height: 350px;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
}
.admin-form .btn {
    padding: 0.7rem 2rem;
    border: none;
    border-radius: 8px;
    background: #6c5ce7;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-form .btn:hover { background: #5a4bd1; }
.admin-form .msg {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.admin-form .msg.success { background: #d4edda; color: #155724; }
.admin-form .msg.error { background: #f8d7da; color: #721c24; }

/* 后台文章列表 */
.admin-table {
    background: white;
    border-radius: 16px;
    
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}
.admin-table table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 0.8rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #636e72;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table td { font-size: 0.95rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions a {
    color: #6c5ce7;
    text-decoration: none;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}
.admin-table .actions a:hover { text-decoration: underline; }
.admin-table .actions .delete { color: #e17055; }

/* ========== 页脚 ========== */
footer {
    text-align: center;
    padding: 2rem;
    color: #b2bec3;
    font-size: 0.85rem;
}

/* ========== 消息提示 ========== */
.msg-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 999;
    animation: slideIn 0.3s ease;
}
.msg-toast.success { background: #00b894; }
.msg-toast.error { background: #e17055; }
@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #b2bec3;
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 1.1rem; }

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 900px;
    margin: 0 auto; padding: 0 1rem; gap: 1rem; }
    nav .logo { font-size: 1.1rem; }
    nav .nav-links { gap: 3rem; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 3rem 1rem 2rem; }
    .post-detail { padding: 1.5rem; }
    .post-detail h1 { font-size: 1.5rem; }
    main { padding: 1rem; }
}

/* ========== MiSans 字体 ========== */
@font-face {
    font-family: 'MiSans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../font/MiSans-Regular.subset.woff2') format('woff2');
}
@font-face {
    font-family: 'Pacifico-Regular';
    src: url('../font/Pacifico-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'UnidreamLED';
    src: url('../font/UnidreamLED.ttf') format('truetype');
    font-display: swap;
}

.bg-wrap { display: none; }


/* ========== 手机端修复 ========== */
@media (max-width: 600px) {
    .post-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .post-card { padding: 1rem; }
    .post-card h3 { font-size: 1rem; }
    .post-card .summary { font-size: 0.85rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 2rem 0.5rem; }
    main { padding: 0.8rem; overflow-x: hidden; }
    .glass header { padding: 0 0.8rem; }
    nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 900px;
    margin: 0 auto; gap: 0.8rem; }
    nav .nav-links { gap: 2.2rem; }
    nav .nav-links a { font-size: 0.85rem; }
    .about-card { padding: 1.5rem; }
    .post-detail { padding: 1rem; }
    .post-detail h1 { font-size: 1.3rem; }
    .post-detail .content { font-size: 0.9rem; }
    .admin-form { padding: 1rem; }
    .admin-form input, .admin-form textarea { font-size: 0.9rem; }
    .admin-table table { font-size: 0.85rem; }
    .admin-table th, .admin-table td { padding: 0.5rem 0.6rem; }
    .editor-toolbar button { font-size: 0.8rem; padding: 3px 7px; }
    .editor-wrap { flex-direction: column; }
    .preview-pane { min-height: 200px; }
    .login-box { margin: 2rem 0.5rem; padding: 1.5rem; }
    .social a { font-size: 1.2rem !important; }
}

/* ========== 手机端管理后台修复 ========== */
@media (max-width: 600px) {
    .admin-header { flex-direction: column; gap: 0.8rem; align-items: flex-start; }
    .admin-header div { display: flex; flex-wrap: wrap; gap: 0.4rem; }
    .admin-header .btn { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
    .admin-table { overflow-x: auto; }
    .admin-table table { min-width: 360px; }
    .admin-table th, .admin-table td { font-size: 0.8rem; padding: 0.4rem 0.5rem; white-space: nowrap; }
    .admin-form input, .admin-form textarea { font-size: 0.85rem; }
    .admin-form textarea { min-height: 200px; }
    .admin-form .btn { width: 100%; padding: 0.6rem; }
    .editor-wrap { flex-direction: column; }
    .editor-pane textarea { min-height: 200px; }
    .preview-pane { min-height: 150px; font-size: 0.85rem; }
    .editor-toolbar { padding: 4px; gap: 2px; }
    .editor-toolbar button { font-size: 0.75rem; padding: 3px 6px; }
    .tab-bar button { font-size: 0.8rem; padding: 4px 10px; }
    .msg { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
    .empty-state { padding: 2rem 0.5rem; }
    .empty-state .icon { font-size: 2rem; }
    .post-detail { padding: 1rem; }
    .post-detail h1 { font-size: 1.2rem; }
    .post-detail .content { font-size: 0.85rem; }
    .post-detail .content pre { font-size: 0.75rem; padding: 0.8rem; }
    .back-link { font-size: 0.85rem; }
    .site-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .site-card { padding: 1rem; }
    .site-card h3 { font-size: 0.9rem; }
    .site-card p { font-size: 0.8rem; }
    .login-box { margin: 2rem 0.5rem; padding: 1.5rem; }
    .login-box h2 { font-size: 1.1rem; }
    .login-box input { font-size: 0.9rem; padding: 0.6rem; }
    .login-box .btn { width: 100%; }
    .section-title { font-size: 1.2rem; }
    .about-card { padding: 1.5rem; }
    .about-card h2 { font-size: 1.3rem; }
    .about-card p { font-size: 0.85rem; }
    .social a { font-size: 1.2rem !important; }
    /* 后台小站管理页 */
    .admin-sites-wrap { flex-direction: column; }
    .admin-sites-wrap > div { width: 100% !important; }
}

/* ========== 手机端按钮修复 ========== */
@media (max-width: 600px) {
    .admin-header div { display: flex; flex-wrap: wrap; gap: 0.3rem; width: 100%; }
    .admin-header .btn, .admin-header .btn-outline, 
    .admin-header .btn-primary { 
        display: inline-block; 
        font-size: 0.78rem; 
        padding: 0.4rem 0.7rem; 
        margin: 0 !important;
        white-space: nowrap;
    }
    .admin-header .btn-outline {
        background: rgba(255,255,255,0.2) !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
        color: #fff !important;
        opacity: 1 !important;
    }
}

/* ========== 修复按钮重叠 + 文字白色 + 头像放大 ========== */
@media (max-width: 600px) {
    .admin-header { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .admin-header h2 { font-size: 1rem; margin-bottom: 0; }
    .admin-header div { display: flex; flex-wrap: wrap; gap: 0.3rem; }
    .admin-header .btn,
    .admin-header .btn-primary,
    .admin-header .btn-outline {
        display: inline-block;
        font-size: 0.75rem !important;
        padding: 0.35rem 0.6rem !important;
        margin: 0 !important;
        white-space: nowrap;
        box-sizing: border-box;
    }
}

/* 所有页面标题白色（小站管理、后台管理等） */
h2, .admin-header h2, h3, .section-title {
    color: #fff !important;
}

/* 左上角头像放大 */
.glass nav .logo img {
    width: 32px !important;
    height: 32px !important;
}

/* 后台按钮不透明 */
.admin-header .btn-outline,
.btn-outline {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    color: #fff !important;
    opacity: 1 !important;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.25) !important;
}

/* ========== 毛玻璃效果 ========== */
.glass {
    background: transparent;
}
.glass h1, .glass h2, .glass h3, .glass p, .glass .meta,
.glass a, .glass span, .glass .section-title {
    color: #fff !important;
}
.glass .post-card {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.25);
}
.glass .post-card h3 a { color: #fff; }
.glass .post-card .meta { color: rgba(255,255,255,0.6); }
.glass .post-card .summary { color: rgba(255,255,255,0.8); }
.glass .post-detail {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}
.glass .post-detail .meta { color: rgba(255,255,255,0.6); }
.glass .post-detail .content { color: #fff; }
.glass .post-detail .content code { background: rgba(255,255,255,0.15); color: #fff; }
.glass .post-detail .content blockquote { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
.glass .admin-form {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.25);
}
.glass .admin-form label { color: #fff; }
.glass .admin-form input, .glass .admin-form textarea {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.glass .admin-form input:focus, .glass .admin-form textarea:focus {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}
.glass .admin-table {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.25);
}
.glass .admin-table th { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
.glass .admin-table td { color: #fff; border-color: rgba(255,255,255,0.2); }
.glass .login-box {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.25);
}
.glass .login-box h2 { color: #fff; }
.glass .login-box input {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.glass .login-box .error { color: #ff6b6b; }
.glass .about-card {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}
.glass .about-card p { color: rgba(255,255,255,0.8); }
.glass header { background: rgba(0,0,0,0.3) !important; backdrop-filter: blur(20px) !important; border-color: rgba(255,255,255,0.2) !important; }
.glass nav a { color: rgba(255,255,255,0.8) !important; }
.glass nav a:hover, .glass nav a.active { color: #fff !important; }
.glass nav .logo img { width: 32px !important; height: 32px !important; border-radius: 50%; }
.glass footer { color: rgba(255,255,255,0.4) !important; }
.glass .editor-toolbar { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.15); }
.glass .editor-toolbar button { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.15); color: #fff; }
.glass .editor-toolbar button:hover { background: rgba(255,255,255,0.2); }
.glass .tab-bar button { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.glass .tab-bar button.active { background: rgba(255,255,255,0.15); color: #fff; border-bottom-color: transparent; }
.glass .btn-secondary { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); color: #fff; }
.glass .btn-primary { background: rgba(108,92,231,0.8); }
.glass .btn-primary:hover { background: rgba(108,92,231,1); }
.glass .post-detail .content a { color: #a29bfe; }
.glass .back-link { color: #a29bfe; }
.glass .empty-state { color: rgba(255,255,255,0.6) !important; }
.glass .empty-state .icon { color: rgba(255,255,255,0.4); }
.glass .msg.success { background: rgba(0,184,148,0.3); color: #fff; }
.glass .msg.error { background: rgba(225,112,85,0.3); color: #fff; }
.glass .site-card { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.15); }
.glass .site-card:hover { background: rgba(255,255,255,0.15); }
.glass .site-card h3 { color: #fff; }
.glass .site-card p { color: rgba(255,255,255,0.7); }
.glass .admin-sites-wrap > div { min-width: 280px; }


/* ============================================

/* ============================================
   Dashboard Widgets — 完全本地化样式
   ============================================ */

/* ---------- 仪表盘网格 ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

/* 右侧列高度与左侧名片对齐 */
.dash-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.6rem 0;
}

/* ---------- 左侧：个人资料卡片 ---------- */
.profile-card {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 18px;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    color: #fff;
    transition: all 0.3s ease;
}
.profile-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.avatar-wrap {
    margin-bottom: 1rem;
}
.avatar-wrap img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}
.avatar-wrap img:hover {
    transform: scale(1.05);
}

.dash-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    font-family: "Pacifico-Regular", cursive, sans-serif;
    color: #fff;
}
.dash-bio {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

/* ---------- 一言 ---------- */
.hitokoto-box {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.8);
    padding: 0.9rem 0.3rem;
    margin-bottom: 1.2rem;

    cursor: pointer;
    line-height: 1.6;
    transition: background 0.3s;
    border-radius: 4px;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.hitokoto-box:hover {
    background: rgba(255,255,255,0.05);
}
.hitokoto-box .fa-quote-left,
.hitokoto-box .fa-quote-right {
    opacity: 0.4;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ---------- 社交图标 ---------- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}
.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.75);
    font-size: 1.15rem;
    transition: all 0.3s ease;
    text-decoration: none;
}
.social-icon:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ---------- 右侧 Widget 通用卡片 ---------- */
.widget-card {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 1.3rem 1.5rem;
    color: #fff;
    transition: all 0.3s ease;
}
.widget-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ---------- 行布局 ---------- */
.dash-row {
    display: flex;
    gap: 1.2rem;
    flex: 1;
    align-items: flex-start;
}
.dash-row > * {
    flex: 1;
    min-width: 0;
}

/* ---------- 时钟卡片 ---------- */
.time-card {
    cursor: pointer;
}
.timeshow {
    line-height: 1.5;
    font-family: "MiSans", -apple-system, sans-serif;
}
.timeshow .weekday {
    font-size: 0.9rem;
    opacity: 0.6;
    font-weight: 400;
}
.timeshow .time-text {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: "UnidreamLED", "Courier New", monospace;
    display: block;
    margin-top: 2px;
}
.weather {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.weather span {
    white-space: nowrap;
}
#city_text {
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

/* ---------- 链接按钮网格 ---------- */
.dash-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    flex: 1;
}
.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.5rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.link-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.2);
}
.link-btn i {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ---------- 时间胶囊 ---------- */
.capsule-section {
    margin-bottom: 2.5rem;
}
.capsule-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.capsule-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
}
.capsule-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 0.7rem 1.1rem 0.9rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    transition: all 0.3s;
}
.capsule-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.capsule-label {
    display: block;
    font-size: 0.78rem;
    opacity: 0.6;
    margin-bottom: 0.3rem;
}
.capsule-item .capsule-num {
    font-weight: 700;
    font-size: 1.1rem;
    color: #a29bfe;
}
.capsule-bar {
    height: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    margin-top: 0.4rem;
    
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.capsule-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    min-width: 0;
    box-shadow: 0 0 10px rgba(108,92,231,0.3);
}
.capsule-fill::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    right: 6px;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
}


/* ---------- 音乐播放器弹窗 ---------- */







    
    #music-name {
        max-width: 60px !important;
        font-size: 0.7rem !important;
    }
    
}
}
    .dash-left .widget-card {
        padding: 1.2rem 1rem;
    }
    .capsule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .link-btn {
        padding: 0.5rem 0.4rem;
        font-size: 0.78rem;
    }
    .timeshow .time-text {
        font-size: 1.5rem;
    }
    .dash-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .capsule-grid {
        grid-template-columns: 1fr;
    }
    .dash-links {
        grid-template-columns: repeat(2, 1fr);
    }
    .link-btn {
        font-size: 0.72rem;
        padding: 0.4rem;
    }
    .dash-name {
        font-size: 1.3rem;
    }
    
}




    to { transform: rotate(360deg); }
}






    
    #music-name {
        max-width: 55px !important;
        font-size: 0.68rem !important;
    }
}

    to { transform: rotate(360deg); }
}






    
    #music-name {
        max-width: 60px !important;
        font-size: 0.7rem !important;
    }
    
}

    to { transform: rotate(360deg); }
}





@media (max-width: 768px) {
    
    
    #music-name {
        max-width: 60px !important;
        font-size: 0.7rem !important;
    }
    
}

/* ---------- 背景容器 ---------- */
.bg-all {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.bg-all img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    filter: blur(10px);
    transition: transform 1.5s ease, filter 1.5s ease;
}
.bg-all .cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 1.5s ease;
}


/* ========== 手机端响应式 ========== */

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
    .main { padding: 0.5rem !important; }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem;
        margin: 0.3rem 0;
    }
    .dash-row { flex-direction: column !important; gap: 0.6rem; }
    .dash-row > * { width: 100% !important; }
    .dash-links { grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
    .link-btn { padding: 0.3rem 0.2rem; font-size: 0.7rem; }
    .capsule-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .capsule-section { margin-bottom: 1rem; }
    .timeshow .time-text { font-size: 1.3rem; }
    .profile-card { padding: 0.8rem !important; }
}
@media (max-width: 420px) {
    .capsule-grid { grid-template-columns: 1fr; }
    .dash-links { grid-template-columns: repeat(2, 1fr); }
}

/* 弹窗显示在导航栏下方 */
.iziToast-wrapper, .iziToast-container { top: 70px !important; }
