:root {
    --primary-color: #2563eb;
    --secondary-color: #7390c0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background-color: #f8fafc;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 2rem auto;
    padding: 0 1rem;
    max-width: 1200px;
    background-color: var(--background-color);
    color: #1e293b;
}

h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.button-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.5rem 0;
}

.button-group+.button-group {
    margin-top: 0.5rem;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

button.primary {
    background-color: var(--primary-color);
    color: white;
}

button.secondary {
    background-color: var(--secondary-color);
    color: white;
}

button.danger {
    background-color: var(--danger-color);
    color: white;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

#message {
    margin: 1rem 0;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    display: none;
}

#message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
    display: block;
}

#message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}

#message.info {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #94a3b8;
    display: block;
}

#stats {
    padding: 1rem;
    background-color: #dbeafe;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin: 2rem 0;
    font-size: 1.1rem;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f8fafc;
}

tr:nth-child(even) {
    background-color: #f1f5f9;
}

.key-cell {
    font-family: Consolas, 'Courier New', monospace;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    background-color: white;
    color: var(--primary-color);
}

.pagination button:disabled {
    background-color: var(--primary-color);
    color: white;
    cursor: default;
}

.key-actions {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

.key-actions button {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.pagination button {
    min-width: 2rem;
    height: 2rem;
    text-align: center;
    line-height: 1;
}

.page-jump {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.page-jump input {
    padding: 0.5rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    width: 50px;
    font-size: 0.9rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.page-jump button {
    min-width: auto;
    padding: 0.3rem 0.7rem;
    margin-left: 1rem;
}

.ellipsis {
    margin: 0 0.5rem;
}

.copy-success {
    background-color: var(--success-color) !important;
    color: white !important;
}

.icon-button {
    background-color: transparent;
    color: #64748b;
    font-size: 1.2rem;
    padding: 0.3rem;
    min-width: 2rem;
    height: 2rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-button:hover {
    background-color: rgba(203, 213, 225, 0.3);
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.icon-button.danger {
    color: #64748b;
}

.icon-button.danger:hover {
    color: var(--danger-color);
    background-color: rgba(239, 68, 68, 0.1);
}

.icon-button.copy-success {
    background-color: transparent !important;
    color: var(--success-color) !important;
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-radius: 10px;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-logo a {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
}

.navbar-links {
    display: flex;
    gap: 1.5rem;
}

.navbar-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.navbar-links a:hover {
    color: var(--primary-color);
    background-color: #f1f5f9;
}

.navbar-links a.active {
    color: var(--primary-color);
    background-color: #e0e7ff;
}

.nav-icon {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.6rem;
    }

    .key-cell {
        max-width: 120px;
    }

    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-links {
        width: 100%;
        justify-content: space-between;
    }

    .nav-text {
        display: none;
    }

    .navbar-links a {
        flex: 1;
        justify-content: center;
    }
}