:root {
    --bg: #08090a;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #f7f8f8;
    --text-secondary: #8a8f98;
    --text-tertiary: #62666d;
    --accent-cyan: #5eead4;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;
    --accent-blue: #60a5fa;
    --accent-green: #22c55e;
    --radius: 14px;
    --font-mono: 'JetBrains Mono', monospace;
}
[data-theme="light"] {
    --bg: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.04);
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-tertiary: #888;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
}

.aurora-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}
.aurora-blob:nth-child(1) {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    top: -200px; left: -100px;
}
.aurora-blob:nth-child(2) {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    top: 100px; right: -150px;
    animation-delay: -7s;
}
.aurora-blob:nth-child(3) {
    width: 700px; height: 700px;
    background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
    bottom: -300px; left: 30%;
    opacity: 0.3;
    animation-delay: -14s;
}
[data-theme="light"] .aurora-blob { opacity: 0.2; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -40px) scale(1.1); }
    66% { transform: translate(-40px, 60px) scale(0.95); }
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}
[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(8, 9, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin-bottom: 40px;
    position: sticky;
    top: 24px;
    z-index: 100;
    flex-wrap: wrap;
    gap: 12px;
}
[data-theme="light"] .navbar { background: rgba(255, 255, 255, 0.7); }

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-logo-img {
    max-height: 36px;
    width: auto;
    display: block;
    border-radius: 6px;
}

.logo-dark { display: block !important; }
.logo-light { display: none !important; }
[data-theme="light"] .logo-dark { display: none !important; }
[data-theme="light"] .logo-light { display: block !important; }

.nav-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(94, 234, 212, 0.15);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-weight: 500;
}
.nav-status .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}
.nav-btn.logout { color: #ef4444; }
.nav-btn.logout:hover { border-color: #ef4444; }
.nav-btn.hidden { display: none !important; }

.nav-btn.add-card {
    color: var(--accent-cyan);
    border-color: rgba(94, 234, 212, 0.25);
    background: rgba(94, 234, 212, 0.06);
}
.nav-btn.add-card:hover {
    background: rgba(94, 234, 212, 0.12);
    border-color: rgba(94, 234, 212, 0.4);
    transform: translateY(-1px);
}

.hero {
    text-align: center;
    padding: 40px 20px 60px;
    margin-bottom: 20px;
}
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-family: var(--font-mono);
}
.hero-label .spark { color: var(--accent-cyan); }
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #f7f8f8 0%, #8a8f98 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .hero-title {
    background: linear-gradient(180deg, #1a1a2e 0%, #666 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}
.hero-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}
.hero-meta-item i { color: var(--text-secondary); }
.hero-meta-item strong { color: var(--text-primary); font-weight: 600; }

.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 170px;
    gap: 16px;
    margin-bottom: 60px;
}

.bento-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(16px);
    animation: cardIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.bento-card:nth-child(1) { animation-delay: 0.05s; }
.bento-card:nth-child(2) { animation-delay: 0.1s; }
.bento-card:nth-child(3) { animation-delay: 0.15s; }
.bento-card:nth-child(4) { animation-delay: 0.2s; }
.bento-card:nth-child(5) { animation-delay: 0.25s; }
.bento-card:nth-child(6) { animation-delay: 0.3s; }
.bento-card:nth-child(7) { animation-delay: 0.35s; }
.bento-card:nth-child(8) { animation-delay: 0.4s; }
.bento-card:nth-child(9) { animation-delay: 0.45s; }
.bento-card:nth-child(10) { animation-delay: 0.5s; }
.bento-card:nth-child(11) { animation-delay: 0.55s; }

.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.bento-card:hover::before { opacity: 1; }
.bento-card::after {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.bento-card:hover::after { opacity: 1; }
.bento-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.bento-card.size-1x1 { grid-column: span 1; grid-row: span 1; }
.bento-card.size-2x1 { grid-column: span 2; grid-row: span 1; }
.bento-card.size-2x2 { grid-column: span 2; grid-row: span 2; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.3s;
}
[data-theme="light"] .card-icon { background: rgba(0, 0, 0, 0.03); }
.bento-card:hover .card-icon {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}
.card-icon.cyan { color: var(--accent-cyan); }
.card-icon.purple { color: var(--accent-purple); }
.card-icon.pink { color: var(--accent-pink); }
.card-icon.blue { color: var(--accent-blue); }

.card-external {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.3s;
    transform: translateX(-4px);
}
.bento-card:hover .card-external {
    opacity: 1;
    transform: translateX(0);
    color: var(--text-secondary);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.75rem;
}
.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 500;
}
.card-tag.live {
    color: var(--accent-cyan);
    border-color: rgba(94, 234, 212, 0.2);
    background: rgba(94, 234, 212, 0.06);
}

.card-lock, .card-edit {
    position: absolute;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
    background: rgba(8, 9, 10, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
}
[data-theme="light"] .card-lock,
[data-theme="light"] .card-edit { background: rgba(255, 255, 255, 0.9); }
.card-lock { bottom: 12px; right: 16px; }
.card-edit { top: 12px; right: 16px; }
.card-lock:hover, .card-edit:hover {
    opacity: 1;
    color: var(--accent-cyan);
    border-color: var(--border-hover);
    transform: scale(1.05);
}
.card-lock.locked { color: #ef4444; opacity: 0.8; }
.card-lock.unlocked { color: var(--accent-green); opacity: 0.8; }
.card-lock.disabled, .card-edit.disabled { display: none; }

.drag-handle {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    opacity: 0;
    transition: all 0.3s;
    z-index: 5;
    cursor: grab;
    user-select: none;
    padding: 6px 8px;
}
.bento.draggable .bento-card .drag-handle { opacity: 0.4; }
.bento.draggable .bento-card:hover .drag-handle {
    opacity: 0.8;
    color: var(--accent-cyan);
}
.drag-handle:active { cursor: grabbing; }
.bento .sortable-ghost { opacity: 0.4; border-color: var(--accent-cyan); }
.bento .sortable-drag { opacity: 0.9; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }

.blog-content { display: flex; flex-direction: column; height: 100%; }
.blog-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.blog-header .card-icon {
    width: 44px; height: 44px;
    font-size: 1.1rem;
}
.blog-header .card-icon.cyan {
    color: var(--accent-cyan);
    background: rgba(94, 234, 212, 0.06);
    border-color: rgba(94, 234, 212, 0.15);
}
.blog-header .card-icon.purple {
    color: var(--accent-purple);
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.15);
}
.blog-header-text .card-title { font-size: 1.25rem; margin-bottom: 2px; }

.blog-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.blog-list .live-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.blog-list .live-item:last-child { border-bottom: none; }
.blog-list .live-item:hover { color: var(--text-primary); }
.blog-list .live-item::before {
    content: "·";
    color: var(--text-tertiary);
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}
.blog-list .live-item:hover::before { color: var(--accent-cyan); }
.blog-list .live-item span,
.blog-list .live-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    text-align: center;
    padding: 40px 0 20px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
.footer-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.8;
}
.footer-text a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-text a:hover { color: var(--accent-cyan); }
.footer-sep { margin: 0 8px; opacity: 0.4; }

#secretEntry {
    display: inline;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: #0e0e12;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    max-width: 480px;
    width: 100%;
    color: var(--text-primary);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .modal-box { background: #ffffff; }
.modal-box h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    font-weight: 600;
}
.modal-box label {
    display: block;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.modal-box input {
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border 0.2s;
    font-family: inherit;
}
[data-theme="light"] .modal-box input { background: rgba(0, 0, 0, 0.02); }
.modal-box input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.1);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}
.modal-actions button {
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    font-family: inherit;
    font-weight: 500;
}
.modal-actions .btn-primary {
    background: var(--accent-cyan);
    color: #08090a;
    border-color: var(--accent-cyan);
    font-weight: 600;
}
.modal-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(94, 234, 212, 0.25);
}
.modal-actions .btn-secondary:hover { background: var(--bg-card-hover); }
.modal-actions .btn-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.modal-actions .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
}
.modal-actions .btn-danger.hidden { display: none !important; }

.login-error {
    color: #ef4444;
    font-size: 0.82rem;
    margin-top: 10px;
    min-height: 18px;
    text-align: center;
}
.login-captcha-row {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.login-captcha-row.show { display: flex; }
.login-captcha-question {
    flex: 1;
    padding: 10px 14px;
    background: rgba(94, 234, 212, 0.06);
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent-cyan);
    user-select: none;
    text-align: center;
    letter-spacing: 1px;
}
.login-captcha-row input {
    width: 100px !important;
    margin-top: 0 !important;
    text-align: center;
}
.login-lock-tip {
    color: #fbbf24;
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .bento { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .container { padding: 16px; }
    .navbar { padding: 10px 14px; top: 16px; margin-bottom: 24px; }
    .nav-logo-img { max-height: 28px; }
    .hero { padding: 20px 0 40px; }
    .hero-meta { gap: 20px; font-size: 0.8rem; }
    .bento {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
        gap: 12px;
    }
    .bento-card { padding: 18px; border-radius: 12px; }
    .blog-header .card-icon { width: 36px; height: 36px; }
    .blog-header-text .card-title { font-size: 1.05rem; }
    .drag-handle { display: none; }
}
@media (max-width: 480px) {
    .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .bento-card.size-2x2,
    .bento-card.size-2x1 { grid-column: span 1; grid-row: span 1; min-height: 160px; }
    .hero-title { font-size: 2rem; }
    .hero-meta { gap: 12px; font-size: 0.75rem; }
}

/* ==========================================
   DeepSeek 风格：颜色翻转遮罩特效
========================================== */

/* 让文字容器支持定位 */
.hero-title span {
    position: relative;
    display: inline-block;
    cursor: crosshair; /* 鼠标变成十字，更有探索感 */
}

/* 顶层的高亮文字 */
.hero-title span::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* 设定翻转后的颜色：青色到紫色的渐变 */
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* 核心：用一个圆形遮罩，只显示鼠标 `--x` 和 `--y` 所在位置的内容 */
    /* 圆的大小是 80px，可以根据你的字号调大或调小 */
    -webkit-mask-image: radial-gradient(
        circle 80px at var(--x, -999px) var(--y, -999px), 
        black 40%, 
        transparent 100%
    );
    mask-image: radial-gradient(
        circle 80px at var(--x, -999px) var(--y, -999px), 
        black 40%, 
        transparent 100%
    );
    
    pointer-events: none; /* 让鼠标事件穿透到下方的真实文字上 */
    z-index: 10;
}

/* 确保在浅色模式下，高亮颜色也好看（这里用蓝紫色） */
[data-theme="light"] .hero-title span::before {
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
}

/* 去掉我们上一版加的发光阴影 */
.hero-title span:hover {
    text-shadow: none; 
}