/* 科技感主题样式 */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff00ff;
    --background-color: #0a0a0a;
    --surface-color: rgba(20, 20, 35, 0.8);
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: rgba(0, 212, 255, 0.3);
    --shadow-color: rgba(0, 212, 255, 0.2);
    --gradient-1: linear-gradient(135deg, #00d4ff, #ff00ff);
    --gradient-2: linear-gradient(135deg, #ff00ff, #00d4ff);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 科技感背景效果 */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: -1;
}

/* 动态背景粒子效果 */
@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* 头部样式 */
.tech-header {
    background: var(--surface-color);
    border-bottom: 2px solid var(--border-color);
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 模块标签导航 */
.module-tabs {
    display: flex;
    gap: 10px;
}

.module-tab {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.module-tab.active {
    background: var(--gradient-1);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--shadow-color);
}

.module-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.tech-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    margin: 0;
}

.search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.tech-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.tech-input::placeholder {
    color: var(--text-secondary);
}

.tech-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--shadow-color);
    background: rgba(255, 255, 255, 0.1);
}

.tech-button {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: var(--gradient-1);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tech-button:hover::before {
    left: 100%;
}

.tech-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow-color);
}

/* 控制按钮区域 */
.controls {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}


.add-button {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: var(--gradient-1);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.plus-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 浮动添加按钮 */
.floating-add-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    background: var(--gradient-1);
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 5px 25px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-add-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 35px var(--shadow-color);
}

/* 标签区域 */
.tags-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.tag-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-color);
}

.tag-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tag:hover {
    background: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.tag.active {
    background: var(--gradient-1);
    box-shadow: 0 0 15px var(--shadow-color);
}

/* 网站列表样式 */
.website-list {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.website-item {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.website-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.website-item:hover::before {
    transform: scaleY(1);
}

.website-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--primary-color);
}

.website-item.grid-view {
    display: flex;
    flex-direction: column;
}


.website-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}


.website-content {
    flex: 1;
}

.website-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.website-url {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 8px;
    word-break: break-all;
}

.website-url:hover {
    text-decoration: underline;
}

.website-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.website-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.website-tag {
    padding: 4px 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.website-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-button {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-button:hover {
    background: var(--gradient-1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    margin: 100px auto;
    border: 2px solid var(--border-color);
    box-shadow: 0 20px 60px var(--shadow-color);
    animation: slideUp 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.close-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.close-button:hover {
    background: rgba(255, 0, 255, 0.2);
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.submit-button {
    background: var(--gradient-1);
    border: none;
}

.cancel-button {
    background: transparent;
    border: 2px solid var(--border-color);
}

/* 玻璃态效果 */
.glass-effect {
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }

/* 响应式设计 */
@media (max-width: 768px) {
    .tech-title {
        font-size: 2rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

  
    .add-button {
        justify-content: center;
    }

    .website-list {
        grid-template-columns: 1fr;
    }

    
    .website-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: 100%;
    }

    .floating-add-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* === 标签页导航样式 === */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-button.active {
    background: var(--gradient-1);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--shadow-color);
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* === 笔记样式 === */
.notes-container {
    margin-top: 20px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.notes-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.add-note-button {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.add-note-button:hover {
    background: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.note-date {
    opacity: 0.8;
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.note-tag {
    padding: 2px 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.note-actions {
    display: flex;
    gap: 8px;
}

.note-actions .action-button {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.no-notes {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* === 笔记数量徽章 === */
.note-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-1);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px var(--shadow-color);
}

/* === 笔记预览样式 === */
.notes-preview {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.notes-count {
    color: var(--primary-color);
    font-weight: 500;
}

.match-indicator {
    color: #ff00ff;
    margin-left: 8px;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 搜索高亮样式 */
mark {
    background: var(--gradient-1);
    color: var(--text-color);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* === 笔记列表和卡片样式 === */
.note-list {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.no-results p {
    margin: 0;
}

.note-item {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.note-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.note-item:hover::before {
    transform: scaleY(1);
}

.note-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--secondary-color);
}

.note-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.note-content {
    flex: 1;
}

.note-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.note-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-website {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.note-tag {
    padding: 4px 10px;
    background: rgba(255, 0, 255, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.note-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .module-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .tech-title {
        font-size: 1.5rem;
        text-align: center;
        width: 100%;
    }

    .search-container {
        order: 2;
        width: 100%;
        max-width: none;
    }
}


/* 强制笔记列表使用网格布局 */
#noteList {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    max-width: 1200px !important;
    margin: 30px auto !important;
    padding: 0 20px !important;
}

#noteList .note-item {
    display: flex !important;
    flex-direction: column !important;
}
