/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
    padding: 10px;
    color: #333;
    position: relative;
}

/* 主容器样式 */
.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* 输入区域 */
textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
}

/* 按钮区域 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background: #8e44ad;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    background: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 账号项样式 */
.account-item {
    padding: 15px;
    border: 1px solid #eee;
    margin: 10px 0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background: #f9f9f9;
    flex-wrap: wrap;
}

.account-info {
    flex: 1;
    min-width: 200px;
}

.account-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* 按钮样式 */
.btn {
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-info {
    background: #1abc9c;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* 密码显示切换 */
.pwd-display {
    font-family: monospace;
    letter-spacing: 2px;
}

.toggle-pwd {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
}

/* 错误提示 */
.error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4444;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; top: 10px; }
    10% { opacity: 1; top: 20px; }
    90% { opacity: 1; top: 20px; }
    100% { opacity: 0; top: 10px; }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 3s forwards;
}

/* 过滤按钮区域 */
.filter-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* 账号计数显示 */
.account-count {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

/* 自定义过滤词输入 */
.custom-filter-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 隐藏的文件输入 */
.hidden-file-input {
    display: none;
}

/* 解析格式设置区域 */
.parse-settings {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.parse-settings h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 16px;
}

.parse-settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.parse-settings-row label {
    font-weight: bold;
    min-width: 80px;
}

.parse-settings-row input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 100px;
    max-width: 200px;
}

/* 操作历史区域 */
.history-controls {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.history-controls h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 16px;
}

.history-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.history-settings {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.history-settings label {
    font-weight: bold;
}

.history-settings input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 60px;
}

/* 备注管理区域 */
.notes-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.notes-section h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 16px;
}

.notes-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.notes-search-container input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.notes-result {
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
}

.notes-result h4 {
    margin-top: 0;
    color: #2c3e50;
}

.notes-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.account-note-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
}

/* 新增样式 */
.format-fix-highlight {
    background-color: #ffeb3b;
    padding: 2px;
    border-radius: 2px;
}

.valid-account {
    color: #4CAF50;
    font-weight: bold;
}

.invalid-account {
    color: #f44336;
    text-decoration: line-through;
}

.password-strength {
    display: inline-block;
    margin-left: 5px;
    font-weight: bold;
}

.strength-weak {
    color: #f44336;
}

.strength-medium {
    color: #FF9800;
}

.strength-strong {
    color: #4CAF50;
}

.replace-modal-content {
    max-width: 600px;
}

.replace-preview {
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    max-height: 200px;
    overflow-y: auto;
}

.replace-highlight {
    background-color: #ffeb3b;
}

.tag-selector {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-left: 5px;
}

.tag-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
    background: #e0e0e0;
}

.template-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.template-item:hover {
    background: #f5f5f5;
}

.template-highlight {
    color: #2196F3;
    font-weight: bold;
}

.diff-added {
    background-color: #e6ffed;
}

.diff-removed {
    background-color: #ffebe9;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-title {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.modal-message {
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    justify-content: center;
}

.modal-button {
    padding: 8px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal-button:hover:not(:disabled) {
    background: #2980b9;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}

.pagination button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:disabled {
    background: #eee;
    cursor: not-allowed;
}

.pagination input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
}

.back-to-top:hover {
    background: #2980b9;
}

/* 公告栏样式 */
.announcement-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ff9800;
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 100;
    animation: slideInFromRight 15s linear infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 系统选择样式 */
.system-selector {
    margin-top: 5px;
}

.system-selector select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 验证按钮样式 */
.verify-btn {
    margin-top: 5px;
    padding: 5px 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 第五人格图鉴按钮 */
.query-fifth-btn {
    margin-top: 5px;
    padding: 5px 10px;
    background: #9C27B0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 未登录第五人格筛选按钮 */
.filter-fifth-btn {
    margin-top: 5px;
    padding: 5px 10px;
    background: #607D8B;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 新增的验证结果样式 */
.validation-card {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.validation-title {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.validation-chart {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
}

.validation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.validation-table th, 
.validation-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.validation-table th {
    background-color: #f1f1f1;
    font-weight: bold;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background-color: #4CAF50;
    color: white;
}

.status-error {
    background-color: #f44336;
    color: white;
}

.status-warning {
    background-color: #FF9800;
    color: white;
}

/* 验证选项样式 */
.validation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.validation-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 验证按钮样式 */
.validate-btn {
    margin-top: 5px;
    padding: 5px 10px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .account-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .account-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .parse-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .parse-settings-row input {
        width: 100%;
        max-width: 100%;
    }
    
    .history-buttons {
        flex-direction: column;
    }
    
    .history-settings {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notes-search-container {
        flex-direction: column;
    }
    
    .replace-modal-content {
        width: 95%;
    }
    
    .validation-table {
        display: block;
        overflow-x: auto;
    }
    
    .validation-options {
        flex-direction: column;
    }
    
    .announcement-bar {
        font-size: 12px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .btn, .action-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    textarea {
        font-size: 12px;
        height: 120px;
    }
    
    .container {
        padding: 15px;
    }
}