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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #666;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

nav a:hover, nav a.active {
    background: #3498db;
    color: white;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
}

table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.form-container, .search-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.entry-form, .search-form {
    max-width: 600px;
}

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

.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

input, select, textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-small {
    background: #95a5a6;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-small:hover {
    background: #7f8c8d;
}

.category-tag {
    display: inline-block;
    background: #e8f4fc;
    color: #3498db;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.no-results {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

.category-select-container {
    display: flex;
    gap: 10px;
    align-items: end;
}

.category-select-container select {
    flex: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}

.categories-list {
    margin-top: 20px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    border-bottom: 2px solid #3498db;
    color: #3498db;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 新增样式 */

.action-buttons {
    display: flex;
    gap: 5px;
}

.password-toggle {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 12px;
}

.password-toggle:hover {
    background: #7f8c8d;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
    }
    
    nav a {
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .category-select-container {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    table {
        font-size: 14px;
    }
    
    table th, table td {
        padding: 8px 10px;
    }
}

/* 密码输入框组 */
.password-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.password-input-group input {
    flex: 1;
}

/* 操作列优化 */
table td:last-child {
    white-space: nowrap;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 成功状态 */
.success-state {
    border-color: #28a745 !important;
    background-color: #f8fff9 !important;
}