body {
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
    padding: 60px 0 0 0;
    background: #f5f6fa;
}
.container {
    display: flex;
    height: calc(100vh - 60px);
}
.left-panel, .right-panel {
    padding: 32px 24px;
    box-sizing: border-box;
    height: 100vh;
    overflow-y: auto;
}
.left-panel {
    flex: 2;
    background: #fff;
    border-right: 1px solid #e0e0e0;
}
.right-panel {
    flex: 1;
    background: #f4f8fb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.search-bar input, .search-bar select {
    padding: 6px 10px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.search-bar button {
    padding: 6px 16px;
    font-size: 15px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.quote-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 16px 12px 16px;
    width: 320px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quote-content {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.quote-translation {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}
.quote-tags {
    margin-top: 6px;
}
.tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 4px;
}
.quote-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.card-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}
.card-actions button {
    font-size: 13px;
    padding: 3px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.card-actions::after {
    content: "";
    display: table;
    clear: both;
}
.edit-btn {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}
.delete-btn {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.add-form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(25, 118, 210, 0.08);
    padding: 36px 32px 28px 32px;
    min-width: 340px;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.form-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 22px;
    color: #1976d2;
    letter-spacing: 1px;
    text-align: center;
}
.add-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.add-form label {
    font-size: 15px;
    color: #1976d2;
    margin-bottom: 4px;
    font-weight: 500;
}
.add-form input, .add-form textarea {
    padding: 10px 12px;
    font-size: 16px;
    border: 1.5px solid #b0bec5;
    border-radius: 6px;
    resize: vertical;
    background: #f8fafc;
    transition: border 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.add-form input:focus, .add-form textarea:focus {
    border: 1.5px solid #1976d2;
    outline: none;
    background: #fff;
}
.add-form textarea {
    min-height: 120px;
    max-height: 260px;
}
.add-form button {
    margin-top: 12px;
    padding: 12px 0;
    background: linear-gradient(90deg, #1976d2 60%, #42a5f5 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
    letter-spacing: 1px;
    transition: background 0.2s;
}
.add-form button:disabled {
    background: #b0bec5;
    cursor: not-allowed;
}
.error-msg, .success-msg {
    font-size: 15px;
    margin-bottom: 8px;
    text-align: center;
}
.error-msg {
    color: #c62828;
}
.success-msg {
    color: #388e3c;
}
.edit-modal-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(25, 118, 210, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
    animation: fadeInBg 0.3s ease forwards;
}
@keyframes fadeInBg {
    from { background: rgba(25, 118, 210, 0); }
    to { background: rgba(25, 118, 210, 0.25); }
}
.edit-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px 24px 28px;
    min-width: 360px;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: slideInModal 0.3s ease forwards;
    transform: translateY(-20px);
    opacity: 0;
}
@keyframes slideInModal {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.edit-modal .modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1565c0;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.edit-modal .modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}
.edit-modal .modal-actions button {
    font-size: 15px;
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}


@media (max-width: 900px) {
    .container { flex-direction: column; }
    .left-panel, .right-panel { height: auto; }
}

/* 顶部导航栏 */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #1976d2;
    color: #fff;
    z-index: 1100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header-title {
    font-size: 20px;
    font-weight: bold;
}
.nav-right {
    display: flex;
    align-items: center;
}
.login-btn {
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4);
    transition: background-color 0.3s ease;
}
.header-bar .login-btn {
    margin-left: 10px;
}
.login-btn:hover {
    background: #0d47a1;
}

/* 登录弹窗 */
.login-modal-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(25, 118, 210, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    backdrop-filter: blur(6px);
    animation: fadeInBg 0.3s ease forwards;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 注册弹窗背景，确保显示时居中 */
#register-modal-bg.login-modal-bg {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#register-modal-bg.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 注册弹窗输入框统一样式 */
.input-field {
    border: 1.5px solid #90caf9;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background-color: #f0f7ff;
    width: 100%;
    box-sizing: border-box;
}

/* 显示弹窗时的样式 */
.login-modal-bg.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.input-field:focus {
    border-color: #1976d2;
    background-color: #ffffff;
    outline: none;
}
.login-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 24px 28px;
    min-width: 360px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: slideInModal 0.3s ease forwards;
    transform: translateY(-20px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-modal-bg.show .login-modal {
    opacity: 1;
}
.login-modal .modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1565c0;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.login-modal input[type="text"],
.login-modal input[type="password"] {
    border: 1.5px solid #90caf9;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background-color: #f0f7ff;
    width: 100%;
    box-sizing: border-box;
}
.login-modal input[type="text"]:focus,
.login-modal input[type="password"]:focus {
    border-color: #1976d2;
    background-color: #ffffff;
    outline: none;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
}
.login-modal .modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}
.login-modal .modal-actions button {
    font-size: 15px;
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.login-modal .modal-actions button:first-child {
    background-color: #e0e0e0;
    color: #555;
}
.login-modal .modal-actions button:first-child:hover {
    background-color: #bdbdbd;
}
.login-modal .modal-actions button:last-child {
    background-color: #1976d2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}
.login-modal .modal-actions button:last-child:hover {
    background-color: #1565c0;
}

/* 新增按钮样式 */
.edit-modal .modal-actions button:first-child {
    background-color: #e0e0e0;
    color: #555;
}
.edit-modal .modal-actions button:first-child:hover {
    background-color: #bdbdbd;
}
.edit-modal .modal-actions button:last-child {
    background-color: #1976d2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}
.edit-modal .modal-actions button:last-child:hover {
    background-color: #1565c0;
}

/* 输入框和文本域美化 */
.edit-modal input[type="text"],
.edit-modal textarea {
    border: 1.5px solid #90caf9;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background-color: #f0f7ff;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}
.edit-modal input[type="text"]:focus,
.edit-modal textarea:focus {
    border-color: #1976d2;
    background-color: #ffffff;
    outline: none;
}

.user-account {
    font-size: 0.8em;
    color: #666;
    margin-left: auto;
}

.filter-own {
    display: inline-flex;
    align-items: center;
    margin: 0 10px;
}

.filter-own input[type="checkbox"] {
    margin-right: 5px;
}

.filter-own label {
    cursor: pointer;
}