/* ==================== 基础重置与变量 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c1121f;
    --primary-rgb: 193, 18, 31;
    --secondary-color: #f77f00;
    --secondary-rgb: 247, 127, 0;
    --accent-color: #fcbf49;
    --accent-rgb: 252, 191, 73;
    --bg-dark: #1a0b0b;
    --bg-medium: #2b0f0f;
    --bg-light: #3b1a0f;
    --text-primary: #f3ead7;
    --text-secondary: #d7c6a0;
    --gold: #f5d76e;
    --panel-bg: rgba(26, 11, 11, 0.55);
    --panel-bg-strong: rgba(26, 11, 11, 0.75);
    --border-radius: 15px;
    --sidebar-width: 280px;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'STHeiti', 'SimSun', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-light) 100%);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 星空背景动画 ==================== */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle fill="%23fff" cx="25" cy="25" r="1"/><circle fill="%23fff" cx="75" cy="75" r="0.5"/><circle fill="%23fff" cx="125" cy="45" r="1.2"/><circle fill="%23fff" cx="175" cy="125" r="0.8"/><circle fill="%23fff" cx="50" cy="150" r="1"/><circle fill="%23fff" cx="150" cy="175" r="0.6"/><circle fill="%23fff" cx="100" cy="100" r="1.5"/><circle fill="%23fff" cx="25" cy="175" r="0.7"/><circle fill="%23fff" cx="175" cy="25" r="1.1"/></svg>') repeat;
    background-size: 200px 200px;
    z-index: 0;
    animation: move-stars 100s linear infinite;
}

.twinkling {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><circle fill="%23ffffff88" cx="50" cy="50" r="1"/><circle fill="%23ffffff66" cx="150" cy="100" r="0.8"/><circle fill="%23ffffffaa" cx="250" cy="200" r="1.2"/><circle fill="%23ffffff55" cx="100" cy="250" r="0.6"/></svg>') repeat;
    background-size: 300px 300px;
    z-index: 1;
    animation: move-twinkling 50s linear infinite;
    opacity: 0.5;
}

@keyframes move-stars {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

@keyframes move-twinkling {
    from { transform: translateX(0); }
    to { transform: translateX(-300px); }
}

/* ==================== 侧边栏样式 ==================== */
.sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-width) - 20px);
    top: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: rgba(26, 11, 11, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    border-right: 1px solid rgba(var(--primary-rgb), 0.3);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
}

.sidebar-logo {
    font-size: 1.8rem;
}

.sidebar-header h2 {
    flex: 1;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.5rem;
    color: var(--gold);
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

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

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.sidebar-category {
    margin-bottom: 20px;
}

.sidebar-category h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.sidebar-btn:hover {
    background: rgba(var(--primary-rgb), 0.3);
    transform: translateX(5px);
    border-color: var(--primary-color);
}

.sidebar-btn:active {
    transform: translateX(5px) scale(0.98);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-text {
    font-size: 0.95rem;
}

/* ==================== 历史对话 ==================== */
.no-history {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    text-align: center;
    padding: 15px 0;
}

.history-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.history-btn:hover {
    background: rgba(var(--primary-rgb), 0.3);
    transform: translateX(5px);
}

.history-btn .btn-icon {
    font-size: 1.2rem;
}

.history-btn .btn-info {
    flex: 1;
    overflow: hidden;
}

.history-btn .btn-title {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-btn .btn-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.history-btn .delete-btn {
    background: rgba(var(--primary-rgb), 0.3);
    border: none;
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.history-btn:hover .delete-btn {
    opacity: 1;
}

.history-btn .delete-btn:hover {
    background: rgba(var(--primary-rgb), 0.5);
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.author-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    text-align: center;
}

.author-card p {
    margin: 3px 0;
    color: var(--text-secondary);
}

.author-card strong {
    color: var(--gold);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== 主容器 ==================== */
.main-container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
}

/* ==================== 顶部导航 ==================== */
.top-nav {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--panel-bg-strong);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
}

.menu-btn, .clear-btn, .new-chat-btn {
    background: rgba(var(--primary-rgb), 0.2);
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn:hover, .clear-btn:hover, .new-chat-btn:hover {
    background: rgba(var(--primary-rgb), 0.4);
}

.new-chat-btn {
    background: rgba(74, 222, 128, 0.2);
}

.new-chat-btn:hover {
    background: rgba(74, 222, 128, 0.4);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-btn {
    background: transparent;
    border: 1px solid rgba(var(--primary-rgb), 0.6);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(5px);
}

.route-btn:hover {
    background: rgba(var(--primary-rgb), 0.3);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3);
}

.route-btn:active {
    transform: scale(0.95);
}

.route-btn.route-1 {
    background: rgba(var(--primary-rgb), 0.2);
}

.route-btn.route-2 {
    background: rgba(var(--secondary-rgb), 0.2);
}

.route-btn.route-main {
    background: rgba(var(--primary-rgb), 0.2);
}

.route-btn.route-backup {
    background: rgba(255, 152, 0, 0.2);
}

.nav-title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-logo {
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.master-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.6), 0 0 40px rgba(var(--primary-rgb), 0.3);
    animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite alternate;
    border: 2px solid rgba(var(--accent-rgb), 0.5);
}

@keyframes glow {
    from { box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.6), 0 0 40px rgba(var(--primary-rgb), 0.3); }
    to { box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.5), 0 0 50px rgba(var(--primary-rgb), 0.5); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-title h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    background: linear-gradient(to right, var(--gold), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 聊天区域 ==================== */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
}

.message.assistant .avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
}

.message.user .avatar {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

.message-content {
    max-width: 80%;
    padding: 15px 18px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.message.assistant .message-content {
    background: rgba(var(--primary-rgb), 0.12);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    border-left: 4px solid var(--primary-color);
}

.message.user .message-content {
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-right: 4px solid var(--accent-color);
}

.message-header {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.message-text {
    line-height: 1.9;
    font-size: 0.95rem;
}

.message-text p {
    margin-bottom: 12px;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text ul, .message-text ol {
    margin: 10px 0;
    padding-left: 20px;
}

.message-text li {
    margin: 6px 0;
}

.message-text strong {
    color: var(--gold);
}

.message-text mark {
    background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.4) 0%, rgba(var(--secondary-rgb), 0.4) 100%);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: 500;
}

/* 吉凶样式 */
.luck-great {
    color: var(--gold);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}

.luck-good {
    color: var(--accent-color);
    font-weight: bold;
}

.luck-small {
    color: rgba(var(--accent-rgb), 0.8);
}

.luck-bad {
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

.luck-medium-bad {
    color: rgba(var(--primary-rgb), 0.7);
}

.luck-small-bad {
    color: rgba(var(--primary-rgb), 0.55);
}

/* 五行颜色 */
.wuxing-金 { color: var(--gold); font-weight: 500; }
.wuxing-木 { color: #d8a657; font-weight: 500; }
.wuxing-水 { color: #f2b880; font-weight: 500; }
.wuxing-火 { color: var(--primary-color); font-weight: 500; }
.wuxing-土 { color: #c69c6d; font-weight: 500; }

/* 列表项样式 */
.list-item {
    padding-left: 10px;
    margin: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.list-num {
    color: var(--accent-color);
    font-weight: bold;
    min-width: 20px;
}

/* 标题图标 */
.title-icon {
    color: var(--gold);
    margin-right: 5px;
}

.message-text .highlight {
    background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.2) 0%, rgba(var(--accent-rgb), 0.1) 100%);
    border-left: 3px solid var(--gold);
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 0 8px 8px 0;
}

.message .divider {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    margin: 15px 0;
    width: 100%;
}
.fortune-saying {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    padding: 12px 15px;
    border-radius: 10px;
    margin-top: 15px;
    color: var(--gold);
    font-style: italic;
}

/* 多线路提示样式 */
.route-tip {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2) 0%, rgba(var(--secondary-rgb), 0.1) 100%);
    border: 2px solid rgba(var(--primary-rgb), 0.5);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    animation: pulse-border 2s ease-in-out infinite;
}

.route-tip p {
    margin: 8px 0;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(var(--primary-rgb), 0.5); }
    50% { border-color: rgba(var(--accent-rgb), 0.8); }
}

/* ==================== 输入区域 ==================== */
.input-section {
    padding: 15px 20px;
    background: var(--panel-bg-strong);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(var(--primary-rgb), 0.2);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    padding: 8px 15px;
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.5;
}

.input-wrapper textarea::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.6);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== 底部信息 ==================== */
.bottom-info {
    text-align: center;
    padding: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--panel-bg);
}

.bottom-info strong {
    color: var(--accent-color);
}

/* ==================== 加载动画 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 11, 11, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-content p {
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================== 响应式设计 ==================== */
/* iPad 和小平板 */
@media (max-width: 1024px) {
    .chat-container {
        padding: 10px;
    }
    
    .message-content {
        max-width: 85%;
    }
}

/* 手机横屏和小平板 */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 80vw;
    }
    
    .sidebar {
        left: -100%;
        width: 80vw;
        max-width: 300px;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.8);
        z-index: 2001;
        border-right: 1px solid rgba(var(--primary-rgb), 0.2);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-footer {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
        flex-shrink: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .author-card {
        padding: 10px;
        font-size: 0.75rem;
    }
    
    .author-card p {
        margin: 2px 0;
    }
    
    /* 侧边栏遮罩层 */
    .sidebar-overlay {
        display: block;
        z-index: 2000;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .top-nav {
        padding: 12px 15px;
        z-index: 100;
        position: relative;
    }
    
    .nav-title h1 {
        font-size: 1.5rem;
    }
    
    .menu-btn, .clear-btn, .new-chat-btn {
        padding: 8px 12px;
        font-size: 1.2rem;
    }
    
    .chat-container {
        padding: 15px 10px;
        gap: 15px;
        overflow-x: hidden;
    }
    
    .message {
        gap: 8px;
        padding-left: 0;
    }
    
    .avatar {
        display: none !important;
    }
    
    .message-content {
        max-width: 100%;
        padding: 12px 14px;
    }
    
    .message-text {
        font-size: 0.9rem;
        line-height: 1.8;
    }
    
    .input-section {
        padding: 12px 15px;
    }
    
    .input-wrapper {
        padding: 6px 12px;
    }
    
    .input-wrapper textarea {
        font-size: 0.95rem;
    }
    
    .send-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .sidebar-btn {
        padding: 10px 12px;
    }
    
    .btn-text {
        font-size: 0.9rem;
    }
    
    .sidebar-category {
        margin-bottom: 15px;
    }
    
    .sidebar-category h3 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .sidebar-header {
        padding: 15px;
        flex-shrink: 0;
    }
    
    .sidebar-logo {
        font-size: 1.5rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.3rem;
    }
}

/* iPhone SE 等小屏手机 */
@media (max-width: 375px) {
    .nav-title h1 {
        font-size: 1.3rem;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .message-content {
        max-width: 88%;
        padding: 10px 12px;
    }
    
    .message-text {
        font-size: 0.85rem;
    }
}

/* 大屏手机优化 */
@media (min-width: 376px) and (max-width: 414px) {
    .message-content {
        max-width: 87%;
    }
    
    .message-text {
        font-size: 0.9rem;
    }
}

/* iPad Pro 和大屏设备 */
@media (min-width: 1025px) and (max-width: 1366px) {
    .chat-container {
        max-width: 900px;
        margin: 0 auto;
    }
    
    .message-content {
        max-width: 75%;
    }
}

/* 超大屏幕优化 */
@media (min-width: 1367px) {
    .chat-container {
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .message-content {
        max-width: 70%;
    }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.6);
}

/* ==================== 打字机效果 ==================== */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--primary-color);
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 底部作者信息样式 */
.bottom-info {
    text-align: center;
    padding: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.author-wechat {
    color: var(--accent-color) !important;
    font-weight: bold;
    margin-top: 5px !important;
}

/* 新增动画效果 */
@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes contactShimmer {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .notification-content {
        width: 95%;
        margin: 10px;
        border-radius: 16px;
    }
    
    .notification-content::before {
        border-radius: 16px;
    }
    
    .notification-header {
        padding: 20px 25px;
        border-radius: 14px 14px 0 0;
    }
    
    .notification-header h3 {
        font-size: 18px;
    }
    
    .notification-body {
        padding: 25px;
        border-radius: 0 0 14px 14px;
    }
    
    .notification-body p {
        font-size: 14px;
    }
    
    .notification-icon {
        font-size: 24px;
        margin-right: 12px;
    }
    
    .author-contact {
        padding: 15px;
        border-radius: 10px;
    }
}

/* ==================== 赞赏按钮 ==================== */
.donation-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.85) 0%, rgba(var(--secondary-rgb), 0.85) 100%);
    border: 2px solid transparent;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.donation-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 25px;
    z-index: -1;
    animation: donationBtnGlow 3s ease-in-out infinite;
    opacity: 0.8;
}

.donation-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.4);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.95) 0%, rgba(var(--secondary-rgb), 0.95) 100%);
}

.donation-btn:active {
    transform: translateY(0) scale(0.98);
}

.donation-icon {
    font-size: 18px;
    animation: heartBeat 1.5s ease-in-out infinite;
}

/* ==================== 赞赏码弹窗 ==================== */
.donation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    -webkit-overflow-scrolling: touch;
}

.donation-modal.show {
    opacity: 1;
    visibility: visible;
}

.donation-content {
    background: linear-gradient(135deg, rgba(26, 11, 11, 0.98) 0%, rgba(43, 15, 15, 0.98) 50%, rgba(var(--primary-rgb), 0.15) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 25px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 0 0 1px rgba(var(--primary-rgb), 0.3),
        0 20px 60px rgba(var(--primary-rgb), 0.4),
        0 0 120px rgba(var(--secondary-rgb), 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: donationSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.donation-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 25px;
    z-index: -1;
    animation: donationBorderGlow 3s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes donationSlideIn {
    0% {
        transform: translateY(-100px) scale(0.8) rotateX(15deg);
        opacity: 0;
        filter: blur(10px);
    }
    50% {
        transform: translateY(20px) scale(1.02) rotateX(-2deg);
        opacity: 0.8;
        filter: blur(2px);
    }
    100% {
        transform: translateY(0) scale(1) rotateX(0deg);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes donationBorderGlow {
    0%, 100% {
        opacity: 0.8;
        transform: rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: rotate(180deg);
    }
}

@keyframes donationBtnGlow {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.donation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--secondary-rgb), 0.1) 100%);
    border-radius: 23px 23px 0 0;
    position: relative;
    overflow: hidden;
}

.donation-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

.donation-modal-icon {
    font-size: 28px;
    margin-right: 15px;
    animation: heartBeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(var(--primary-rgb), 0.6));
}

.donation-header h3 {
    font-size: 22px;
    color: var(--text-primary);
    flex: 1;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.donation-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.donation-close:hover {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--text-primary);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
}

.donation-body {
    padding: 30px;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 23px 23px;
    text-align: center;
}

.donation-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.qr-code-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.qr-code-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    animation: contactShimmer 3s ease-in-out infinite;
}

.qr-code {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.scan-tip {
    margin-top: 15px;
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.donation-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.2);
}

.author-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.thanks-text {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .donation-btn {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .donation-btn::before {
        border-radius: 20px;
    }
    
    .donation-content {
        width: 95%;
        border-radius: 20px;
    }
    
    .donation-content::before {
        border-radius: 20px;
    }
    
    .donation-header {
        padding: 20px 25px;
        border-radius: 18px 18px 0 0;
    }
    
    .donation-header h3 {
        font-size: 18px;
    }
    
    .donation-body {
        padding: 25px;
        border-radius: 0 0 18px 18px;
    }
    
    .qr-code {
        width: 180px;
        height: 180px;
    }
    
    .donation-text {
        font-size: 14px;
    }
}
