:root {
    --bg-color: #f5f5f7;
    --text-color: #1d1d1f;
    --primary-color: #06c;
    --secondary-color: #86868b;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --border-radius: 18px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #f0f0f0;
        --card-bg: #2a2a2a;
        --secondary-color: #a0a0a0;
        --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

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

body {
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

a, p, h1, h2, h3, span, div {
    color: inherit;
}

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

.navbar {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.8);
    height: 52px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .navbar {
        background-color: rgba(30, 30, 30, 0.8);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
	.btn-danger {
        background-color: #c82333;
    }
    
    .confirm-modal-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
	.engine-options {
        background: var(--card-bg);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .engine-options li:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    margin-right: auto;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.nav-action-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    min-width: 40px;
    min-height: 40px;
}

.nav-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.main-content {
    padding-top: 80px;
    min-height: 100vh;
}

.baidu-search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0 30px;
	min-height: 120px; /* 根据实际图片高度调整 */
}

.baidu-search {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.baidu-search .search-input {
    width: 100%;
    height: 48px;
    padding: 0 20px 0 50px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    color: var(--text-color);
}

.baidu-search .search-input:focus {
    box-shadow: 0 4px 20px rgba(0, 125, 250, 0.2);
    border-color: var(--primary-color);
}

.baidu-search .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 18px;
}

.baidu-logo {
    width: 270px;
    height: 120px; /* 固定高度 */
    object-fit: contain; /* 保持比例填充 */
    margin-bottom: 20px;
    max-width: 100%;
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.website-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.website-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 12px;
    background-color: var(--bg-color);
    padding: 5px;
}

.website-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 5px;
    word-break: break-word;
    width: 100%;
}

.website-url {
    font-size: 12px;
    color: var(--secondary-color);
    word-break: break-all;
    width: 100%;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
}

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    gap: 5px;
}

.website-card:hover .card-actions {
    display: flex;
}

.action-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s;
    min-width: auto;
    min-height: auto;
	padding: 6px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 添加投影提升可视性 */
	
}

.action-btn:hover {
    background-color: var(--primary-color);
	transform: scale(1.1);
}

.add-website-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 30px auto;
}

.add-website-btn:hover {
    background-color: #0051a8;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
    color: var(--text-color);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 5px;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #d2d2d7;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 80px;
    min-height: 40px;
    border: none;
}

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

.btn-primary:hover {
    background-color: #0051a8;
}

.btn-secondary {
    background-color: #e8e8ed;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #d2d2d7;
}

.category-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 1.5em;
}

.category-list {
    list-style: none;
    margin-top: 20px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.category-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.category-item-actions {
    display: flex;
    gap: 5px;
}

@media (max-width: 768px) {
    .websites-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .navbar {
        padding: 0 10px;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .baidu-logo {
        width: 200px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
	.action-btn {
        /* 移动端缩小尺寸 */
        width: 20px;
        height: 20px;
        padding: 4px;
        font-size: 10px;
    }
    
    /* 调整图标大小 */
    .action-btn .bi {
        font-size: 0.8em;
    }
    
    /* 调整操作按钮间距 */
    .card-actions {
        gap: 3px;
        top: 5px;
        right: 5px;
    }
	
	.form-input.select-wrapper {
        padding-right: 35px;
        background-position: right 12px center;
    }
	
	.form-input.select-wrapper:hover {
        transform: none; /* 移动端取消位移 */
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
	
	.category-nav {
        gap: 10px;
        margin: 15px 0;
    }
    
    .category-link {
        font-size: 1em;
        padding: 6px 10px;
    }
	
	.cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-section {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
   }

    .record-links {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
}


@media print {
    .navbar, .add-website-btn, .card-actions {
        display: none !important;
    }
    
    .websites-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    
    .website-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

.bi::before {
    display: inline-block;
    color: inherit !important;
}

/* Edge浏览器特殊修复 */
.edge-browser .modal-content {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.edge-browser .website-icon {
    background-color: var(--bg-color);
}

/* 在 style.css 中添加以下代码 */
#categoryModal .form-group {
    display: flex;
    gap: 12px; /* 控制间距大小 */
    align-items: center; /* 垂直居中 */
}

#categoryModal .form-input {
    flex: 1; /* 输入框占据剩余空间 */
    min-width: 120px; /* 防止过度压缩 */
}

#categoryModal .btn {
    white-space: nowrap; /* 按钮文字不换行 */
    padding: 10px 20px; /* 保持原有按钮样式 */
}

/* 移动端适配 */
@media (max-width: 480px) {
    #categoryModal .form-group {
        flex-direction: column; /* 垂直排列 */
        gap: 8px;
    }
    #categoryModal .form-input {
        width: 100%;
    }
    #categoryModal .btn {
        width: 100%;
    }
	    
	.action-btn {
        /* 进一步缩小尺寸 */
        width: 18px;
        height: 18px;
        padding: 3px;
    }
    
    .website-card:hover .card-actions {
        /* 移动端保持常显 */
        display: flex;
    }
}

/* 在style.css中添加 */
.confirm-modal {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3000; /* 确保在最上层 */
}

.confirm-modal-content {
    max-width: 400px;
    width: 90%;
    animation: modalFadeIn 0.3s;
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    color: var(--text-color);
}

.confirm-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.confirm-modal-body {
    padding: 30px 20px;
    text-align: center;
    font-size: 16px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #bb2d3b;
}

/* 暗黑模式适配 */
@media (prefers-color-scheme: dark) {
    .btn-danger {
        background-color: #c82333;
    }
    
    .confirm-modal-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
	
	.form-input.select-wrapper {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23a0a0a0' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }
    
    .form-input.select-wrapper:hover {
        background-color: rgba(255, 255, 255, 0.05);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23006cff' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }
}

/* ======== 自定义下拉菜单样式 ======== */
.form-input.select-wrapper {
    position: relative;
    padding-right: 40px; /* 为自定义箭头留出空间 */
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%2386868b' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    appearance: none; /* 移除默认箭头 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--card-bg);
}

/* 鼠标悬停效果 */
.form-input.select-wrapper:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23006cff' d='M8 11.354l4.646-4.647a.5.5 0 0 1 .708.708l-5 5a.5.5 0 0 1-.708 0l-5-5a.5.5 0 1 1 .708-.708L8 11.354z'/%3e%3c/svg%3e");
    background-position: right 14px center; /* 微调箭头位置 */
}


/* 选项悬停效果 */
.form-input.select-wrapper option:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* 焦点状态 */
.form-input.select-wrapper:focus {
    box-shadow: 0 0 0 3px rgba(0, 108, 255, 0.2);
}

/* 搜索引擎选择器样式 */
.engine-selector {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.engine-toggle {
    background: none;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: var(--secondary-color);
    height: 100%;
    display: flex;
    align-items: center;
}

.engine-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    list-style: none;
    padding: 8px 0;
    min-width: 100px;
    margin-top: 5px;
}

.engine-options.show {
    display: block;
}

.engine-options li {
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.engine-options li:hover {
    background: rgba(0, 0, 0, 0.05);
}

.search-input {
    padding-left: 70px !important;
}

/* 分类导航新样式 */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.category-link {
    font-size: 1.2em;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.category-link:hover {
    background: rgba(var(--primary-color), 0.1);
    color: var(--primary-color);
}

.category-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

.category-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

/* ======== Cookie 横幅 ======== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  padding: 15px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 15px;
  font-size: 14px;
  color: var(--secondary-color);
}

.cookie-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.cookie-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.cookie-btn:hover {
  background: #0051a8;
}

.cookie-link {
  color: var(--primary-color);
  text-decoration: none;
}

/* ======== 主底部样式 ======== */
.main-footer {
  margin-top: 50px;
  padding: 30px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--card-bg);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.copyright {
  font-size: 14px;
  color: var(--secondary-color);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  background: none;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  font-size: 14px;
  padding: 5px;
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--primary-color);
}

.tech-info {
  text-align: center;
  font-size: 12px;
  color: var(--secondary-color);
}

.github-link {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* 隐私条款样式 */
.privacy-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.privacy-container h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.privacy-container h2 {
    color: var(--text-color);
    font-size: 1.3em;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.privacy-container ul {
    padding-left: 25px;
    margin: 15px 0;
}

.privacy-container li {
    margin: 8px 0;
    line-height: 1.6;
}

.record-links {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
}