/* --- GLOBAL RESET & FONT --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

/* --- UTILITY CLASSES --- */
.hidden {
    display: none !important;
}

:root {
    --primary-color: #ffffff;
    --primary-color-rgb: 255, 255, 255;
    --secondary-color: #f0f0f0;
    --secondary-color-rgb: 240, 240, 240;
    --background-color: #2d2d2d;
    --glow-color: rgba(255, 255, 255, 0.75);
    --font-family: 'Roboto Mono', monospace;
}

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

/* 全局性能优化 */
*,
*::before,
*::after {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background-color);
    background: radial-gradient(ellipse at center, #404040 0%, #2d2d2d 70%);
    color: var(--primary-color);
    font-family: var(--font-family);
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto;   /* Allow vertical scroll if content is too tall */
    min-height: 100vh;
    /* 完全忽略滚动条的居中方式 */
    width: 100vw;
    box-sizing: border-box;
}

/* --- UNIFIED SCROLLBAR STYLES --- */
/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 0 5px var(--secondary-color);
    border-color: rgba(var(--secondary-color-rgb), 0.3);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-color);
}


/* --- CUSTOM NOTIFICATION --- */
#custom-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -150%);
    background: rgba(13, 2, 8, 0.9);
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 10001;
    font-size: 1rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(5px);
    max-width: 90%;
    word-break: break-word;
}

#custom-notification.show {
    transform: translate(-50%, 0);
}

#custom-notification.warning {
    border: 1px solid #f39c12;
    color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

#custom-notification.success {
    border: 1px solid #00ff00;
    color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

#custom-notification.error {
    border: 1px solid #ff0000;
    color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

#custom-notification.info {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
}





/* --- 修复动画方向，从隐藏到显示 --- */
body {
    opacity: 1; /* 先正常显示 */
}

/* 主要元素初始状态：隐藏 */
.container {
    opacity: 0;
    transform: translateY(15px);
    animation: slideUpShow 1.0s ease-out 0.1s forwards;
}

.fab-container {
    opacity: 0;
    transform: translateX(20px);
    animation: slideRightShow 0.9s ease-out 0.1s forwards;
}

.main-theme-palette {
    opacity: 0;
    transform: translateY(-8px);
    animation: slideDownShow 0.9s ease-out 0.1s forwards;
}

/* 动画：从隐藏到显示 */
@keyframes slideUpShow {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRightShow {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDownShow {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 布局平滑过渡，防止元素突然跳跃 --- */
.clipboard-main,
.quick-add-section,
.add-text-area,
.upload-area,
.clipboard-grid,
.personal-notes-section,
.user-welcome,
.user-info {
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    will-change: opacity, transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 用户欢迎面板的丝滑动画 */
.user-welcome {
    opacity: 0;
    transform: scaleY(0) translateZ(0);
    transform-origin: top;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.35s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: layout style paint;
    isolation: isolate;
}

.user-welcome.show {
    opacity: 1;
    transform: scaleY(1) translateZ(0);
    pointer-events: auto;
}

/* 个人笔记面板的丝滑动画 */
.personal-notes {
    opacity: 0;
    transform: scaleY(0) translateZ(0);
    transform-origin: top;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.35s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: layout style paint;
    isolation: isolate;
}

.personal-notes.show {
    opacity: 1;
    transform: scaleY(1) translateZ(0);
    pointer-events: auto;
}

/* 确保动态内容区域有平滑的过渡 - 避免使用引起回流的属性 */
.user-info,
.personal-notes-section {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    will-change: opacity, transform;
    contain: layout style paint;
    backface-visibility: hidden;
}

/* 主要布局容器的平滑过渡 - 仅使用高性能属性 */
.container > * {
    transition: transform 0.2s ease-out;
    will-change: transform;
    contain: layout style;
}

/* --- BACKGROUND ELEMENTS --- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

#matrix-canvas.hidden {
    opacity: 0;
}

#globe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    cursor: move;
}

/* --- SCANLINE & CRT ANIMATION --- */
body::after {
    content: ' ';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0.2) 1px,
        rgba(0, 0, 0, 0) 2px
    );
    animation: scanlines 5s linear infinite;
    pointer-events: none;
    z-index: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 3;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.9; }
  50% { opacity: 1; }
  100% { opacity: 0.9; }
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* --- MAIN THEME PALETTE --- */
.main-theme-palette {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(var(--background-color-rgb), 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.3);
    transition: all 0.3s ease;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    padding: 12px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.theme-toggle-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    transform: scale(1.1);
}

.main-theme-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: rgba(var(--background-color-rgb), 0.95);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 200px;
}

.main-theme-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-theme-panel .color-swatches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.main-theme-panel .color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    background-color: var(--swatch-color);
    transition: all 0.3s ease;
    position: relative;
}

.main-theme-panel .color-swatch:hover {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.8);
}

.main-theme-panel .color-swatch.active {
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--swatch-color), 0 0 20px var(--swatch-color);
}

/* 移除了打勾标记，只保留发光效果来表示选中状态 */

/* --- MATRIX TOGGLE BUTTON --- */
.matrix-toggle-container {
    position: fixed;
    top: 20px;
    left: 88px; /* 主题按钮宽度(48px) + 间距(20px) + 边距(20px) */
    z-index: 1000;
    background: rgba(var(--background-color-rgb), 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-8px);
    animation: slideDownShow 0.9s ease-out 0.4s forwards;
}

.matrix-toggle-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    padding: 12px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.matrix-toggle-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    transform: scale(1.1);
}

.matrix-toggle-btn.active {
    background: rgba(var(--primary-color-rgb), 0.2);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.5);
}

/* --- MAIN CONTAINER --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* --- HEADER STYLES --- */
.main-header {
    margin-bottom: 20px;
    padding: 20px;
    text-align: center;
    transition: opacity 0.5s ease;
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.glitch-title {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 
        0 0 10px var(--glow-color),
        0.05em 0 0 rgba(255,0,193,0.75),
        -0.025em -0.05em 0 rgba(0,221,255,0.75);
    animation: glitch 3s infinite;
    margin-bottom: 10px;
    user-select: none; /* 禁止文本选择，避免点击彩蛋时选中文本 */
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
}

.subtitle {
    width: 100%; /* Ensure subtitle is on its own line */
    font-size: 1.2rem;
    color: rgba(0, 255, 65, 0.8);
    margin-top: -15px; /* Adjust spacing */
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* --- AI EYE INTERACTION --- */
#ai-eye {
    width: 60px;
    height: 30px;
    border: 2px solid #cc0000;
    border-radius: 50%;
    position: relative;
    transform: rotate(-10deg);
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.8);
    background-color: rgba(var(--background-color-rgb, 13, 2, 8), 0.5);
}

#ai-pupil {
    width: 12px;
    height: 12px;
    background-color: #ff0000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s linear;
    box-shadow: 0 0 8px #ff0000;
}




@keyframes glitch {
    0%, 100% { 
        text-shadow: 
            0 0 10px var(--glow-color),
            0.05em 0 0 rgba(255,0,193,0.75),
            -0.025em -0.05em 0 rgba(0,221,255,0.75);
    }
    25% { 
        text-shadow: 
            0 0 10px var(--glow-color),
            -0.05em -0.025em 0 rgba(255,0,193,0.75),
            0.025em 0.025em 0 rgba(0,221,255,0.75);
    }
    50% { 
        text-shadow: 
            0 0 10px var(--glow-color),
            0.025em 0.05em 0 rgba(255,0,193,0.75),
            0.05em 0 0 rgba(0,221,255,0.75);
    }
}

@keyframes progress-glow {
    0% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
    }
    50% {
        box-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    }
    100% {
        box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
    }
}

/* --- SYSTEM INSIGHTS --- */
.system-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.system-insights.visible {
    opacity: 1;
    transform: translateY(0);
}

.insight-item {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    padding: 15px 20px;
    text-align: center;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}

.insight-item:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.insight-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(var(--primary-color-rgb), 0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.insight-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--glow-color);
    min-height: 2.2rem; /* Reserve space to prevent layout shift */
}

/* --- AI CONTROL PANEL --- */
.ai-panel {
    background: rgba(13, 2, 8, 0.9);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color), inset 0 0 10px rgba(var(--primary-color-rgb), 0.1);
    backdrop-filter: blur(5px);
    position: fixed;
    width: 90%;
    max-width: 900px;
    left: 50%;
    top: 15vh;
    transform: perspective(1500px) translateX(-50%) scale(0.95) rotateX(-15deg);
    transform-origin: 50% 0;
    z-index: 10;
    transition: border-color 0.3s, box-shadow 0.3s, opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s, z-index 0.3s, top 0.4s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
}

.ai-panel.panel-active {
    z-index: 12;
}

.ai-panel.panel-active.visible {
    transform: perspective(1500px) translateX(-50%) scale(1.02) rotateX(0);
    box-shadow: 0 0 35px var(--glow-color), inset 0 0 15px rgba(var(--primary-color-rgb), 0.2);
}

/* New animation for panel appearance */
.ai-panel.scan-in::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--secondary-color);
    box-shadow: 0 0 20px 2px var(--secondary-color);
    animation: scan-in 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    z-index: 1;
}

@keyframes scan-in {
    from {
        transform: translateY(0);
        opacity: 0.8;
    }
    to {
        transform: translateY(120%);
        opacity: 0;
    }
}

.ai-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: perspective(1500px) translateX(-50%) scale(1) rotateX(0);
    pointer-events: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: grab;
    transition: background-color 0.3s, border-color 0.3s;
    background: linear-gradient(45deg, rgba(var(--primary-color-rgb), 0.2), rgba(var(--secondary-color-rgb, 255, 0, 193), 0.2));
    border-bottom: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.panel-header:active {
    cursor: grabbing;
}

.panel-title {
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 0 5px var(--glow-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.panel-icon-btn, .header-icon-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s, text-shadow 0.3s;
    padding: 0;
    line-height: 1;
}

.panel-icon-btn:hover {
    transform: scale(1.2) rotate(15deg);
}

#close-panel-btn:hover {
    transform: scale(1.2) rotate(90deg);
}

.header-icon-btn:hover {
    transform: scale(1.15);
    text-shadow: 0 0 10px var(--glow-color);
}

.header-icon-btn.active {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
}

.status-lights {
    display: flex;
    gap: 8px;
}

.light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
    animation: pulse 2s infinite;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.light:nth-child(2) { animation-delay: 0.5s; }
.light:nth-child(3) { animation-delay: 1s; }

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

#panel-body {
    max-height: 70vh;
    overflow-y: auto;
}

.panel-content {
    padding: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.clear-prompt-btn {
    background: transparent;
    border: 1px solid rgba(var(--primary-color-rgb), 0.5);
    color: rgba(var(--primary-color-rgb), 0.7);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-prompt-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--background-color);
    transform: rotate(90deg) scale(1.1);
}

label {
    display: block;
    margin-bottom: 0;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--glow-color);
    transition: color 0.3s, text-shadow 0.3s;
}

/* --- FORM ELEMENTS --- */
input[type="text"], input[type="password"], 
select, textarea, .history-search-input {
    width: 100%;
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1rem;
    padding: 12px;
    outline: none;
    transition: all 0.3s;
    text-shadow: 0 0 3px var(--glow-color);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

input[type="text"]:focus, input[type="password"]:focus,
select:focus, textarea:focus, .history-search-input:focus {
    background: rgba(var(--primary-color-rgb), 0.1);
    animation: pulse-border-focus 1.5s infinite;
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3);
    border-color: var(--secondary-color);
}

input[type="text"]::placeholder, 
input[type="password"]::placeholder, textarea::placeholder, .history-search-input::placeholder {
    color: rgba(var(--primary-color-rgb), 0.5);
    text-shadow: none;
}

@keyframes pulse-border-focus {
    0%, 100% {
        border-color: var(--primary-color);
        box-shadow: 0 0 15px var(--glow-color), inset 0 0 5px rgba(var(--primary-color-rgb), 0.1);
    }
    50% {
        border-color: var(--secondary-color);
        box-shadow: 0 0 25px var(--secondary-color), inset 0 0 10px rgba(var(--secondary-color-rgb), 0.2);
    }
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

textarea::placeholder, .history-search-input::placeholder {
    font-style: italic;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select option {
    background: var(--background-color);
    color: var(--primary-color);
}

/* --- FILE DROP ZONE --- */
.file-drop-zone {
    border: 2px dashed rgba(var(--primary-color-rgb), 0.4);
    padding: 20px;
    text-align: center;
    color: rgba(var(--primary-color-rgb), 0.6);
    margin-top: -10px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone.drag-over {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: inset 0 0 15px var(--glow-color);
}

.file-drop-zone p {
    font-size: 0.9rem;
    margin: 0;
}

.file-drop-zone span {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* --- BUTTON --- */
.button-container {
    text-align: center;
    margin: 30px 0;
}

.evolve-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-family: var(--font-family);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px var(--glow-color);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.evolve-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
    transition: left 0.6s;
}

.evolve-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 25px var(--glow-color);
    text-shadow: none;
    transform: translateY(-2px);
}

.evolve-btn:hover::before {
    left: 100%;
}

.evolve-btn:disabled {
    color: rgba(var(--primary-color-rgb), 0.4) !important;
    border-color: rgba(var(--primary-color-rgb), 0.2) !important;
    background: rgba(var(--primary-color-rgb), 0.1) !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 1 !important;
    pointer-events: none;
}

.evolve-btn:disabled:hover {
    color: rgba(var(--primary-color-rgb), 0.4) !important;
    border-color: rgba(var(--primary-color-rgb), 0.2) !important;
    background: rgba(var(--primary-color-rgb), 0.1) !important;
    transform: none;
}

.evolve-btn:disabled::before {
    display: none;
}

.evolve-btn.loading {
    color: transparent !important;
}

.evolve-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-top: -12px;
    margin-left: -12px;
    border: 3px solid rgba(var(--primary-color-rgb), 0.5);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- STATUS PANEL --- */
.status-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--primary-color);
    padding: 20px;
    margin-top: 25px;
    transition: border-color 0.3s;
}

.status-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1rem;
    transition: color 0.3s;
}

.status-text {
    line-height: 1.6;
    word-break: break-word;
}

.loading {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(var(--primary-color-rgb), 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
    transition: border-color 0.3s;
}

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

/* --- CONFIG NOTE --- */
.config-note {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid rgba(255, 255, 0, 0.3);
    color: rgba(255, 255, 100, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- HISTORY PANEL --- */
.history-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(var(--primary-color-rgb), 0.5);
    padding: 20px;
    margin-top: 25px;
    transition: border-color 0.3s;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1rem;
    transition: color 0.3s;
}

.history-search-input {
    font-size: 0.9rem;
    padding: 6px 10px;
    flex-grow: 1;
}

.history-clear-btn {
    background: transparent;
    border: 1px solid rgba(var(--primary-color-rgb), 0.5);
    color: rgba(var(--primary-color-rgb), 0.7);
    padding: 4px 10px;
    font-size: 0.8rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.history-clear-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}

.history-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar spacing */
}

.history-item {
    position: relative;
    padding: 8px 12px;
    background: rgba(var(--primary-color-rgb), 0.05);
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: background-color 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-prompt-text {
    word-break: break-word;
    white-space: pre-wrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show max 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-item.expanded .history-prompt-text {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
}

.history-item-timestamp {
    font-size: 0.75rem;
    color: rgba(var(--primary-color-rgb), 0.6);
    align-self: flex-end;
    font-style: italic;
}

.history-item:hover {
    background: rgba(var(--primary-color-rgb), 0.15);
    border-left-color: var(--secondary-color);
}

.history-item-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.history-item:hover .history-item-controls {
    opacity: 1;
}

.history-item-btn {
    background: rgba(var(--background-color-rgb, 13, 2, 8), 0.8);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    width: 24px;
    height: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.history-item-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
    transform: scale(1.1);
}

.history-empty {
    color: rgba(var(--primary-color-rgb), 0.5);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* --- THEME SETTINGS --- */
.theme-settings-panel {
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--primary-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, border-color 0.3s;
}

.theme-settings-panel.open {
    max-height: 100px;
    padding: 20px 30px;
}

.color-swatches {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer;
    background-color: var(--swatch-color);
    transition: transform 0.2s ease, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--swatch-color), 0 0 15px var(--swatch-color);
}

/* --- COMMAND PALETTE --- */
#command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 1002;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#command-palette-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#command-palette {
    width: 90%;
    max-width: 600px;
    background: rgba(13, 2, 8, 0.95);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
}

.palette-input-container {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
}

.palette-icon {
    width: 20px;
    height: 20px;
    margin: 0 15px;
    color: var(--primary-color);
}

#palette-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1.1rem;
    padding: 15px 0;
    outline: none;
}

#palette-suggestions {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.palette-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
    transition: background-color 0.2s;
}

.palette-suggestion-item:last-child {
    border-bottom: none;
}

.palette-suggestion-item:hover, .palette-suggestion-item.selected {
    background: rgba(var(--primary-color-rgb), 0.15);
    color: var(--secondary-color);
}

/* --- FOCUS MODE --- */
body.focus-mode #matrix-canvas {
    opacity: 0.05;
}
body.focus-mode #globe-container {
    opacity: 0.1;
    pointer-events: none;
}
body.focus-mode .main-header {
    opacity: 0.2;
    pointer-events: none;
}
body.focus-mode .main-header .glitch-title {
    animation: none; /* Disable distracting glitch */
    text-shadow: 0 0 10px var(--glow-color); /* Keep a simple glow */
}

/* --- FLOATING ACTION BUTTONS --- */
.fab-container {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 1001 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 临时强制显示fab按钮的CSS规则 */
.fab-container,
.fab-container.visible {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.fab-container .fab,
.fab-container.visible .fab {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) rotate(0) scale(1) !important;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px var(--glow-color);
    cursor: pointer;
    display: flex !important;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    animation: fab-breathe 2.5s infinite ease-in-out;
    opacity: 0;
    transform: translateX(50px) rotate(90deg) scale(0.8);
    /* 强制覆盖全局设置 */
    backface-visibility: visible !important;
    will-change: opacity, transform;
    visibility: visible !important;
}

.fab-container.visible .fab {
    opacity: 1 !important;
    transform: translateX(0) rotate(0) scale(1) !important;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backface-visibility: visible !important;
    visibility: visible !important;
    display: flex !important;
}

.fab-container.visible #fab-feedback {
    transition-delay: 0.0s;
}

.fab-container.visible #fab-focus {
    transition-delay: 0.1s;
}

.fab-container.visible #fab-ai {
    transition-delay: 0.2s;
}

@keyframes fab-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px var(--glow-color);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px var(--glow-color);
    }
}

.fab:hover {
    animation-play-state: paused;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px var(--glow-color);
    background-color: var(--background-color);
    color: var(--primary-color);
}

.fab.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 15px var(--secondary-color);
    color: var(--background-color);
}

.fab.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #666 !important;
    border-color: #666 !important;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3) !important;
    animation: none !important;
}

.fab.disabled:hover {
    transform: none !important;
    background-color: #666 !important;
    color: #ccc !important;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3) !important;
}

.fab svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .glitch-title {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .panel-content {
        padding: 20px;
    }

    .ai-panel {
        width: 95%;
        top: 10px;
        transform: translateX(-50%) scale(0.95) rotateX(-15deg);
        max-height: calc(100vh - 80px);
    }

    .ai-panel.visible {
        transform: translateX(-50%) scale(1) rotateX(0);
    }
    
    .panel-header {
        cursor: default;
    }

    .fab-container {
        bottom: 20px;
        right: 20px;
    }

    .fab {
        width: 50px;
        height: 50px;
    }
}



/* --- Welcome Tour --- */
.tour-highlight {
    position: relative;
    z-index: 10003; /* Must be above overlay */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px 8px var(--secondary-color);
    border-radius: 5px;
    transition: box-shadow 0.3s ease-in-out;
}

#tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#tour-overlay.hidden, #tour-tooltip.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#tour-tooltip {
    position: absolute;
    background: rgba(13, 2, 8, 0.95);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
    padding: 20px;
    z-index: 10004;
    max-width: 350px;
    border-radius: 5px;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s, transform 0.3s;
}

#tour-text {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.tour-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.tour-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

#tour-skip {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

#tour-skip:hover {
    background: var(--secondary-color);
    color: var(--background-color);
}

#tour-step-indicator {
    font-size: 0.9rem;
    opacity: 0.7;
}




/* === 网络剪贴板样式 === */

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, rgba(13, 2, 8, 0.95), rgba(13, 2, 8, 0.85));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    padding: 45px; /* 增加内边距 */
    max-width: 480px; /* 增加最大宽度 */
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: rgba(var(--primary-color-rgb), 0.7);
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), 0.1);
    transform: rotate(90deg);
}

/* 认证标签 */
.auth-tabs {
    display: flex;
    margin-bottom: 35px; /* 增加下外边距 */
    background: rgba(var(--primary-color-rgb), 0.05);
    border-radius: 15px;
    padding: 5px; /* 增加内边距 */
    gap: 5px; /* 增加间距 */
}

.auth-tab {
    flex: 1;
    padding: 15px 20px; /* 增加垂直内边距 */
    background: none;
    border: none;
    color: rgba(var(--primary-color-rgb), 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    border-radius: 12px;
    font-weight: 500;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-2px);
}

.auth-tab:not(.active):hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

/* 表单样式 */
.auth-form {
    display: none;
    opacity: 0;
    transition: all 0.4s ease;
}

.auth-form.active {
    display: block;
    opacity: 1;
    animation: slideInUp 0.4s ease;
}

.auth-form h2 {
    margin-bottom: 35px; /* 增加下外边距 */
    text-align: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 28px; /* 增加下外边距 */
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px; /* 增加下外边距 */
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 18px 20px; /* 增加垂直内边距 */
    background: rgba(var(--background-color-rgb), 0.8);
    border: 2px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 12px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    background: var(--background-color);
}

.submit-btn {
    width: 100%;
    padding: 18px; /* 增加垂直内边距 */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
    margin-top: 10px; /* 增加上外边距 */
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(var(--secondary-color-rgb), 0.5);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 5px;
    color: var(--background-color);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--glow-color);
}

/* 用户信息区域 */
.user-info {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    gap: 15px; /* 调整间距 */
    position: relative;
}

/* 用户状态区域（登录/注册按钮） */
.user-status {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 15px; /* 按钮之间的间距 */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* 允许换行 */
}

/* 用户欢迎区域 */
.user-welcome {
    width: 100%;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 15px; /* 调整上外边距 */
}

/* 隐藏状态 - 使用纯transform和opacity，避免回流 */
.user-welcome.hidden {
    opacity: 0;
    transform: translateY(-15px) scaleY(0.8) translateZ(0);
    pointer-events: none;
}

.auth-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.auth-button.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.auth-button.secondary {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

.auth-button.primary:hover {
    box-shadow: 0 8px 25px rgba(var(--secondary-color-rgb), 0.5);
}

.auth-button.secondary:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

.button-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.button-text {
    font-weight: 600;
    display: inline-block; /* 确保文字正常显示 */
    white-space: nowrap; /* 防止文字换行 */
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px; /* 调整内边距 */
    margin: 10px 0; /* 调整上下外边距 */
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.1);
    transition: all 0.3s ease;
    max-width: 500px; /* 增加最大宽度以容纳更多按钮 */
    min-width: 300px; /* 设置最小宽度 */
}

.welcome-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--background-color);
    flex-shrink: 0; /* 防止被压缩 */
}

.avatar-icon {
    display: block;
    line-height: 1;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1; /* 让用户信息区域占据剩余空间 */
    min-width: 0; /* 允许收缩 */
}

.welcome-message {
    font-size: 0.9rem;
    color: rgba(var(--primary-color-rgb), 0.8);
}

.username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logout-button {
    display: flex;
    flex-direction: row; /* 确保水平排列 */
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(var(--secondary-color-rgb), 0.2);
    border: 1px solid var(--secondary-color);
    border-radius: 15px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.8rem;
    white-space: nowrap; /* 防止文字换行 */
    flex-shrink: 0; /* 防止按钮被压缩 */
}

.logout-button:hover {
    background: var(--secondary-color);
    color: var(--background-color);
    transform: translateY(-2px);
}

.delete-account-button {
    display: flex;
    flex-direction: row; /* 确保水平排列 */
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    border-radius: 15px;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.8rem;
    margin-left: 4px; /* 减少左边距 */
    white-space: nowrap; /* 防止文字换行 */
    flex-shrink: 0; /* 防止按钮被压缩 */
}

.delete-account-button:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* 个人笔记区域 */
.personal-notes {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

.personal-notes.hidden {
    opacity: 0;
    transform: translateY(-15px) scaleY(0.8) translateZ(0);
    pointer-events: none;
}

.notes-container {
    width: 100%;
    max-width: 500px;
    background: rgba(var(--primary-color-rgb), 0.08);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.1);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.notes-header h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
}

.save-status {
    font-size: 0.8rem;
    color: rgba(var(--primary-color-rgb), 0.6);
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(var(--primary-color-rgb), 0.1);
    transition: all 0.3s ease;
}

.save-status.saving {
    color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), 0.1);
}

.save-status.saved {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.15);
}

.save-status.editing {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.save-status.error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

#user-notes-textarea {
    width: 100%;
    min-height: 120px;
    max-width: none;
    background: rgba(var(--background-color), 0.5);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 10px;
    padding: 15px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    overflow: auto;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#user-notes-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
    background: rgba(var(--background-color), 0.7);
}

#user-notes-textarea::placeholder {
    color: rgba(var(--primary-color-rgb), 0.5);
}



/* 确保notes-container有相对定位并添加过渡效果 */
.notes-container {
    position: relative;
    transition: width 0.2s ease, box-shadow 0.3s ease;
    overflow: visible;
    min-width: 300px;
    max-width: 1000px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 自定义resize手柄 */
.custom-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: rgba(var(--primary-color-rgb), 0.15);
    border-radius: 10px 0 10px 0;
    cursor: nw-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(var(--primary-color-rgb), 0.7);
    opacity: 0.6;
    transition: all 0.2s ease;
    z-index: 10;
    user-select: none;
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
}

.custom-resize-handle:hover {
    background: rgba(var(--primary-color-rgb), 0.25);
    color: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
}

.custom-resize-handle:active {
    background: rgba(var(--primary-color-rgb), 0.35);
    transform: scale(0.95);
}

/* 当拖拽时显示特殊的光标提示 */
#user-notes-textarea:hover {
    cursor: text;
}

/* 拖拽时的视觉反馈 */
#user-notes-textarea.resizing {
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.4);
    border-color: var(--primary-color);
}

.notes-container.resizing {
    box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.2);
    /* 移除 transform: translateY(-1px); 防止位置偏移 */
}

/* 登录提示 */
.login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.login-prompt.hidden {
    display: none;
}

.prompt-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.prompt-content p {
    color: rgba(var(--primary-color-rgb), 0.8);
    margin-bottom: 30px;
}

/* 剪贴板主界面 */
.clipboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px) translateZ(0);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.35s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.clipboard-main.hidden {
    display: none;
}

.clipboard-main.show {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    pointer-events: auto;
}

/* 快速添加区域 */
.quick-add-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    min-height: 0; /* 确保grid容器不会因为动画产生额外高度 */
    align-items: start; /* 确保两个区域顶部对齐 */
    grid-auto-rows: minmax(200px, auto); /* 确保最小行高 */
}

.add-text-area, .add-file-area {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    min-height: 200px; /* 确保最小高度 */
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* 确保padding计入总尺寸 */
}

.add-text-area h3, .add-file-area h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-row input[type="text"] {
    flex: 1;
    min-width: 120px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

textarea {
    width: 100%;
    padding: 10px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-family: var(--font-family);
    resize: vertical;
    min-height: 80px;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(var(--secondary-color-rgb), 0.5);
}

.add-btn {
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    white-space: nowrap;
}

.add-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 文件上传区域 */
.file-drop-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover, .file-drop-zone.drag-over {
    border-color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), 0.1);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.file-types {
    font-size: 0.8rem;
    color: rgba(var(--primary-color-rgb), 0.6);
    margin-top: 5px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--font-family);
}

.selected-file {
    color: var(--primary-color);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px; /* 确保拖拽区域有固定高度 */
}

.add-file-area form {
    margin-top: 10px; /* 给表单添加一些间距 */
}

.add-file-area .form-row {
    margin-top: 10px;
}

/* 文件表单样式 */
#file-form {
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
}

#file-form.hidden {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
}

#file-form:not(.hidden) {
    opacity: 1;
    max-height: 200px; /* 给表单足够的空间 */
    pointer-events: auto;
}

/* 搜索区域 */
.search-section {
    margin-bottom: 30px;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

#search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-family: var(--font-family);
}

#type-filter {
    padding: 10px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    font-family: var(--font-family);
}

.search-btn {
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.search-btn:hover {
    background: var(--secondary-color);
}

.favorites-btn {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border: 1px solid #FFD700;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-weight: 600;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.favorites-btn:hover {
    background: #FFD700;
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.favorites-btn.active {
    background: #FFD700;
    color: var(--background-color);
}

/* 内容区域头部 */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h3 {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.batch-toggle-btn {
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.9rem;
}

.batch-toggle-btn:hover, .batch-toggle-btn.active {
    background: var(--secondary-color);
    color: var(--background-color);
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    background: rgba(var(--primary-color-rgb), 0.2);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.view-btn.active, .view-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

/* 批量操作工具栏 */
.batch-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.batch-toolbar.hidden {
    display: none;
}

.batch-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.batch-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-weight: 500;
    cursor: pointer;
}

.batch-select-all input[type="checkbox"] {
    accent-color: var(--secondary-color);
    transform: scale(1.2);
}

.selected-count {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(var(--primary-color-rgb), 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
}

.batch-actions {
    display: flex;
    gap: 10px;
}

.batch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
}

.batch-btn.export-btn {
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.batch-btn.export-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

.batch-btn.delete-btn {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
}

.batch-btn.delete-btn:hover {
    background: #ff4444;
    color: var(--background-color);
}

.batch-btn.cancel-btn {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    color: rgba(var(--primary-color-rgb), 0.8);
}

.batch-btn.cancel-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

/* 剪贴板条目列表 */
.clipboard-items {
    min-height: 200px;
}

.clipboard-items.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: start; /* 让每个项目顶部对齐，不会互相影响高度 */
    grid-auto-rows: max-content; /* 让行高自适应内容，减少空隙 */
}

.clipboard-items.list-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clipboard-item {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* 为评论区的绝对定位做准备 */
}

.clipboard-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(var(--secondary-color-rgb), 0.3);
    transform: translateY(-2px);
}

/* 批量模式样式 */
.clipboard-item.batch-mode {
    position: relative;
    padding-left: 40px;
    cursor: default;
}

.clipboard-item.batch-mode:hover {
    transform: none;
}

.item-checkbox {
    position: absolute;
    left: 12px;
    top: 12px;
    accent-color: var(--secondary-color);
    transform: scale(1.3);
    cursor: pointer;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

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

.item-title {
    flex: 1;
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* 限制标题最大宽度 */
}

/* 文件名容器样式 */
.file-name-container {
    cursor: help;
    position: relative;
}

.file-name-container:hover {
    color: var(--secondary-color);
}

/* 文件名截断提示样式 */
.file-name-container[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

.private-icon {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.clipboard-item:hover .item-actions {
    opacity: 1;
}

.edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.75rem;
    text-decoration: none;
}

.edit-btn:hover {
    background: var(--secondary-color);
    color: var(--background-color);
    transform: translateY(-1px);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 6px;
    color: #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.75rem;
    text-decoration: none;
}

.download-btn:hover {
    background: #3498db;
    color: var(--background-color);
    transform: translateY(-1px);
}

.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #FFD700;
    border-radius: 50%;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
}

.favorite-btn:hover {
    background: #FFD700;
    color: var(--background-color);
    transform: scale(1.1);
}

.favorite-btn.favorited {
    background: #FFD700;
    color: var(--background-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.delete-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.delete-btn:hover {
    background: var(--secondary-color);
    color: var(--background-color);
    opacity: 1;
}

.item-content {
    color: rgba(var(--primary-color-rgb), 0.8);
    margin-bottom: 10px;
    line-height: 1.4;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(var(--primary-color-rgb), 0.6);
}

.item-tags {
    background: rgba(var(--secondary-color-rgb), 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

/* --- 评论区样式 --- */
.comments-section {
    margin-top: 15px;
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.2);
    padding-top: 10px;
}

.comments-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 0;
    color: rgba(var(--primary-color-rgb), 0.8);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.comments-toggle:hover {
    color: var(--primary-color);
}

.comments-count {
    font-size: 0.8rem;
    opacity: 0.7;
}

.comments-container {
    padding: 10px 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: top;
    opacity: 0;
    transform: scaleY(0);
    height: 0;
    overflow: hidden;
}

.comments-container.visible {
    opacity: 1;
    transform: scaleY(1);
    height: auto;
}

.comments-list {
    margin-bottom: 15px;
}

.no-comments {
    color: rgba(var(--primary-color-rgb), 0.5);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.comment {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
    border-radius: 8px;
    padding: 12px;
    padding-bottom: 28px; /* 为右下角的时间留出空间 */
    margin-bottom: 10px;
    position: relative;
    transition: background-color 0.2s ease;
}

.comment:hover {
    background: rgba(var(--primary-color-rgb), 0.08);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-header .left-info {
    display: flex;
    align-items: center;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.comment-time {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: rgba(var(--primary-color-rgb), 0.5);
    pointer-events: none; /* 防止干扰点击事件 */
}

.comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.comment-actions button {
    background: none;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    color: rgba(var(--primary-color-rgb), 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-actions button:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.comment-content {
    line-height: 1.4;
    color: rgba(var(--primary-color-rgb), 0.9);
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-form, .comment-reply-form {
    margin-top: 10px;
}

.comment-input, .reply-input {
    width: 100%;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    color: var(--primary-color);
    padding: 10px;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.comment-input:focus, .reply-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.15);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.comment-actions, .reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.submit-comment-btn, .submit-reply-btn, .cancel-comment-btn, .cancel-reply-btn {
    background: rgba(var(--primary-color-rgb), 0.2);
    border: 1px solid rgba(var(--primary-color-rgb), 0.4);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-comment-btn:hover, .submit-reply-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.3);
}

.cancel-comment-btn, .cancel-reply-btn {
    background: transparent;
    border-color: rgba(var(--primary-color-rgb), 0.3);
    color: rgba(var(--primary-color-rgb), 0.7);
}

.cancel-comment-btn:hover, .cancel-reply-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.5);
    color: rgba(255, 0, 0, 0.8);
}

.delete-comment-btn {
    color: rgba(255, 0, 0, 0.8) !important;
    border-color: rgba(255, 0, 0, 0.3) !important;
}

.delete-comment-btn:hover {
    background: rgba(255, 0, 0, 0.1) !important;
    border-color: rgba(255, 0, 0, 0.5) !important;
    color: rgba(255, 0, 0, 1) !important;
}

/* 顶级评论样式 */
.top-level-comment {
    position: relative;
}

/* 回复容器样式 */
.replies-container {
    margin-top: 15px;
    margin-left: 20px;
    padding-left: 15px;
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: top;
    opacity: 0;
    transform: scaleY(0);
    height: 0;
    overflow: hidden;
}

.replies-container.visible {
    opacity: 1;
    transform: scaleY(1);
    height: auto;
}

/* 回复评论样式 */
.reply-comment {
    background: rgba(var(--primary-color-rgb), 0.02);
    border-radius: 6px;
    margin-bottom: 8px;
    animation: slideInFromLeft 0.3s ease-out;
}

/* 展开回复按钮样式 */
.expand-replies-btn {
    background: rgba(var(--primary-color-rgb), 0.15);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-replies-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.25);
    border-color: var(--primary-color);
}

/* 无回复提示 */
.no-replies {
    color: rgba(var(--primary-color-rgb), 0.5);
    font-style: italic;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
}

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

@keyframes slideInFromLeft {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes expandHeight {
    from { 
        max-height: 0; 
        opacity: 0; 
    }
    to { 
        max-height: 1000px; 
        opacity: 1; 
    }
}

.loading-message, .empty-message {
    text-align: center;
    color: rgba(var(--primary-color-rgb), 0.6);
    padding: 40px 20px;
    font-style: italic;
}

/* 分页 */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination-controls {
    display: inline-flex;
    gap: 5px;
}

.page-btn {
    background: rgba(var(--primary-color-rgb), 0.2);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.page-btn:hover, .page-btn.active {
    background: var(--primary-color);
    color: var(--background-color);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 10001;
    font-family: var(--font-family);
    max-width: 300px;
    word-wrap: break-word;
}

.notification.success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.notification.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
}

.notification.info {
    background: rgba(var(--primary-color-rgb), 0.2);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quick-add-section {
        grid-template-columns: 1fr;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clipboard-items.grid-view {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row input[type="text"] {
        min-width: auto;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* 编辑模态框特定样式 */
.edit-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
}

#edit-content {
    width: 100%;
    min-height: 200px;
    padding: 15px 20px;
    background: rgba(var(--background-color-rgb), 0.8);
    border: 2px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 12px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.5;
}

#edit-content:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    background: var(--background-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.cancel-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid rgba(var(--primary-color-rgb), 0.5);
    border-radius: 12px;
    color: rgba(var(--primary-color-rgb), 0.7);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    writing-mode: initial;
    text-orientation: initial;
}

.cancel-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.save-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

.save-btn:active {
    transform: translateY(0);
}

/* 编辑按钮样式 */
.edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.85rem;
    text-decoration: none;
}

.edit-btn:hover {
    background: var(--secondary-color);
    color: var(--background-color);
    transform: translateY(-1px);
}

/* 帮助按钮样式 */
.help-button {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(var(--primary-color-rgb), 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500; /* 增加字体粗细 */
    z-index: 1000; /* 确保在最顶层 */
    backdrop-filter: blur(2px); /* 进一步减少模糊效果 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* 添加阴影增强对比度 */
}

/* 当AI进化面板显示时隐藏帮助按钮 */
.help-button.hidden-by-panel {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.help-button:hover {
    background: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

/* 帮助模态框样式 */
.help-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.help-section h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-section li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
    color: rgba(var(--primary-color-rgb), 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

.help-section li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.help-section kbd {
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-family);
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0 2px;
}

/* === 动画和视觉效果优化 === */

/* 淡入淡出动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 缩放动画 */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* 弹性动画 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-color-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0);
    }
}

/* 摇摆动画 */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-3px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(3px);
    }
}

/* 剪贴板条目动画增强 */
.clipboard-item {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.clipboard-item:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 25px rgba(var(--secondary-color-rgb), 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.clipboard-item.removing {
    animation: scaleOut 0.3s ease-in forwards;
}

/* 按钮动画增强 */
.auth-button, .batch-btn, .view-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

/* 模态框动画增强 */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal.closing {
    animation: fadeOut 0.3s ease-in forwards;
}

.modal-content {
    animation: scaleIn 0.3s ease-out;
}

.modal.closing .modal-content {
    animation: scaleOut 0.3s ease-in forwards;
}

/* 动画类 */
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.3s ease-out;
}

/* 通知动画 */
.notification {
    animation: slideInRight 0.4s ease-out;
    transition: all 0.3s ease;
}

/* 拖拽效果增强 */
.drag-over {
    animation: pulse 1s infinite;
    border-color: var(--secondary-color) !important;
    background: rgba(var(--secondary-color-rgb), 0.1) !important;
}

/* 响应式动画调整 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 禁用动画模式 */
.no-animations *, .no-animations *::before, .no-animations *::after {
    animation: none !important;
    transition: none !important;
}

/* 面板动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 彩虹光辉效果 */
@keyframes rainbow-glow {
    0% { box-shadow: 0 0 20px #ff0000; }
    16% { box-shadow: 0 0 20px #ff8000; }
    33% { box-shadow: 0 0 20px #ffff00; }
    50% { box-shadow: 0 0 20px #00ff00; }
    66% { box-shadow: 0 0 20px #0080ff; }
    83% { box-shadow: 0 0 20px #8000ff; }
    100% { box-shadow: 0 0 20px #ff0000; }
}

/* 彩虹背景动画 */
@keyframes rainbow-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 增强的聚焦样式 */
*:focus-visible {
    outline: 2px solid var(--secondary-color) !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}

/* === 统计面板样式 === */
.stats-section {
    margin-bottom: 30px;
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stats-section.hidden {
    display: none;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-toggle {
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 1rem;
    padding: 6px 10px;
}

.stats-toggle:hover {
    background: var(--secondary-color);
    color: var(--background-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(var(--background-color-rgb), 0.5);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(var(--secondary-color-rgb), 0.2);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 10px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(var(--primary-color-rgb), 0.7);
}

.tags-section {
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.2);
    padding-top: 20px;
}

.tags-section h4 {
    color: var(--secondary-color);
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    align-items: center;
}

.tag-item {
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tag-item:hover {
    background: var(--secondary-color);
    color: var(--background-color);
    transform: translateY(-1px);
}

.tag-item .tag-count {
    background: rgba(var(--primary-color-rgb), 0.2);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-left: 5px;
}

.tag-item:hover .tag-count {
    background: rgba(var(--background-color-rgb), 0.3);
    color: var(--background-color);
}

.loading-tags {
    color: rgba(var(--primary-color-rgb), 0.6);
    font-style: italic;
}

/* 统计面板响应式 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

/* 反馈模态框样式 */
.feedback-title {
    margin-bottom: 30px !important;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

/* 注销账户模态框样式 */
.delete-account-modal {
    max-width: 520px;
}

.delete-account-title {
    color: #dc3545;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(220, 53, 69, 0.3);
    padding-bottom: 15px;
}

.delete-account-warning {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.delete-account-warning p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.delete-account-warning ul {
    margin: 15px 0;
    padding-left: 20px;
}

.delete-account-warning li {
    margin-bottom: 8px;
    color: rgba(var(--primary-color-rgb), 0.9);
}

.warning-text {
    color: #dc3545 !important;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
}

.confirmation-checkbox {
    margin: 20px 0;
    padding: 15px;
    background: rgba(var(--primary-color-rgb), 0.05);
    border-radius: 8px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.confirmation-checkbox .checkbox-label {
    font-size: 0.95rem;
    color: rgba(var(--primary-color-rgb), 0.9);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.confirmation-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.delete-btn {
    background: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
    font-weight: bold;
}

.delete-btn:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* ===== 单词添加功能样式 ===== */
.word-add-section {
    margin-top: 20px;
    opacity: 0;
    transform: scaleY(0) translateZ(0);
    transform-origin: top;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.35s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: layout style paint;
    isolation: isolate;
}

.word-add-section.show {
    opacity: 1;
    transform: scaleY(1) translateZ(0);
    pointer-events: auto;
}

.word-container {
    background: rgba(var(--primary-color-rgb), 0.03);
    border: 1px solid rgba(var(--primary-color-rgb), 0.15);
    border-radius: 15px;
    padding: 25px 30px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.word-header h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

.word-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    padding: 5px 12px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.word-link:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-1px);
}

.word-icon {
    margin-right: 5px;
    font-size: 1rem;
}

.word-form-group {
    margin-bottom: 16px;
}

.word-form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(var(--background-color), 0.6);
    border: 1px solid rgba(var(--primary-color-rgb), 0.25);
    border-radius: 12px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.3);
    background: rgba(var(--background-color), 0.9);
}

.word-form-group input::placeholder {
    color: rgba(var(--primary-color-rgb), 0.5);
    font-style: italic;
}

.word-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.word-add-btn {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.15), rgba(var(--primary-color-rgb), 0.08));
    border: 2px solid rgba(var(--primary-color-rgb), 0.35);
    border-radius: 25px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.2);
}

.word-add-btn:hover {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.2), rgba(var(--primary-color-rgb), 0.1));
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.4);
    transform: translateY(-2px);
}

.word-add-btn .button-icon {
    margin-right: 6px;
    font-size: 1rem;
}

/* ===== 背单词页面样式 ===== */
.word-page {
    background: var(--background-color);
    min-height: 100vh;
}

.word-header {
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.word-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.back-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    padding: 8px 15px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.back-link:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3);
    transform: translateX(-3px);
}

.back-icon {
    margin-right: 5px;
    font-size: 1.2rem;
}

.word-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    flex: 1;
    margin: 0 20px;
}

.word-stats {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
}

.stats-text {
    color: var(--primary-color);
    font-weight: 500;
}

/* 登录提示样式 */
.login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}

.prompt-card {
    text-align: center;
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 12px;
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    max-width: 400px;
    width: 100%;
}

.prompt-card h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.prompt-card p {
    color: rgba(var(--primary-color-rgb), 0.8);
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.15), rgba(var(--primary-color-rgb), 0.1));
    border: 2px solid rgba(var(--primary-color-rgb), 0.4);
    border-radius: 25px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.login-btn:hover {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.25), rgba(var(--primary-color-rgb), 0.15));
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.5);
    transform: translateY(-2px);
}

/* 单词学习主界面 */
.word-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 无单词状态 */
.no-words {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.no-words.show {
    opacity: 1;
    transform: translateY(0);
}

.empty-state {
    text-align: center;
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 2px dashed rgba(var(--primary-color-rgb), 0.3);
    border-radius: 12px;
    padding: 50px 30px;
    max-width: 500px;
    width: 100%;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.empty-state h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.empty-state p {
    color: rgba(var(--primary-color-rgb), 0.7);
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.add-words-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.15), rgba(var(--primary-color-rgb), 0.1));
    border: 2px solid rgba(var(--primary-color-rgb), 0.4);
    border-radius: 25px;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-words-btn:hover {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.25), rgba(var(--primary-color-rgb), 0.15));
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.5);
    transform: translateY(-2px);
}

.add-words-btn .button-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* 单词卡片 */
.word-card {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    /* 使用grid确保所有行有相同宽度 */
    grid-template-columns: 1fr;
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.word-card.show {
    opacity: 1;
    transform: translateY(0);
}

.word-english,
.word-chinese,
.word-example {
    background: rgba(var(--primary-color-rgb), 0.05);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(15px);
}

/* 单词卡片内部元素逐个浮现动画 */
.word-card.show .word-english {
    animation: wordItemFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

.word-card.show .word-chinese {
    animation: wordItemFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.35s forwards;
}

.word-card.show .word-example {
    animation: wordItemFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

@keyframes wordItemFadeIn {
    0% {
        opacity: 0;
        transform: translateY(25px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.word-english {
    cursor: default;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: rgba(var(--primary-color-rgb), 0.4);
    min-width: 0; /* 确保能够自然占据容器宽度 */
}

.word-chinese:hover,
.word-example:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-2px);
}

.english-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    word-break: break-word;
    width: 100%;
    margin: 0;
    padding: 0;
}

.chinese-cover,
.example-cover {
    text-align: center;
    color: rgba(var(--primary-color-rgb), 0.6);
    font-style: italic;
    font-size: 1.1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chinese-content,
.example-content {
    text-align: center;
    width: 100%;
    display: block; /* 改为block以支持自然换行 */
    padding: 0;
}

.chinese-content.hidden,
.example-content.hidden {
    display: none !important;
}

.chinese-cover.hidden,
.example-cover.hidden {
    display: none !important;
}

.chinese-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
    text-align: center;
    word-wrap: break-word;
    margin: 0;
    padding: 0;
}

.example-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
    font-style: normal;
    text-align: center;
    word-wrap: break-word;
    margin: 0;
    padding: 0;
    /* 长例句时允许容器扩展 */
    max-width: 100%;
}

/* 单词卡片头部（编辑按钮） */
.word-card-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(15px);
}

.word-card.show .word-card-header {
    animation: wordItemFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

.edit-word-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.edit-word-btn:hover {
    background: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(var(--primary-color-rgb), 0.3);
}

.edit-icon {
    font-size: 1rem;
}

/* 编辑单词模态框样式 */
.edit-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

#edit-word-form .form-group {
    margin-bottom: 20px;
}

#edit-word-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 500;
}

#edit-word-form input,
#edit-word-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb), 0.05);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#edit-word-form input:focus,
#edit-word-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.cancel-btn,
.save-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    color: var(--primary-color);
}

.cancel-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.2);
}

.save-btn {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--background-color);
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(var(--primary-color-rgb), 0.3);
}

/* 响应式调整 - 确保在移动设备上也保持宽度一致 */
@media (max-width: 768px) {
    .word-card {
        max-width: 100%;
        margin: 0 10px 40px 10px;
    }
    
    .word-english,
    .word-chinese,
    .word-example {
        padding: 20px;
    }
    
    .english-text {
        font-size: 2rem;
    }
    
    .chinese-text {
        font-size: 1.5rem;
    }
    
    .example-text {
        font-size: 1.5rem;
    }
}

/* 酷炫交互效果 */
.word-card {
    position: relative;
    perspective: 1000px;
}

.word-card.flip-animation {
    animation: cardFlip 0.6s ease-in-out;
}

@keyframes cardFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.word-english {
    position: relative;
    overflow: hidden;
}

.word-english::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-color-rgb), 0.3), transparent);
    transition: left 0.5s;
}

.word-english.shine::before {
    left: 100%;
}

/* 粒子效果容器 */
.word-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.9;
    animation: particleFloat 1.2s ease-out forwards;
    box-shadow: 0 0 4px rgba(var(--primary-color-rgb), 0.5);
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    70% {
        opacity: 0.8;
        transform: translate(var(--offset-x, 0), var(--offset-y, -80px)) scale(0.7);
    }
    100% {
        opacity: 0;
        transform: translate(var(--offset-x, 0), var(--offset-y, -120px)) scale(0.2);
    }
}

/* 成就提示动画 */
.achievement-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
    color: #000;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    z-index: 9999;
    animation: achievementPop 2s ease-out forwards;
}

@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    90% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0;
    }
}

/* 进度条动画 */
.word-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.5));
    transition: width 0.5s ease;
    z-index: 1000;
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 2s steps(40) 1s 1 normal both, blink 1s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* 操作按钮 */
.word-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s; /* 延迟0.25s显示 */
}

.word-actions.show {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid rgba(var(--primary-color-rgb), 0.4);
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--primary-color-rgb), 0.05));
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.next-btn:hover {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.2), rgba(0, 150, 255, 0.1));
    border-color: rgba(0, 150, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 150, 255, 0.4);
}

.forgot-btn:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1));
    border-color: rgba(255, 193, 7, 0.6);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.mastered-btn:hover {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(40, 167, 69, 0.1));
    border-color: rgba(40, 167, 69, 0.6);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* 通知系统 */
#notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
}

.notification {
    background: rgba(var(--background-color), 0.95);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-color: rgba(40, 167, 69, 0.6);
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.notification.error {
    border-color: rgba(220, 53, 69, 0.6);
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.notification.info {
    border-color: rgba(23, 162, 184, 0.6);
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .word-nav {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .word-title {
        font-size: 1.2rem;
        margin: 0;
        order: -1;
        width: 100%;
        text-align: center;
    }
    
    .back-link,
    .word-stats {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .word-main {
        padding: 20px 15px;
    }
    
    .english-text {
        font-size: 2rem;
    }
    
    .chinese-text {
        font-size: 1.5rem;
    }
    
    .example-text {
        font-size: 1rem;
    }
    
    .word-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 200px;
    }
    
    #notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .word-form-group input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 词汇列表相关样式 */
.word-nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vocab-list-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.vocab-list-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.2);
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-2px);
}

.vocab-list-btn .btn-icon {
    font-size: 1rem;
}

/* 词汇列表模态框样式 */
.vocab-list-content {
    max-width: 800px;
    width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vocab-title {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    text-align: center;
    font-size: 1.4rem;
}

.vocab-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 20px 0 0 20px;
    background: rgba(var(--primary-color-rgb), 0.05);
    color: var(--primary-color);
    outline: none;
    transition: all 0.3s ease;
}

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

.search-btn {
    padding: 8px 12px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-left: none;
    border-radius: 0 20px 20px 0;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.2);
}

.vocab-stats {
    color: var(--primary-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 词汇列表容器 */
.vocab-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 10px;
    background: rgba(var(--primary-color-rgb), 0.02);
}

.vocab-list-header {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.2);
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.vocab-list {
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
}

.vocab-item {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
    transition: all 0.3s ease;
    align-items: center;
}

.vocab-item:hover {
    background: rgba(var(--primary-color-rgb), 0.05);
}

.vocab-english {
    font-weight: 500;
    color: var(--primary-color);
    word-break: break-word;
}

.vocab-chinese {
    color: var(--primary-color);
    opacity: 0.8;
    word-break: break-word;
}

.vocab-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.vocab-action-btn {
    padding: 4px 8px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 15px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.vocab-action-btn:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
    transform: translateY(-1px);
}

.vocab-action-btn.edit-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.vocab-action-btn.delete-btn:hover {
    border-color: #f44336;
    color: #f44336;
    box-shadow: 0 0 5px rgba(244, 67, 54, 0.3);
}

/* 加载和空状态 */
.vocab-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--primary-color);
    opacity: 0.6;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vocab-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--primary-color);
    opacity: 0.6;
}

.vocab-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .word-nav-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }
    
    .vocab-list-content {
        width: 95vw;
        max-height: 85vh;
    }
    
    .vocab-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-box {
        max-width: none;
    }
    
    .vocab-list-header,
    .vocab-item {
        grid-template-columns: 1fr 1fr 80px;
        font-size: 0.85rem;
    }
    
    .vocab-actions {
        flex-direction: column;
        gap: 3px;
    }
    
    .vocab-action-btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}



