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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: #34495e;
    font-size: 15px;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px 0;
}

button:hover {
    background-color: #2980b9;
}

.result {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 60px;
    resize: vertical;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    input[type="text"] {
        font-size: 14px;
    }

    button {
        font-size: 14px;
        padding: 10px;
    }
}

/* 在现有样式的基础上添加以下样式 */

.notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.qr-placeholder {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

#qrcode {
    margin: 20px auto;
}

.primary-btn {
    background-color: #ff6b6b;
}

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

#pcContent {
    text-align: center;
}

#mobileContent {
    margin-top: 30px;
}

#qrcode-container {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

#qrcode-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#qrcode {
    padding: 15px;
    background: white;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.records-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.secondary-btn {
    background: #3498db;
    width: 48%;
    padding: 12px 0;
    margin: 0;
    text-align: center;
}

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

#records-list {
    margin-top: 20px;
}

.record-item {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-name, .record-url, .record-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.record-name label, .record-url label, .record-share label {
    min-width: 80px;
    color: #666;
}

.record-name input, .record-url input, .record-share input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.record-share input {
    background-color: #f5f5f5;
}

.record-time {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
}

.delete-btn, .copy-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.copy-btn {
    background-color: #4CAF50;
    color: white;
}

.delete-btn:hover, .copy-btn:hover {
    opacity: 0.9;
}

.status-badges {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.record-item p {
    margin: 5px 0;
    word-break: break-all;
}

.record-url {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.record-url span {
    flex-shrink: 0;
    margin-right: 10px;
}

.record-url input {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.record-url input:focus {
    border-color: #3498db;
    outline: none;
}

.record-name {
    display: flex;
    align-items: center;
    margin: 5px 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.record-name span {
    flex-shrink: 0;
    margin-right: 10px;
    color: #666;
}

.record-name input {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    color: #2c3e50;
}

.record-name input:focus {
    border-color: #3498db;
    outline: none;
}

.record-name input::placeholder {
    color: #999;
    font-weight: normal;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #3498db;
    outline: none;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 10px;
    width: auto;
}

.page-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#pageInfo {
    color: #666;
    font-size: 14px;
}

/* 添加搜索结果高亮效果 */
.highlight {
    background-color: #fff3cd;
    padding: 2px;
    border-radius: 2px;
}

/* 确保按钮在禁用状态下的样式正确 */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 确保输入框在不同浏览器中显示一致 */
input[type="text"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 优化移动端点击区域 */
@media (max-width: 768px) {
    .record-item input,
    .record-item button {
        min-height: 44px;
    }
}

/* 添加加载状态样式 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 输入框动画效果 */
.input-group input {
    transition: all 0.3s ease;
}

.input-group input:focus {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 记录项悬停效果 */
.record-item {
    transition: all 0.3s ease;
}

.record-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 按钮点击反馈 */
button:active {
    transform: scale(0.98);
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    transition: transform 0.3s ease-out;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 添加加载遮罩层样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 优化移动端样式 */
@media (max-width: 768px) {
    .toast {
        width: 90%;
        max-width: none;
        font-size: 14px;
        padding: 10px 15px;
    }

    .record-item {
        padding: 10px;
    }

    .record-item input {
        font-size: 14px;
    }

    /* 改善移动端点击区域 */
    .record-name input,
    .record-url input,
    button {
        min-height: 44px;
    }
}

/* 添加无数据状态样式 */
.no-records {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* 优化滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.test-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.test-btn:hover {
    background-color: #45a049;
}

.test-btn:active {
    transform: scale(0.98);
}

.more-btn {
    background: #3498db;
    width: 48%;
    padding: 12px 0;
    margin: 0;
    text-align: center;
}

.more-btn:active {
    transform: scale(0.98);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .button-group button {
        width: 100%;
        margin: 0;
    }
    
    .secondary-btn,
    .more-btn {
        width: 100%;
    }
}

.search-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-group input {
    flex: 1;
}

.search-btn {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: auto;
    margin: 0;
}

.save-btn {
    background-color: #2ecc71;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    width: auto;
    margin: 0 0 0 10px;
}

.save-btn:hover {
    background-color: #27ae60;
}

.record-name, .record-url {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.record-name input, .record-url input {
    flex: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-group {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .record-name, .record-url {
        flex-direction: column;
        align-items: stretch;
    }
    
    .save-btn {
        margin: 5px 0 0 0;
    }
}

.title-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.title-section h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 美化输入框 */
.input-group input {
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
    padding: 12px 15px;
    font-size: 15px;
    border-radius: 8px;
    width: 100%;
    background: #f8f9fa;
}

.input-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

/* 美化按钮 */
button {
    background: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

button:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 美化结果区域 */
.result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result textarea {
    background: white;
    border: 2px solid #eee;
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    margin: 10px 0;
}

/* 美化二维码容器 */
#qrcode-container {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

#qrcode-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

/* 美化历史记录 */
.record-item {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.delete-btn {
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    width: auto;
    margin: 0 0 0 10px;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.delete-btn:active {
    transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .record-name .delete-btn {
        margin: 5px 0 0 0;
        width: 100%;
    }
}

.nav-links {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.nav-link {
    display: block;
    padding: 10px 0;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    font-size: 14px;
}

.nav-link:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-link.active {
    background: #2980b9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
    }
    .nav-link {
        width: 100%;
    }
}

/* 教程链接特殊样式 */
.nav-link[target="_blank"] {
    background: #27ae60;  /* 使用不同的颜色区分 */
}

.nav-link[target="_blank"]:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.settings-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

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

.settings-form label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.settings-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.settings-tips {
    margin-top: 20px;
    padding: 15px;
    background: #f1f8ff;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.settings-tips p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.submit-status {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.submit-status h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    background: #fff;
}

.status-item.success {
    border-left: 4px solid #2ecc71;
}

.status-item.failed {
    border-left: 4px solid #e74c3c;
}

.status-label {
    font-weight: 500;
    margin-right: 10px;
    min-width: 100px;
}

.status-value {
    color: #666;
}

.status-value::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.success .status-value::before {
    background: #2ecc71;
}

.failed .status-value::before {
    background: #e74c3c;
}

.status-tip {
    margin-left: auto;
    font-size: 12px;
    color: #e74c3c;
}

.failed-submissions {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.failed-submissions h4 {
    margin: 0 0 15px 0;
    color: #e74c3c;
}

.failed-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.failed-item-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.failed-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.failed-item-header .name {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.failed-item-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.action-btn.copy-btn {
    background-color: #4CAF50;
    color: white;
}

.action-btn.submit-btn {
    background-color: #2196F3;
    color: white;
}

.failed-item-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.url-display {
    flex: 1;
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .failed-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .failed-item-actions {
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
        text-align: center;
    }
    
    .failed-item-body {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .url-display {
        width: 100%;
        margin-bottom: 8px;
    }
}

.status-badges {
    margin-top: 8px;
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    display: inline-block;
}

.badge.bing {
    background: #f1f8ff;
    color: #0366d6;
}

.badge.baidu {
    background: #fff1f0;
    color: #e74c3c;
}

.resubmit-btn {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.resubmit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.badge.success {
    background-color: #4CAF50;
    color: white;
}

.badge.error {
    background-color: #f44336;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
    margin: 0 5px;
}

.badge.warning {
    background-color: #FFA000;
    color: white;
}

.status-badges {
    margin-top: 5px;
}

.badge.info {
    background-color: #2196F3;
    color: white;
}

.record-item .status-badges {
    margin: 8px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge.warning {
    background-color: #FFC107;
    color: #000;
}

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

.error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

.share-url-group {
    display: flex;
    flex: 1;
    gap: 10px;
}

.share-url-group input {
    flex: 1;
    min-width: 0; /* 允许input缩小 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-url-group .copy-btn {
    flex-shrink: 0;
    margin: 0;
    width: auto;
    white-space: nowrap;
}

.status-group, .submit-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 768px) {
    .status-badges {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-url-group {
        flex-direction: column;
    }
    
    .share-url-group .copy-btn {
        width: 100%;
    }
}

/* 链接失效和未检查的特殊样式 */
.badge.error, .badge.warning {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: white;
    display: inline-block;
    margin: 0 5px;
}

.badge.error {
    background-color: #f44336;
}

.badge.warning {
    background-color: #FFA000;
}

.delete-invalid-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    padding: 0 4px;
    margin-left: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.delete-invalid-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.badge.error {
    display: inline-flex;
    align-items: center;
    padding-right: 6px;
} 