/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f7fafc;
}

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

/* 导航栏样式 */
.navbar {
    background: #ffffff;
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e2e8f0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    color: #2b6cb0;
    font-size: 1.3rem;
    font-weight: 600;
}

.nav-logo i {
    margin-right: 8px;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: #e6fffa;
    color: #2b6cb0;
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f7fafc;
    width: 220px;
    outline: none;
    font-size: 0.9rem;
}

.nav-search input:focus {
    border-color: #2b6cb0;
    background: white;
}

.nav-search i {
    position: absolute;
    right: 1rem;
    color: #718096;
}

/* 主要内容 */
main {
    margin-top: 70px;
}

/* 首页横幅 */
.hero {
    background: linear-gradient(135deg, #2b6cb0 0%, #2c5282 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 快速导航 */
.quick-nav {
    padding: 3rem 0;
    background: white;
}

.quick-nav h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2d3748;
    font-weight: 600;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #2b6cb0;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #2d3748;
    font-weight: 600;
}

.category-card p {
    color: #718096;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tool-count {
    display: inline-block;
    background: #2b6cb0;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* 工具区域 */
.tools-section {
    padding: 3rem 0;
    background: #f7fafc;
}

.tools-section:nth-child(even) {
    background: white;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-weight: 600;
}

/* 子分类标签 */
.subcategory-tabs {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.tab-btn:hover,
.tab-btn.active {
    background: #2b6cb0;
    color: white;
    border-color: #2b6cb0;
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.tool-card {
    background: white;
    padding: 1.2rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #2b6cb0;
}

.tool-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 用户推荐的工具卡片样式 */
.tool-card.user-recommended {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left: 3px solid #e53e3e;
    border: 1px solid #feb2b2;
}

.tool-card.user-recommended:hover {
    background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}

.tool-card.user-recommended .tool-icon {
    background: #e53e3e;
    color: white;
}

.tool-card.user-recommended .tool-tag {
    background: #fed7d7;
    color: #c53030;
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin-right: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b6cb0;
    color: white;
    font-size: 1.1rem;
}

.tool-info h3 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.tool-info .tool-url {
    font-size: 0.85rem;
    color: #2b6cb0;
    text-decoration: none;
}

.tool-description {
    color: #718096;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.9rem;
}

.tool-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tool-tag {
    background: #e6fffa;
    color: #2b6cb0;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 提交表单 */
.submit-section {
    padding: 3rem 0;
    background: #2b6cb0;
    color: white;
    text-align: center;
}

.submit-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.submit-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.submit-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    color: #333;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.submit-btn {
    background: white;
    color: #2b6cb0;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 页脚 */
.footer {
    background: #2d3748;
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #2b6cb0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4A90E2;
}

.footer-links a:not(:last-child)::after {
    content: '|';
    margin-left: 15px;
    color: #666;
}

/* 账号记录弹窗样式 */
.account-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.close-btn {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ffcccb;
}

.modal-body {
    padding: 25px;
}

.account-form {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

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

.save-btn,
.clear-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.save-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.clear-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.accounts-list {
    border-top: 2px solid #e9ecef;
    padding-top: 25px;
}

.accounts-list h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.account-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.account-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.account-site {
    font-weight: 600;
    color: #4A90E2;
    font-size: 16px;
}

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

.copy-btn,
.delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn {
    background: #17a2b8;
    color: white;
}

.copy-btn:hover {
    background: #138496;
}

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

.delete-btn:hover {
    background: #c82333;
}

.account-details {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.account-field {
    margin-bottom: 5px;
}

.account-field strong {
    color: #333;
}

.password-field {
    font-family: monospace;
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-left: 8px;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-search input {
        width: 200px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .subcategory-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        margin-top: 100px;
    }
    
    /* 账号记录弹窗移动端优化 */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .account-actions {
        align-self: flex-end;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links a:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .quick-nav h2,
    .tools-section h2 {
        font-size: 2rem;
    }
    
    .nav-search input {
        width: 150px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 隐藏类 */
.hidden {
    display: none;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.loading::after {
    content: '加载中...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '加载中'; }
    40% { content: '加载中.'; }
    60% { content: '加载中..'; }
    80%, 100% { content: '加载中...'; }
}