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

:root {
    --primary-color: #00ff41;
    --primary-color-rgb: 0, 255, 65;
    --secondary-color: #ff00c1;
    --secondary-color-rgb: 255, 0, 193;
    --background-color: #0d0208;
    --glow-color: rgba(0, 255, 65, 0.75);
    --font-family: 'Roboto Mono', monospace;
}

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

body {
    background-color: var(--background-color);
    background: radial-gradient(ellipse at center, #1a0817 0%, #0d0208 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);
}

/* --- EVOLUTION VISUAL FEEDBACK --- */
#evolution-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#evolution-overlay.hidden {
    opacity: 0;
}

body.system-evolving #evolution-overlay {
    opacity: 1;
    box-shadow: inset 0 0 25px 8px var(--secondary-color);
    animation: pulse-border 2s infinite alternate;
}

@keyframes pulse-border {
    from {
        box-shadow: inset 0 0 20px 5px rgba(255, 0, 193, 0.5);
    }
    to {
        box-shadow: inset 0 0 30px 10px rgba(255, 0, 193, 1);
    }
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.5s 0.5s ease-out, visibility 0.5s 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content .glitch-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#preloader-ascii {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--glow-color);
    margin-bottom: 20px;
    font-size: 0.8rem;
    line-height: 1.1;
    opacity: 0;
    animation: text-flicker 3s linear infinite, fade-in 2s ease forwards;
}

@keyframes text-flicker {
    0%, 19.9%, 22%, 62.9%, 64%, 64.9%, 70%, 100% {
        opacity: 0.99;
    }
    20%, 21.9%, 63%, 63.9%, 65%, 69.9% {
        opacity: 0.4;
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preloader-content span {
    font-family: var(--font-family);
    color: var(--primary-color);
    letter-spacing: 3px;
    animation: pulse 1.5s infinite;
}

/* --- 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;
}

#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 CONTAINER --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
    opacity: 0; /* Initially hidden, revealed by JS */
    transition: opacity 1s ease 0.5s;
}

.container.visible {
    opacity: 1;
}

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

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
    flex-wrap: wrap;
}

.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;
}

.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;
}


.boot-text {
    min-height: 150px;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(var(--primary-color-rgb), 0.9);
    margin: 20px 0 10px 0;
    white-space: pre-wrap;
    transition: opacity 0.5s ease;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 2px var(--primary-color);
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

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

.boot-progress {
    width: 100%;
    height: 2px;
    background: transparent;
    border: none;
    margin-top: 10px;
    margin-bottom: 20px;
    transition: opacity 0.5s ease;
    position: relative;
    overflow: hidden;
}

#boot-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color));
    box-shadow: 0 0 5px var(--glow-color), 0 0 10px var(--glow-color);
    transition: width 0.5s ease-out;
    border-radius: 2px;
    animation: progress-glow 2s ease-in-out infinite;
}

@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, .auto-evolution-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="email"], 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="email"]: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="email"]::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: #555;
    border-color: #555;
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
    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 */
    -webkit-box-orient: vertical;
}

.history-item.expanded .history-prompt-text {
    -webkit-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;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateX(120px);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fab-container.visible {
    transform: translateX(0);
}

.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;
    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);
}

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

.fab-container.visible #fab-monitor {
    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 svg {
    width: 28px;
    height: 28px;
}


/* --- 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;
    }
}

/* --- 自动进化监控面板样式 --- */
.auto-evolution-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(13, 2, 8, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px var(--glow-color);
    z-index: 10;
    min-width: 300px;
    max-width: 400px;
    font-family: var(--font-family);
    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;
    opacity: 0;
    visibility: hidden;
    transform: perspective(1500px) scale(0.95) rotateX(-15deg);
    transform-origin: top right;
    pointer-events: none;
    overflow: hidden;
}

.auto-evolution-panel.panel-active {
    z-index: 12;
}

.auto-evolution-panel.panel-active.visible {
    transform: perspective(1500px) scale(1.02) rotateX(0);
    box-shadow: 0 0 35px var(--glow-color);
}

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

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

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

.auto-evolution-panel .panel-title {
    font-weight: bold;
    font-size: 14px;
}

.auto-evolution-panel .panel-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.auto-evolution-panel .panel-toggle:hover {
    transform: scale(1.1);
}

.auto-evolution-panel .panel-content {
    padding: 15px;
    background: rgba(13, 2, 8, 0.98);
    border-radius: 0 0 6px 6px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* 状态部分 */
.status-section {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 5px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    transition: background-color 0.3s, border-color 0.3s;
}

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.status-row:last-child {
    margin-bottom: 0;
}

.status-label {
    color: var(--primary-color);
    opacity: 0.8;
    transition: color 0.3s;
}

.status-value {
    font-weight: bold;
}

.status-value.running {
    color: #4ecdc4;
    text-shadow: 0 0 5px #4ecdc4;
}

.status-value.enabled {
    color: #f39c12;
    text-shadow: 0 0 5px #f39c12;
}

.status-value.disabled {
    color: #e74c3c;
    opacity: 0.7;
}

/* 控制按钮部分 */
.control-section {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auto-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.auto-btn:hover:not(:disabled) {
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-1px);
}

.auto-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 日志部分 */
.logs-section {
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.3);
    padding-top: 15px;
    transition: border-color 0.3s;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: bold;
    transition: color 0.3s;
}

.refresh-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

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

.logs-container {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 3px;
    padding: 8px;
    transition: border-color 0.3s;
}

.log-entry {
    font-size: 10px;
    margin-bottom: 4px;
    padding: 2px 4px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    line-height: 1.3;
    word-break: break-all;
}

.log-entry:last-child {
    margin-bottom: 0;
}

.log-error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
}

.log-warn {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border-left: 3px solid #f39c12;
}

.log-info {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    border-left: 3px solid #4ecdc4;
}

.log-debug {
    background: rgba(155, 155, 155, 0.1);
    color: #9b9b9b;
    border-left: 3px solid #9b9b9b;
}

.logs-loading, .logs-empty, .logs-error {
    text-align: center;
    color: var(--primary-color);
    opacity: 0.7;
    font-size: 11px;
    padding: 20px;
    transition: color 0.3s;
}

.logs-error {
    color: #e74c3c;
}

/* 消息提示样式 */
.auto-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(13, 2, 8, 0.95);
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    z-index: 10000;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    text-align: center;
}

.auto-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.auto-message-success {
    border-color: #4ecdc4;
    color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
}

.auto-message-error {
    border-color: #e74c3c;
    color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

.auto-message-info {
    border-color: #f39c12;
    color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

/* --- 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;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .auto-evolution-panel {
        position: fixed;
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .logs-container {
        max-height: 150px;
    }
    
    .auto-message {
        left: 10px;
        right: 10px;
        transform: translateY(-100px);
        max-width: none;
    }
    
    .auto-message.show {
        transform: translateY(0);
    }
}

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

/* 模态框样式 */
.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: 25px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    gap: 20px; /* 调整间距 */
    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; /* 调整上外边距 */
}

/* 隐藏状态 */
.user-welcome.hidden {
    display: 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;
}

.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: 400px; /* 调整最大宽度 */
}

.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);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.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;
    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;
}

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

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

.personal-notes.hidden {
    display: 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;
    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: vertical;
    transition: all 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);
}

/* 登录提示 */
.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;
}

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

/* 快速添加区域 */
.quick-add-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.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;
}

.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);
}

/* 搜索区域 */
.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);
}

.quick-actions-btn {
    background: rgba(138, 43, 226, 0.1);
    color: #8A2BE2;
    border: 1px solid #8A2BE2;
    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;
}

.quick-actions-btn:hover {
    background: #8A2BE2;
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.quick-actions-btn.active {
    background: #8A2BE2;
    color: var(--background-color);
}

/* 快捷操作面板样式 */
.quick-actions-panel {
    margin-bottom: 20px;
    background: rgba(138, 43, 226, 0.05);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.quick-actions-panel.hidden {
    display: none;
}

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

.quick-actions-header h3 {
    color: #8A2BE2;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-panel-btn {
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid #8A2BE2;
    border-radius: 50%;
    color: #8A2BE2;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel-btn:hover {
    background: #8A2BE2;
    color: var(--background-color);
    transform: rotate(90deg);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: rgba(var(--background-color-rgb), 0.3);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    color: #8A2BE2;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    font-size: 0.85rem;
}

.quick-action-item:hover {
    background: rgba(138, 43, 226, 0.1);
    border-color: #8A2BE2;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.2);
}

.action-icon {
    font-size: 1.5rem;
    display: block;
}

.action-text {
    font-weight: 600;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-action-item {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    .action-icon {
        font-size: 1.3rem;
    }
}

/* 内容区域头部 */
.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;
}

.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;
}

.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;
}

.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;
}

.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;
}

.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);
}

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

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

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

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.shortcut-item 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;
}

.shortcut-item span {
    flex: 1;
    color: rgba(var(--primary-color-rgb), 0.8);
    font-size: 0.9rem;
}

.shortcut-tip {
    color: rgba(var(--primary-color-rgb), 0.6);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 5px 0;
}

.shortcut-tip kbd {
    background: rgba(var(--secondary-color-rgb), 0.1);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

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

/* 淡入淡出动画 */
@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;
    }
}

