/* 编程助手 - 简约白色调样式表 */

/* === CSS变量定义 === */
:root {
    /* 明亮模式颜色 */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --text-inverse: #ffffff;
    --border-color: #dee2e6;
    --border-focus: #80bdff;
    --btn-primary-bg: #007bff;
    --btn-primary-hover: #0056b3;
    --btn-secondary-bg: #6c757d;
    --btn-secondary-hover: #5a6268;
    --btn-info-bg: #17a2b8;
    --btn-info-hover: #138496;
    --btn-warning-bg: #ffc107;
    --btn-warning-hover: #e0a800;
    --btn-danger-bg: #dc3545;
    --btn-danger-hover: #c82333;
    --btn-success-bg: #28a745;
    --btn-success-hover: #218838;
    --code-bg: #f8f9fa;
    --input-bg: #ffffff;
    --nav-active-bg: #007bff;
    --nav-active-color: #ffffff;
    --nav-hover-bg: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --header-bg: #ffffff;
}

/* 暗黑模式颜色 */
[data-theme="dark"] {
    --bg-primary: #212529;
    --bg-secondary: #343a40;
    --bg-tertiary: #495057;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-inverse: #212529;
    --border-color: #495057;
    --border-focus: #4dabf7;
    --btn-primary-bg: #0d6efd;
    --btn-primary-hover: #0b5ed7;
    --btn-secondary-bg: #6c757d;
    --btn-secondary-hover: #5c636a;
    --btn-info-bg: #0dcaf0;
    --btn-info-hover: #3dd5f3;
    --btn-warning-bg: #ffc107;
    --btn-warning-hover: #ffcd39;
    --btn-danger-bg: #dc3545;
    --btn-danger-hover: #b02a37;
    --btn-success-bg: #28a745;
    --btn-success-hover: #20c997;
    --code-bg: #495057;
    --input-bg: #495057;
    --nav-active-bg: #0d6efd;
    --nav-active-color: #ffffff;
    --nav-hover-bg: #495057;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --header-bg: #343a40;
}

/* ================================
   广告条样式
   ================================ */

.ad-banner {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 14px;
}

.ad-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.ad-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ad-item i {
    font-size: 16px;
    color: #ffd700;
}

.ad-item a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ad-item a:hover {
    color: #ffed4e;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.qq-group {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #ffd700;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.qq-group:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.ad-divider {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    margin: 0 5px;
}

/* 暗黑模式广告条适配 */
[data-theme="dark"] .ad-banner {
    background: linear-gradient(90deg, #4c6ef5 0%, #845adf 100%);
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ad-banner {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .ad-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .ad-divider {
        display: none;
    }
    
    .ad-item {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 容器布局 */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部样式 */
header {
    background: var(--header-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    text-align: left;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    font-weight: 600;
}

header h1 i {
    color: #007bff;
}

header p {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 400;
}

/* 导航按钮样式 */
.tool-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 0 4px;
}

.nav-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 500;
    text-align: center;
}

.nav-btn:hover {
    background: var(--nav-hover-bg);
    border-color: var(--btn-primary-bg);
    color: var(--btn-primary-bg);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px var(--shadow-hover);
}

.nav-btn.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
    border-color: var(--nav-active-bg);
    box-shadow: 0 3px 8px var(--shadow-hover);
    transform: translateY(-1px);
}

.nav-btn.active:hover {
    background: var(--btn-primary-hover);
    border-color: var(--btn-primary-hover);
}

/* 主内容区域 */
.tools-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
    min-height: 700px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 工具面板 */
.tool-panel {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tool-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* 工具头部 */
.tool-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.tool-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.tool-header h2 i {
    color: #007bff;
    font-size: 1.6rem;
}

.tool-header p {
    color: #6c757d;
    font-size: 1rem;
    margin-left: 2.8rem;
}

/* 工具内容布局 */
.tool-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: 500px;
}

/* 上下布局（垂直布局）*/
.tool-content.vertical-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 0.3rem;
}

.tool-content.vertical-layout .input-section {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.3rem;
}

.tool-content.vertical-layout .output-section {
    padding-left: 0;
    padding-top: 0.1rem;
}

.input-section, .output-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-section {
    border-right: 2px solid #e9ecef;
    padding-right: 1.5rem;
}

.output-section {
    padding-left: 0.8rem;
}

/* 控制组样式 */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.control-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

/* 输入框和下拉选择框统一样式 */
.control-group input,
.control-group select,
.control-group textarea,
input[type="text"],
input[type="number"],
select,
textarea {
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #ffffff;
    color: #495057;
    transition: all 0.2s ease;
    width: 100%;
}

.control-group input:focus,
.control-group select:focus,
.control-group textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 下拉选择框特殊样式 */
select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    padding-right: 30px;
    position: relative;
}

/* 移除所有浏览器的默认箭头 */
select::-ms-expand {
    display: none;
}

select::-webkit-outer-spin-button,
select::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 自定义下拉箭头容器 */
.control-group {
    position: relative;
}

.control-group select {
    width: 100%;
}

/* 使用伪元素创建箭头 */
.control-group:has(select)::after {
    content: "▼";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 12px;
    z-index: 1;
}

/* 兼容不支持:has()的浏览器 */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 12px;
    z-index: 1;
}

.select-wrapper select {
    width: 100%;
    padding-right: 30px;
}

/* 文本域样式 */
.control-group textarea,
textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary,
.btn-info,
.btn-warning,
.btn-danger,
.btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px var(--shadow-hover);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-inverse);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-1px);
}

.btn-info {
    background: var(--btn-info-bg);
    color: var(--text-inverse);
}

.btn-info:hover {
    background: var(--btn-info-hover);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--btn-warning-bg);
    color: var(--text-inverse);
}

.btn-warning:hover {
    background: var(--btn-warning-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--btn-danger-bg);
    color: var(--text-inverse);
}

.btn-danger:hover {
    background: var(--btn-danger-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--btn-success-bg);
    color: var(--text-inverse);
}

.btn-success:hover {
    background: var(--btn-success-hover);
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 结果框样式 */
.result-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #495057;
    resize: vertical;
    min-height: 150px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.result-box:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 代码高亮显示 */
.highlighted-code {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow-x: auto;
    min-height: 150px;
}

.highlighted-code pre {
    margin: 0;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* JSON树形显示 */
.json-tree-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.json-tree {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.json-node {
    margin: 2px 0;
    cursor: pointer;
    user-select: none;
}

.json-key {
    color: #0066cc;
    font-weight: 500;
    margin-right: 8px;
}

.json-key:hover {
    background: rgba(0, 102, 204, 0.1);
    border-radius: 3px;
}

.json-value {
    margin-left: 4px;
}

.json-string {
    color: #008000;
}

.json-number {
    color: #ff6600;
}

.json-boolean {
    color: #cc00cc;
    font-weight: 500;
}

.json-null {
    color: #999999;
    font-style: italic;
}

.json-children {
    margin-left: 20px;
    border-left: 1px solid #dee2e6;
    padding-left: 12px;
}

.json-count {
    color: #6c757d;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* JavaScript测试器样式 */
.js-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.js-output-container {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    height: 400px;
}

.js-output-section,
.js-console-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    overflow-y: auto;
}

.js-output-section h4,
.js-console-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.js-output,
.js-console {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
}

.js-result {
    color: #28a745;
}

.js-log {
    color: #495057;
    margin: 2px 0;
}

.js-error {
    color: #dc3545;
    font-weight: 500;
}

.js-warn {
    color: #ffc107;
}

.js-info {
    color: #17a2b8;
}

/* 正则表达式匹配结果 */
.matches-summary {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 1rem;
    color: #155724;
}

.no-matches {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 1rem;
    color: #721c24;
}

.match-item {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-index {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.match-text {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    flex: 1;
    word-break: break-all;
}

/* HTTP响应显示 - 优化版 */
.http-response {
    display: grid;
    gap: 1.2rem;
    font-size: 0.9rem;
}

.response-status {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.response-status h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.response-status h4::before {
    content: "📊";
    font-size: 1.2rem;
}

.response-status p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-2xx {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-3xx {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-4xx {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-5xx {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.response-headers {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.response-headers h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.response-headers h4::before {
    content: "📋";
    font-size: 1.2rem;
}

.headers-display {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.headers-display div {
    margin: 4px 0;
    padding: 6px 8px;
    border-radius: 4px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.headers-display div:hover {
    background-color: #f8f9fa;
}

.headers-display div:last-child {
    border-bottom: none;
}

.headers-display strong {
    color: #007bff;
    min-width: 150px;
    display: inline-block;
}

.response-body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.response-body h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.response-body h4::before {
    content: "📄";
    font-size: 1.2rem;
}

.response-body pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    margin: 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* HTTP请求结果的响应时间和状态码样式增强 */
.response-status p strong {
    color: #6c757d;
    font-weight: 600;
    min-width: 100px;
    display: inline-block;
}

/* 空状态样式 - 适用于所有工具 */
#http-result .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin: 0;
    padding: 40px 20px;
}

#http-result .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #007bff;
    opacity: 0.6;
}

#http-result .empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #495057;
}

#http-result .empty-state p {
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
    max-width: 300px;
}

/* 思维导图全新样式系统 */
.mindmap-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: 800px;
}

/* 控制面板 */
.mindmap-controls-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.control-section {
    margin-bottom: 24px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.control-section h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-section h4 i {
    color: #007bff;
}

/* 控制网格布局 */
.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 模板按钮网格 */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.template-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.template-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,123,255,0.4);
}

.template-btn i {
    font-size: 16px;
    margin-bottom: 4px;
}

/* 输入工具栏 */
.input-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 思维导图文本区域 */
.mindmap-textarea {
    width: 100%;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.mindmap-textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* 操作按钮组 */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mindmap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mindmap-btn i {
    font-size: 14px;
}

/* 思维导图显示区域 */
.mindmap-display-area {
    position: relative;
    background: white;
    border-radius: 16px;
    border: 1px solid #dee2e6;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.mindmap-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 欢迎界面 */
.mindmap-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: center;
    padding: 40px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.welcome-icon i {
    font-size: 32px;
    color: white;
}

.mindmap-welcome h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mindmap-welcome p {
    margin: 0 0 32px 0;
    font-size: 16px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 功能亮点 */
.feature-highlights {
    display: flex;
    gap: 32px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    opacity: 0.8;
}

.feature-item i {
    font-size: 20px;
    color: #ffd700;
}

/* 浮动工具栏 */
.mindmap-floating-toolbar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 100;
}

.toolbar-group {
    display: flex;
    gap: 4px;
}

.toolbar-separator {
    width: 1px;
    background: #dee2e6;
    margin: 4px 4px;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.toolbar-btn:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* 缩放指示器 */
.zoom-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* SVG 思维导图样式 */
.mindmap-svg {
    width: 100%;
    height: 100%;
    cursor: grab;
    background: transparent;
}

.mindmap-svg:active {
    cursor: grabbing;
}

/* 节点样式 */
.mindmap-node {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(3px 3px 8px rgba(0,0,0,0.15));
}

.mindmap-node:hover {
    transform: scale(1.1);
    filter: drop-shadow(5px 5px 15px rgba(0,0,0,0.25));
}

.mindmap-node circle {
    stroke-width: 3px;
    transition: all 0.3s ease;
}

.mindmap-node text {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 不同主题的节点样式 */
.theme-modern .mindmap-node.level-0 circle { fill: #007bff; stroke: #0056b3; }
.theme-modern .mindmap-node.level-1 circle { fill: #28a745; stroke: #1e7e34; }
.theme-modern .mindmap-node.level-2 circle { fill: #ffc107; stroke: #e0a800; }
.theme-modern .mindmap-node.level-3 circle { fill: #dc3545; stroke: #c82333; }

.theme-nature .mindmap-node.level-0 circle { fill: #2d5a27; stroke: #1e3a1c; }
.theme-nature .mindmap-node.level-1 circle { fill: #5cb85c; stroke: #449d44; }
.theme-nature .mindmap-node.level-2 circle { fill: #8fbc8f; stroke: #7aa67a; }
.theme-nature .mindmap-node.level-3 circle { fill: #90ee90; stroke: #7dd87d; }

.theme-sunset .mindmap-node.level-0 circle { fill: #ff6b35; stroke: #e55a2b; }
.theme-sunset .mindmap-node.level-1 circle { fill: #f7931e; stroke: #de831b; }
.theme-sunset .mindmap-node.level-2 circle { fill: #ffd23f; stroke: #e6bd39; }
.theme-sunset .mindmap-node.level-3 circle { fill: #ff8c42; stroke: #e57d3c; }

/* 连接线样式 */
.mindmap-link {
    fill: none;
    stroke-width: 2px;
    stroke-opacity: 0.8;
    transition: all 0.3s ease;
}

.mindmap-link:hover {
    stroke-width: 3px;
    stroke-opacity: 1;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade .mindmap-node {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-bounce .mindmap-node {
    animation: bounceIn 0.8s ease-out forwards;
}

.animate-slide .mindmap-node {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .mindmap-layout {
        grid-template-columns: 350px 1fr;
        height: 700px;
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .mindmap-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
    }
    
    .mindmap-controls-panel {
        height: auto;
        max-height: 400px;
    }
    
    .mindmap-display-area {
        height: 600px;
    }
}

.response-body {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
}

.response-body h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 0.9rem;
}

.response-body pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    margin: 0;
}

/* 网页分析显示 */
.webpage-analysis {
    display: grid;
    gap: 1rem;
}

.basic-info,
.meta-info,
.tag-counts {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
}

.basic-info h4,
.meta-info h4,
.tag-counts h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 0.9rem;
}

.tag-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.tag-count {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    text-align: center;
    font-size: 0.85rem;
}

.links-list,
.images-list {
    max-height: 200px;
    overflow-y: auto;
}

.link-item,
.image-item {
    padding: 4px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.link-item a {
    color: #007bff;
    text-decoration: none;
}

.link-item a:hover {
    text-decoration: underline;
}

.more-items {
    text-align: center;
    padding: 8px;
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
}

/* ===== 颜色工具 ===== */

/* 颜色部分 */
.color-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.color-section h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-section h3 i {
    color: #007bff;
}

/* 颜色选择器容器 */
.color-picker-container {
    display: flex;
    justify-content: center;
}

.color-picker-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-picker-group input[type="color"] {
    width: 80px;
    height: 80px;
    border: 3px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.color-picker-group input[type="color"]:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.color-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.color-preview:hover {
    transform: scale(1.1);
}

.color-info input {
    text-align: center;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    width: 120px;
}

/* 颜色格式显示 */
.color-formats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.format-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.format-group label {
    min-width: 50px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.format-group input {
    flex: 1;
    font-family: 'Consolas', 'Monaco', monospace;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    margin: 0;
}

.copy-btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* 调色板控制 */
.palette-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.palette-controls select {
    min-width: 150px;
}

/* 调色板显示 */
.palette-display {
    margin-top: 1rem;
}

.generated-palette {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.palette-color {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.palette-color:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.palette-color .color-code {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'Consolas', 'Monaco', monospace;
    margin-bottom: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.palette-color:hover .color-code {
    opacity: 1;
}

/* 配色表 */
.color-collections {
    margin-top: 1rem;
}

.collection-category {
    margin-bottom: 1.5rem;
}

.collection-category h4 {
    margin: 0 0 0.8rem 0;
    color: #495057;
    font-size: 1rem;
    padding-left: 8px;
    border-left: 4px solid #007bff;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.color-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-item:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    z-index: 10;
}

.color-item.gradient {
    background-size: 100% 100%;
}

/* 工具提示 */
.color-item::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.color-item:hover::after {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .color-picker-group {
        flex-direction: column;
        text-align: center;
    }
    
    .color-formats {
        grid-template-columns: 1fr;
    }
    
    .format-group {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    
    .format-group label {
        min-width: auto;
        text-align: center;
    }
    
    .palette-controls {
        flex-direction: column;
    }
    
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .color-item,
    .palette-color {
        width: 60px;
        height: 60px;
    }
}

/* 颜色拾取器显示 - 兼容原有屏幕取色工具 */
.track-status {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin-top: 1rem;
    color: #155724;
    text-align: center;
    font-weight: 500;
}

/* 模态对话框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
    color: #495057;
    line-height: 1.6;
}

.details-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item strong {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

.detail-section {
    margin-top: 1rem;
}

.detail-section h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.cmdline {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    word-wrap: break-word;
    white-space: pre-wrap;
    border: 1px solid #dee2e6;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }

    .tool-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .input-section {
        border-right: none;
        padding-right: 0;
        border-bottom: 2px solid #e9ecef;
        padding-bottom: 1.5rem;
    }

    .output-section {
        padding-left: 0;
        padding-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 8px;
    }

    header p {
        font-size: 1rem;
    }

    .tool-nav {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }

    .nav-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .tools-container {
        padding: 1.5rem;
    }

    .tool-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tool-header p {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .control-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-info,
    .btn-warning,
    .btn-danger {
        justify-content: center;
    }

    .color-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .details-grid {
        gap: 0.5rem;
    }

    .detail-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .detail-item strong {
        font-size: 0.85rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8b2b8;
}

/* 额外的交互效果 */
.result-box:hover {
    border-color: #007bff;
}

.nav-btn i {
    transition: transform 0.2s ease;
}

.tool-header h2 i {
    transition: transform 0.2s ease;
}

/* 思维导图增强样式 */
.mindmap-node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.mindmap-node circle {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.mindmap-node:hover circle {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transform: scale(1.05);
}

.mindmap-node text {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.mindmap-node:hover text {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

/* 工具提示增强样式 */
#mindmap-tooltip {
    position: fixed !important;
    background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(40,40,40,0.95)) !important;
    color: white !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    pointer-events: none !important;
    z-index: 10000 !important;
    max-width: 300px !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(10px) !important;
    transform: translateY(-10px) !important;
    opacity: 0 !important;
    animation: tooltipFadeIn 0.2s ease forwards !important;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SVG连接线动画 */
@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.mindmap-link {
    animation: drawLine 0.8s ease-out forwards;
}

/* 多行文本样式优化 */
.mindmap-node tspan {
    dominant-baseline: middle;
}

/* 节点大小自适应样式 */
.mindmap-canvas .mindmap-node {
    transform-origin: center;
}

/* 节点悬停时的边框动画 */
.mindmap-node circle {
    stroke-dasharray: 0;
    transition: stroke-dasharray 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease;
}

.mindmap-node:hover circle {
    stroke-dasharray: 0;
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% {
        stroke-opacity: 1;
    }
    50% {
        stroke-opacity: 0.7;
    }
}

/* 思维导图画布优化 */
.mindmap-canvas svg {
    overflow: visible;
    cursor: grab;
}

.mindmap-canvas svg.dragging {
    cursor: grabbing;
}

/* 节点文本选择禁用 */
.mindmap-node text {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 响应式节点大小 */
@media (max-width: 768px) {
    .mindmap-node text {
        font-size: 10px;
    }
    
    #mindmap-tooltip {
        font-size: 11px !important;
        max-width: 250px !important;
        padding: 8px 12px !important;
    }
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-group .btn-primary,
.button-group .btn-secondary {
    flex: 1;
    min-width: 120px;
}

/* 打印样式 */
@media print {
    body {
        background: white !important;
    }

    .tool-nav,
    .modal-overlay,
    .btn-primary,
    .btn-secondary,
    .btn-info,
    .btn-warning,
    .btn-danger {
        display: none !important;
    }

    .tools-container {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    #mindmap-tooltip {
        display: none !important;
    }
    
    .mindmap-node {
        transition: none !important;
    }
    
    .mindmap-node circle {
        filter: none !important;
        animation: none !important;
    }
}

/* === Toast消息样式 === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.toast-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.toast-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.toast-info {
    background: linear-gradient(135deg, #17a2b8, #007bff);
}

/* === 加载状态样式 === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

/* === 模态框基础样式 === */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    backdrop-filter: blur(3px);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .toast {
        right: 10px;
        top: 10px;
        max-width: calc(100vw - 20px);
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .loading-content {
        margin: 20px;
        padding: 25px 20px;
        max-width: calc(100vw - 40px);
    }
    
    .loading-spinner {
        width: 35px;
        height: 35px;
        border-width: 3px;
    }
}

/* === 屏幕取色增强样式 === */
.color-info {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.color-preview-section {
    text-align: center;
    margin-bottom: 25px;
}

.color-preview-large {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 0 auto 15px;
    position: relative;
}

.color-preview-large::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ccc 0%, #fff 50%, #ccc 100%);
    border-radius: 10px;
    z-index: -1;
}

.color-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.color-value-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.color-value-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.color-value:hover {
    background: #fff;
    color: #007bff;
}

.track-status {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    margin: 15px 0;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(23, 162, 184, 0.3);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(23, 162, 184, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 4px 20px rgba(23, 162, 184, 0.4);
    }
}

/* === 颜色工具完整扩展样式 === */

/* 颜色区域分组 */
.color-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.color-section h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-section h3 i {
    color: #007bff;
}

/* 颜色选择器增强 */
#color-picker {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

#color-picker:hover {
    transform: scale(1.05);
}

.color-picker-group {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.color-display {
    flex: 1;
    min-width: 300px;
}

.color-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.color-format {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
}

.color-format:hover {
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.format-label {
    display: block;
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    word-break: break-all;
}

.format-value:hover {
    color: #007bff;
}

.color-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* 调色板样式 */
.palette-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.palette-display {
    min-height: 120px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 15px;
}

.palette-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.palette-color {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.palette-color:hover {
    transform: translateY(-2px);
}

.palette-color-swatch {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #ddd;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.palette-color:hover .palette-color-swatch {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-color: #007bff;
}

.palette-color-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* 配色表样式 */
.color-collections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.collection-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.collection-tab {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.collection-tab:hover {
    border-color: #007bff;
    color: #007bff;
}

.collection-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.collection-display {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 20px;
    min-height: 150px;
}

.collection-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.collection-color {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.collection-color:hover {
    transform: translateY(-2px);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.collection-color-swatch {
    width: 100%;
    height: 50px;
    border-radius: 6px;
    border: 2px solid #ddd;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.collection-color-name {
    font-size: 12px;
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.collection-color-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

/* 屏幕取色容器样式 */
.screen-picker-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === ICO图标工具样式 === */

/* ICO区域分组 */
.ico-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.ico-section h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ico-section h3 i {
    color: #007bff;
}

/* 上传区域样式 */
.upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.upload-area.dragover {
    border-color: #28a745;
    background: #f0fff4;
}

.upload-content i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
    display: block;
}

.upload-content p {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

.upload-hint {
    color: #6c757d !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* 尺寸选项样式 */
.ico-options {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.size-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.size-option:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.size-option input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.size-option input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: 600;
}

/* 自定义ICO容器 */
.custom-ico-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-options {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.icon-options {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* 预览容器样式 */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#icon-canvas {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-sizes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.size-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.size-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.size-preview canvas {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

.size-preview span {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.download-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-info {
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.download-info p {
    margin: 0;
    color: #495057;
    font-size: 14px;
}

.download-info i {
    color: #007bff;
    margin-right: 8px;
}

/* 图片预览样式 */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 模板库样式 */
.template-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.template-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.template-item {
    aspect-ratio: 1;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.template-item:hover {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.template-item canvas {
    max-width: 100%;
    max-height: 100%;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .preview-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .size-options {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .preview-sizes {
        gap: 10px;
    }
    
    .size-preview {
        padding: 8px;
    }
    
    .template-content {
        margin: 20px;
        padding: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .ico-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .ico-section h3 {
        font-size: 16px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-content i {
        font-size: 36px;
    }
    
    .upload-content p {
        font-size: 14px;
    }
    
    .custom-options,
    .ico-options {
        padding: 15px;
    }
    
    #icon-canvas {
        width: 96px;
        height: 96px;
    }
    
    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .color-values-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .color-value-item {
        padding: 10px 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .color-preview-large {
        width: 100px !important;
        height: 100px !important;
    }
    
    .color-picker-group {
        flex-direction: column;
        align-items: center;
    }
    
    .color-display {
        min-width: auto;
        width: 100%;
    }
    
    .color-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .collection-tabs {
        justify-content: center;
    }
    
    .collection-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .collection-colors {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .palette-colors {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .color-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .color-section h3 {
        font-size: 16px;
    }
    
    #color-picker {
        width: 60px;
        height: 60px;
    }
}

/* 拖拽上传增强样式 */
.upload-area.dragover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
    transform: scale(1.02);
}

.upload-area input[type="file"] {
    display: none;
}

/* 转换按钮样式 */
#convert-btn:disabled,
#download-btn:disabled,
#download-png-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 图标类型选择增强 */
.icon-type-select {
    margin-bottom: 20px;
}

/* 自定义输入样式优化 */
.custom-options .control-group input {
    transition: all 0.3s ease;
}

.custom-options .control-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 全能计算器样式 */
.calculator-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.calc-tab {
    padding: 12px 16px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.calc-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.calc-tab.active {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

.calc-panel {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.calc-panel.active {
    display: block;
}

/* 基础计算器样式 */
.calculator-container {
    max-width: 400px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.calc-display {
    background: #212529;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
}

.calc-screen {
    width: 100%;
    border: none;
    background: transparent;
    color: white;
    font-size: 32px;
    font-weight: 300;
    text-align: right;
    outline: none;
    font-family: 'Courier New', monospace;
}

.calc-history {
    color: #6c757d;
    font-size: 14px;
    min-height: 20px;
    margin-bottom: 10px;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    height: 60px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-number {
    background: white;
    color: #333;
}

.calc-operator {
    background: #ffc107;
    color: white;
}

.calc-clear {
    background: #dc3545;
    color: white;
}

.calc-equals {
    background: #007bff;
    color: white;
    grid-column: span 2;
}

.calc-zero {
    grid-column: span 2;
}

/* 计算结果样式 */
.calc-result {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-height: 60px;
    font-size: 16px;
}

.calc-result.has-result {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.calc-result.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* 科学计算器样式 */
.scientific-calculator {
    max-width: 600px;
    margin: 0 auto;
}

.scientific-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.scientific-buttons .calc-btn {
    height: 50px;
    font-size: 14px;
    background: #e9ecef;
    color: #333;
}

.scientific-buttons .calc-btn:hover {
    background: #dee2e6;
}

.expression-input {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.expression-field {
    width: calc(100% - 120px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin-right: 10px;
}

/* 时间计算器样式 */
.time-calculator {
    max-width: 800px;
    margin: 0 auto;
}

.time-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.time-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-inputs,
.time-math,
.workday-calc {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    align-items: end;
}

.time-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-input,
.time-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.time-duration {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.time-duration input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* 汇率换算器样式 */
.currency-calculator {
    max-width: 800px;
    margin: 0 auto;
}

.currency-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #28a745;
}

.currency-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.currency-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto 2fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.currency-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.currency-input,
.currency-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.swap-btn {
    padding: 12px;
    border: none;
    background: #ffc107;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.swap-btn:hover {
    background: #e0a800;
    transform: scale(1.05);
}

.popular-rates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.rate-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.rate-pair {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.rate-value {
    font-size: 18px;
    color: #007bff;
}

.rate-change {
    font-size: 12px;
    margin-top: 5px;
}

.rate-change.positive {
    color: #28a745;
}

.rate-change.negative {
    color: #dc3545;
}

.rate-info {
    margin-top: 15px;
    padding: 12px;
    background: #e7f3ff;
    border-radius: 8px;
    font-size: 14px;
    color: #0c5460;
}

.rate-loading {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

/* 单位转换器样式 */
.unit-calculator {
    max-width: 800px;
    margin: 0 auto;
}

.unit-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #6f42c1;
}

.unit-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-converter {
    display: grid;
    gap: 15px;
}

.unit-type-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-conversion {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.unit-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.unit-input,
.unit-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.conversion-table {
    overflow-x: auto;
}

.conversion-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.conversion-table th,
.conversion-table td {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.conversion-table th {
    background: #e9ecef;
    font-weight: 500;
}

/* 财务计算器样式 */
.finance-calculator {
    max-width: 800px;
    margin: 0 auto;
}

.finance-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #fd7e14;
}

.finance-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.finance-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.finance-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.finance-input,
.finance-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
    }
    
    .calc-tab {
        flex-shrink: 0;
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .currency-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .time-inputs,
    .time-math,
    .workday-calc {
        grid-template-columns: 1fr;
    }
    
    .unit-conversion {
        grid-template-columns: 1fr;
    }
    
    .finance-inputs {
        grid-template-columns: 1fr;
    }
    
    .calculator-container {
        padding: 15px;
    }
    
    .calc-screen {
        font-size: 24px;
    }
    
    .calc-btn {
        height: 50px;
        font-size: 16px;
    }
    
    .scientific-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .expression-field {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 代码生成器样式 */
.code-generator-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    animation: slideInUp 0.3s ease-out;
}

.code-generator-container .tool-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    border-left: none;
}

.code-generator-container h3 {
    font-size: 1.2em;
    color: #495057;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.code-generator-container h3 i {
    color: #007bff;
    font-size: 1.1em;
}

.code-generator-container .control-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.code-generator-container .control-group {
    flex: 1;
    min-width: 200px;
}

.code-generator-container .control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9em;
}

.code-generator-container select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.9em;
    color: #495057;
    transition: all 0.2s ease;
}

.code-generator-container select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.code-display {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    border: 1px solid #333;
    max-height: 600px;
    overflow-y: auto;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-display:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.code-display code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.code-display::before {
    content: '💻 点击复制代码';
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,123,255,0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.code-display:hover::before {
    opacity: 1;
}

.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,123,255,0.9);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: none;
    transition: all 0.2s ease;
    z-index: 10;
}

.code-display:hover .code-copy-btn {
    display: block;
}

.code-copy-btn:hover {
    background: rgba(0,123,255,1);
    transform: translateY(-1px);
}

.code-copy-success {
    animation: copySuccess 0.5s ease-out;
}

@keyframes copySuccess {
    0% { 
        background: #1e1e1e;
        transform: scale(1);
    }
    50% { 
        background: #28a745;
        transform: scale(1.01);
    }
    100% { 
        background: #1e1e1e;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 代码高亮样式 */
.code-display .keyword {
    color: #569cd6;
}

.code-display .string {
    color: #ce9178;
}

.code-display .comment {
    color: #6a9955;
    font-style: italic;
}

.code-display .number {
    color: #b5cea8;
}

.code-display .function {
    color: #dcdcaa;
}

.code-display .class {
    color: #4ec9b0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .code-generator-container .control-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .code-generator-container .control-group {
        min-width: 100%;
    }
    
    .code-display {
        font-size: 12px;
        padding: 15px;
    }
    
    .code-display::before {
        display: none;
    }
    
    .code-copy-btn {
        display: block;
        position: static;
        margin-top: 10px;
        width: 100%;
    }
}

/* 工具栏优化 */
.code-options {
    background: rgba(255,255,255,0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

/* 成功提示样式 */
.success-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFade 2s ease-out forwards;
}

@keyframes tooltipFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
} 

/* 代码生成器样式 */
.code-generator-container {
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: slideInUp 0.3s ease-out;
}

.code-generator-container .tool-header {
    margin-bottom: 15px;
    border-bottom: 2px solid #e8eaed;
    padding-bottom: 10px;
    border-left: none;
}

.code-generator-container h3 {
    font-size: 1.1em;
    color: #333;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.code-generator-container h3 i {
    color: #007bff;
}

.code-display {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre;
}

.code-display:hover {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0,123,255,0.2);
}

.code-display::before {
    content: "点击复制代码";
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.code-display:hover::before {
    opacity: 1;
}

.code-display code {
    color: inherit;
    background: none;
    padding: 0;
    font-size: inherit;
    white-space: pre;
    display: block;
}

/* 代码语法高亮 */
.code-display .keyword {
    color: #569cd6;
    font-weight: bold;
}

.code-display .string {
    color: #ce9178;
}

.code-display .comment {
    color: #6a9955;
    font-style: italic;
}

.code-display .number {
    color: #b5cea8;
}

.code-display .function {
    color: #dcdcaa;
}

.code-display .variable {
    color: #9cdcfe;
}

.code-display .operator {
    color: #d4d4d4;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 复制成功提示动画 */
.code-copy-success {
    animation: copySuccess 0.5s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: #28a745; }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .code-generator-container {
        padding: 15px;
        margin-top: 15px;
    }
    
    .code-display {
        padding: 15px;
        font-size: 12px;
        max-height: 300px;
    }
    
    .code-display::before {
        font-size: 10px;
        padding: 3px 6px;
        top: 8px;
        right: 12px;
    }
}

/* AI问答工具样式 */
.ai-chat-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
}

/* API帮助样式 */
.help-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.help-section h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.help-steps {
    margin: 10px 0;
    padding-left: 20px;
}

.help-steps li {
    margin: 8px 0;
    line-height: 1.5;
}

.ai-response {
    padding: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.welcome-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ai-avatar, .user-avatar, .error-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.user-avatar {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.error-avatar {
    background: linear-gradient(45deg, #ff6b6b, #ee5a5a);
    color: white;
}

.welcome-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.welcome-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.ai-capabilities {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.ai-capabilities li {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-capabilities i {
    width: 20px;
    color: #ffd700;
}

.setup-hint {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #ffd700;
    margin-top: 15px;
}

.ai-message {
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease-out;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.message-label {
    font-weight: 600;
    color: #333;
}

.message-time {
    color: #666;
    font-size: 12px;
    margin-left: auto;
}

.message-content {
    margin-left: 50px;
    padding: 12px 15px;
    border-radius: 8px;
    line-height: 1.6;
}

.user-content {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
}

.ai-content {
    background: #f1f8e9;
    border-left: 4px solid #4CAF50;
}

.error-content {
    background: #ffebee;
    border-left: 4px solid #ff6b6b;
    color: #d32f2f;
}

.ai-code-block {
    background: #2d3748;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.code-header {
    background: #4a5568;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #e2e8f0;
}

.code-language {
    font-weight: 600;
    text-transform: uppercase;
}

.copy-code-btn {
    background: transparent;
    border: 1px solid #718096;
    color: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background: #718096;
    color: white;
}

.ai-code-block pre {
    margin: 0;
    padding: 15px;
    overflow-x: auto;
    background: #2d3748;
}

.ai-code-block code {
    color: #e2e8f0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.ai-inline-code {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #2d3748;
}

.api-key-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-key-container input {
    flex: 1;
}

.api-key-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.api-key-hint a {
    color: #007bff;
    text-decoration: none;
}

.api-key-hint a:hover {
    text-decoration: underline;
}

.ai-usage-info {
    background: #e8f5e8;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 13px;
    color: #2e7d32;
}

.usage-label {
    font-weight: 600;
    margin-right: 8px;
}

.usage-tokens {
    font-family: 'Monaco', 'Consolas', monospace;
}

.api-help-content {
    max-width: 500px;
}

.help-steps {
    margin: 15px 0;
    padding-left: 20px;
}

.help-steps li {
    margin: 8px 0;
    line-height: 1.5;
}

.help-notes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-top: 15px;
}

.help-notes h5 {
    margin: 0 0 10px 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-notes ul {
    margin: 10px 0;
    padding-left: 20px;
}

.help-notes li {
    margin: 5px 0;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-chat-container {
        max-height: 400px;
    }
    
    .welcome-message {
        flex-direction: column;
        gap: 10px;
    }
    
    .message-content {
        margin-left: 20px;
    }
    
    .api-key-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ai-code-block pre {
        padding: 10px;
        font-size: 12px;
    }
}

/* === 密码生成器样式 === */

.password-options {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group h4 {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group h4 i {
    color: #007bff;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-group label:hover {
    background: #e9ecef;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.custom-options {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.pattern-help {
    display: block;
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 4px;
    font-style: italic;
}

#password-length {
    width: 200px;
    margin-right: 10px;
}

#length-display {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    display: inline-block;
}

.password-results {
    max-height: 600px;
    overflow-y: auto;
}

.password-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-item {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.password-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.password-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.password-index {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.strength-very-strong {
    background: #d4edda;
    color: #155724;
}

.strength-strong {
    background: #cce5ff;
    color: #004085;
}

.strength-medium {
    background: #fff3cd;
    color: #856404;
}

.strength-weak {
    background: #f8d7da;
    color: #721c24;
}

.strength-very-weak {
    background: #f5c6cb;
    color: #491217;
}

.copy-password-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.copy-password-btn:hover {
    background: #218838;
}

.password-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #495057;
    word-break: break-all;
}

.password-details {
    color: #6c757d;
    font-size: 0.85rem;
}

.overall-analysis {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.overall-analysis h4 {
    color: #004085;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-icon {
    font-size: 4rem;
    color: #007bff;
    text-align: center;
    margin-bottom: 1rem;
}

.password-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.password-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-features i {
    color: #007bff;
    width: 20px;
}

.security-tips {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.security-tips h4 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.security-tips ul {
    margin: 0.5rem 0 0 1.5rem;
}

.security-tips li {
    margin: 0.3rem 0;
    color: #856404;
}

.strength-analysis {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.strength-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.strength-header h4 {
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.strength-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
}

.strength-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.strength-index {
    background: #495057;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.strength-score {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
}

.strength-level {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
}

.strength-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
}

.breakdown-item .good {
    color: #28a745;
    font-weight: bold;
}

.breakdown-item .warning {
    color: #dc3545;
    font-weight: bold;
}

.breakdown-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.type-badge {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.security-recommendations {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.security-recommendations h5 {
    color: #0c5460;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-recommendations ul {
    margin: 0 0 0 1.5rem;
}

.security-recommendations li {
    margin: 0.4rem 0;
    color: #0c5460;
}

@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .password-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .strength-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

/* === 正则表达式高亮样式 === */

.regex-highlight {
    background: linear-gradient(120deg, #ff6b6b, #feca57);
    color: #ffffff;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: highlightPulse 0.5s ease-out;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(255, 107, 107, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    }
}

.highlighted-text-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.highlighted-text-container {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.regex-results {
    max-height: 500px;
    overflow-y: auto;
}

.match-item {
    transition: all 0.2s ease;
}

.match-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.highlighted-text-container::-webkit-scrollbar {
    width: 8px;
}

.highlighted-text-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.highlighted-text-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.highlighted-text-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* === 思维导图撤销/重做样式 === */

.mindmap-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6c757d;
    border-color: #6c757d;
}

.mindmap-btn:disabled:hover {
    background: #6c757d;
    border-color: #6c757d;
    transform: none;
}

.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.button-group .mindmap-btn {
    min-width: auto;
    padding: 8px 12px;
}

.button-group .mindmap-btn span {
    font-size: 0.9rem;
}

.mindmap-btn i {
    margin-right: 4px;
}

/* 撤销/重做按钮特殊样式 */
#mindmap-undo:not(:disabled):hover {
    background: #5a6268;
    border-color: #545b62;
}

#mindmap-redo:not(:disabled):hover {
    background: #5a6268;
    border-color: #545b62;
}

/* 历史状态指示器 */
.history-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28a745;
    margin-left: 4px;
    animation: historyPulse 2s infinite;
}

@keyframes historyPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 4px;
    }
    
    .button-group .mindmap-btn {
        width: 100%;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

/* === 暗黑模式切换按钮样式 === */

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 500;
    min-width: 120px;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--nav-hover-bg);
    border-color: var(--btn-primary-bg);
    color: var(--btn-primary-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.theme-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle i.fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle::before {
    content: "☀️";
    font-size: 1rem;
}

[data-theme="dark"] .theme-toggle .theme-text::before {
    content: "明亮模式";
}

[data-theme="dark"] .theme-toggle .theme-text {
    color: transparent;
}

.theme-toggle:active {
    transform: translateY(0);
}

/* 暗黑模式动画效果 */
@keyframes themeSwitch {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg);
    }
}

.theme-switching .theme-toggle i {
    animation: themeSwitch 0.6s ease-in-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-info {
        text-align: center;
    }
    
    .theme-toggle {
        min-width: auto;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .theme-toggle .theme-text {
        display: none;
    }
}

/* === 文件对比工具样式 === */

.compare-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.compare-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.panel-header h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h4 i {
    color: var(--btn-primary-bg);
}

.panel-controls {
    display: flex;
    gap: 8px;
}

.file-input-section {
    padding: 0 1rem;
    background: var(--bg-tertiary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.file-info {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
}

.file-size {
    color: var(--text-secondary);
}

.compare-textarea {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
}

.compare-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.compare-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-width: 200px;
    padding: 1rem;
}

.compare-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.option-item {
    display: flex;
    align-items: center;
}

.option-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.option-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.compare-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.compare-stats {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.stat-added {
    background: #d4edda;
    color: #155724;
}

.stat-deleted {
    background: #f8d7da;
    color: #721c24;
}

.stat-modified {
    background: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .stat-added {
    background: #1e4d2b;
    color: #75b798;
}

[data-theme="dark"] .stat-deleted {
    background: #4d1e20;
    color: #f1959b;
}

[data-theme="dark"] .stat-modified {
    background: #4d3d1a;
    color: #ffc107;
}

.compare-result {
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.result-header h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-header h4 i {
    color: var(--btn-primary-bg);
}

.result-controls {
    display: flex;
    gap: 8px;
}

.compare-output {
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 600px;
    overflow-y: auto;
}

.diff-line {
    padding: 2px 8px;
    margin: 1px 0;
    border-radius: 3px;
    position: relative;
    padding-left: 3rem;
}

.diff-line::before {
    content: attr(data-line-number);
    position: absolute;
    left: 8px;
    width: 2rem;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.diff-added {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

.diff-deleted {
    background: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.diff-modified {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}

.diff-unchanged {
    color: var(--text-secondary);
    border-left: 3px solid transparent;
}

[data-theme="dark"] .diff-added {
    background: #1e4d2b;
    color: #75b798;
}

[data-theme="dark"] .diff-deleted {
    background: #4d1e20;
    color: #f1959b;
}

[data-theme="dark"] .diff-modified {
    background: #4d3d1a;
    color: #ffc107;
}

.diff-context {
    margin: 0.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 0.25rem 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .compare-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
    }
    
    .compare-controls {
        order: -1;
        flex-direction: row;
        justify-content: space-around;
        min-width: auto;
        padding: 1rem;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    
    .compare-options {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .compare-stats {
        flex-direction: row;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .panel-controls {
        justify-content: center;
    }
    
    .compare-options {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .compare-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .result-controls {
        justify-content: center;
    }
    
    .diff-line {
        padding-left: 1rem;
        font-size: 0.8rem;
    }
    
    .diff-line::before {
        display: none;
    }
}

/* Python支持库样式 */
.library-results {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px 0;
}

.library-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.library-item:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
    border-color: var(--btn-primary-bg);
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.library-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.library-name i {
    color: #3776ab;
    font-size: 1.2em;
}

.library-name .name {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-primary);
}

.category-badge {
    background: var(--btn-primary-bg);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.library-actions {
    display: flex;
    gap: 8px;
}

.library-actions .copy-btn,
.library-actions .expand-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.library-actions .copy-btn:hover,
.library-actions .expand-btn:hover {
    background: var(--btn-primary-bg);
    color: white;
    border-color: var(--btn-primary-bg);
}

.library-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.library-quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.quick-install,
.quick-import {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid var(--btn-primary-bg);
}

.quick-install label,
.quick-import label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 0.9em;
}

.quick-install code,
.quick-import code {
    background: var(--bg-primary);
    padding: 6px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    display: block;
    word-break: break-all;
}

.library-details {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

.details-section h5 {
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-section h5 i {
    color: var(--btn-primary-bg);
}

.example-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    overflow-x: auto;
}

.example-code code {
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    color: var(--text-primary);
    white-space: pre;
}

.copy-example-btn {
    background: var(--btn-info-bg);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.copy-example-btn:hover {
    background: var(--btn-info-hover);
}

.library-stats {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-header h5 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1em;
}

.stat-count {
    background: var(--btn-primary-bg);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
}

.stat-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lib-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    border: 1px solid var(--border-color);
}

.more-tag {
    background: var(--text-secondary);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8em;
}

.total-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.total-item {
    text-align: center;
}

.total-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.total-value {
    display: block;
    color: var(--btn-primary-bg);
    font-size: 1.5em;
    font-weight: 600;
}

.search-container {
    position: relative;
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-results-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.library-icon {
    font-size: 4em;
    color: #3776ab;
    margin-bottom: 20px;
}

.library-features {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
}

.library-features li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-features i {
    color: var(--btn-primary-bg);
    width: 20px;
}

@media (max-width: 768px) {
    .library-quick-info {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .total-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .library-actions {
        align-self: flex-end;
    }
}

/* ================================
   IP归属地查询样式
   ================================ */

.ip-results {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ip-icon {
    font-size: 4em;
    color: #17a2b8;
    margin-bottom: 20px;
}

.ip-features {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
}

.ip-features li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ip-features i {
    color: var(--btn-primary-bg);
    width: 20px;
}

.ip-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.card-header {
    background: var(--bg-secondary);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h4 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
}

.card-header h4 i {
    color: var(--btn-primary-bg);
}

.card-content {
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

.info-value {
    color: var(--text-primary);
    font-family: monospace;
    text-align: right;
    word-break: break-all;
}

/* 位置卡片特殊样式 */
#location-card .card-header {
    background: linear-gradient(135deg, #28a745, #20c997);
}

#location-card .card-header h4 {
    color: white;
}

#location-card .card-header h4 i {
    color: white;
}

/* ISP卡片特殊样式 */
#isp-card .card-header {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

#isp-card .card-header h4 {
    color: white;
}

#isp-card .card-header h4 i {
    color: white;
}

/* 浏览器卡片特殊样式 */
#browser-card .card-header {
    background: linear-gradient(135deg, #fd7e14, #e83e8c);
}

#browser-card .card-header h4 {
    color: white;
}

#browser-card .card-header h4 i {
    color: white;
}

/* 系统卡片特殊样式 */
#system-card .card-header {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

#system-card .card-header h4 {
    color: white;
}

#system-card .card-header h4 i {
    color: white;
}

/* 搜索容器样式重用 */
.search-container {
    position: relative;
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
}

/* IP输入框特殊样式 */
#ip-input {
    font-family: monospace;
    letter-spacing: 1px;
}

#ip-input::placeholder {
    font-family: var(--font-family);
    letter-spacing: normal;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ip-info-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-label {
        min-width: auto;
        font-size: 0.9em;
    }
    
    .info-value {
        text-align: left;
        font-size: 0.9em;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .ip-icon {
        font-size: 3em;
    }
}

/* 暗黑主题适配 */
[data-theme="dark"] .info-card {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-header {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .info-item {
    border-color: var(--border-color);
}

/* 加载状态适配 */
.ip-results.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ip-info-cards.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 说明信息样式 */
.note-item {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    padding: 10px;
    margin: 5px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.note-text {
    color: #0066cc;
    font-size: 0.9em;
    line-height: 1.4;
    text-align: left;
    font-style: italic;
}

[data-theme="dark"] .note-item {
    background: #1a2332;
    border-color: #2d4a66;
}

[data-theme="dark"] .note-text {
    color: #66b3ff;
}

/* 错误状态 */
.ip-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

[data-theme="dark"] .ip-error {
    background: #2d1b1e;
    color: #f8d7da;
    border-color: #721c24;
}