/* 基础样式 */
* {
    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;
}

.btn, .action-btn {
    padding: 8px 15px;
    border: none;
    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-warning { background: #f39c12; color: white; }
.btn-info { background: #1abc9c; color: white; }
.btn-danger { background: #e74c3c; color: white; }
.btn:hover { opacity: 0.9; }

.account-item {
    padding: 15px;
    border: 1px solid #eee;
    margin: 10px 0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    flex-wrap: wrap;
}

.account-info {
    flex: 1;
    min-width: 200px;
}

.account-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.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, .success-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 3s forwards;
}

.error-toast { background: #ff4444; color: white; }
.success-toast { background: #27ae60; color: white; }

@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); }
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.custom-filter-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.parse-settings, .history-controls, .notes-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.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;
}

.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-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;
}

.account-count {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}

.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;
}

.hidden-file-input {
    display: none;
}

/* 响应式设计 */
@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;
    }
}