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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background: #0a0e27;
    color: #fff;
}

/* 粒子画布 */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.header-login-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 195, 255, 0.1);
    border: 2px solid rgba(0, 195, 255, 0.3);
    color: #00c3ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.header-login-btn:hover {
    background: rgba(0, 195, 255, 0.2);
    border-color: #00c3ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 195, 255, 0.3);
}

.logo {
    font-size: 60px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 195, 255, 0.6));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.title {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, #00c3ff 0%, #0070f3 50%, #7928ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 195, 255, 0.5);
    letter-spacing: 2px;
}

/* 标签页 */
.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
}

.tab-btn {
    padding: 12px 30px;
    background: rgba(0, 195, 255, 0.1);
    border: 2px solid rgba(0, 195, 255, 0.3);
    color: #00c3ff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 195, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: rgba(0, 195, 255, 0.2);
    border-color: #00c3ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 195, 255, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #00c3ff 0%, #0070f3 100%);
    border-color: #00c3ff;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 195, 255, 0.5);
}

.logout-btn {
    padding: 12px 20px;
    background: rgba(255, 77, 77, 0.1);
    border: 2px solid rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.logout-btn:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: #ff4d4d;
}

.admin-btn {
    padding: 12px 20px;
    background: rgba(0, 195, 255, 0.1);
    border: 2px solid rgba(0, 195, 255, 0.3);
    color: #00c3ff;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.admin-btn:hover {
    background: rgba(0, 195, 255, 0.2);
    border-color: #00c3ff;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0, 195, 255, 0.2);
}

.admin-tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #a0aec0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.admin-tab-btn:hover {
    color: #00c3ff;
}

.admin-tab-btn.active {
    color: #00c3ff;
    border-bottom-color: #00c3ff;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* 工具容器 */
.tools-container {
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

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

/* 工具卡片 */
.tool-card {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(0, 195, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00c3ff, #0070f3, #7928ca);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    border-color: #00c3ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 195, 255, 0.3);
    background: rgba(10, 14, 39, 0.95);
}

.tool-name {
    font-size: 22px;
    font-weight: bold;
    color: #00c3ff;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tool-prices-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tool-price-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.tool-price-item.free {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.4);
}

.tool-price-item .price-type {
    color: #00c3ff;
    font-size: 13px;
    font-weight: 500;
}

.tool-price-item .price-value {
    color: #ffd700;
    font-size: 15px;
    font-weight: bold;
}

.tool-price-item.free .price-value {
    color: #00ff88;
}

.tool-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tool-actions .edit-btn,
.tool-actions .copy-btn,
.tool-actions .delete-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid;
    text-align: center;
}

.tool-actions .edit-btn {
    background: rgba(0, 195, 255, 0.2);
    border-color: rgba(0, 195, 255, 0.4);
    color: #00c3ff;
}

.tool-actions .edit-btn:hover {
    background: rgba(0, 195, 255, 0.3);
    border-color: #00c3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 195, 255, 0.3);
}

.tool-actions .copy-btn {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

.tool-actions .copy-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.tool-actions .delete-btn {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
}

.tool-actions .delete-btn:hover {
    background: rgba(255, 77, 77, 0.3);
    border-color: #ff4d4d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

.tool-intro {
    font-size: 14px;
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 60px;
}

.tool-main-feature {
    font-size: 15px;
    color: #00c3ff;
    line-height: 1.6;
    font-weight: 500;
    background: rgba(0, 195, 255, 0.08);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #00c3ff;
    margin-bottom: 10px;
}

.tool-detailed-intro {
    font-size: 14px;
    color: #cbd5e0;
    line-height: 1.6;
    background: rgba(0, 195, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid rgba(0, 195, 255, 0.5);
}

.tool-section {
    margin-bottom: 15px;
}

.tool-section-title {
    font-size: 16px;
    color: #00c3ff;
    margin-bottom: 8px;
    font-weight: 600;
}

.tool-tutorial {
    font-size: 14px;
    color: #cbd5e0;
    line-height: 1.6;
    background: rgba(0, 195, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #00c3ff;
}

.tool-download {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00c3ff 0%, #0070f3 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.tool-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 195, 255, 0.4);
}

/* 添加工具按钮 */
.add-tool-btn {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    padding: 18px 28px;
    border-radius: 50px;
    background: linear-gradient(135deg, #00c3ff 0%, #0070f3 50%, #7928ca 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 195, 255, 0.5),
                0 0 30px rgba(0, 195, 255, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 195, 255, 0.5),
                    0 0 30px rgba(0, 195, 255, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(0, 195, 255, 0.7),
                    0 0 50px rgba(0, 195, 255, 0.5),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.add-tool-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 195, 255, 0.7),
                0 0 60px rgba(0, 195, 255, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.add-tool-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.add-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.add-tool-btn:hover .add-icon {
    transform: rotate(90deg);
}

.add-text {
    display: block;
    white-space: nowrap;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(20, 25, 50, 0.95) 100%);
    border: 2px solid rgba(0, 195, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1001;
    box-shadow: 0 10px 50px rgba(0, 195, 255, 0.3);
}

/* 工具编辑模态框需要更大的宽度和高度 */
#toolModal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 195, 255, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 195, 255, 0.3);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 195, 255, 0.5);
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #00c3ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #ff4d4d;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #00c3ff;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(0, 195, 255, 0.05);
    border: 2px solid rgba(0, 195, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    pointer-events: auto;
    -webkit-user-select: text;
    user-select: text;
}

.form-label {
    display: block;
    color: #00c3ff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 5px;
}

.form-label-small {
    display: block;
    color: #a0aec0;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    margin-top: 5px;
}

/* 价格类别容器 */
.prices-container {
    margin-bottom: 15px;
}

.price-item {
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.price-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-type-input,
.price-value-input {
    flex: 1;
    padding: 10px;
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.price-type-input {
    flex: 1.2;
}

.price-value-input {
    flex: 1;
}

.price-type-input:focus,
.price-value-input:focus {
    outline: none;
    border-color: #ffd700;
}

.btn-remove-price {
    background: rgba(255, 77, 77, 0.2);
    border: 2px solid rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-remove-price:hover {
    background: rgba(255, 77, 77, 0.4);
    transform: scale(1.1);
}

.btn-add-price {
    background: rgba(255, 215, 0, 0.1);
    border: 2px dashed rgba(255, 215, 0, 0.4);
    color: #ffd700;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
}

.btn-add-price:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

/* 功能列表容器 */
.features-container {
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.feature-item {
    background: rgba(0, 195, 255, 0.05);
    border: 2px solid rgba(0, 195, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.feature-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.feature-name-input {
    flex: 1;
    padding: 10px;
    background: rgba(0, 195, 255, 0.05);
    border: 2px solid rgba(0, 195, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.feature-name-input:focus {
    outline: none;
    border-color: #00c3ff;
}

.btn-remove-feature {
    background: rgba(255, 77, 77, 0.2);
    border: 2px solid rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-feature:hover {
    background: rgba(255, 77, 77, 0.4);
    transform: scale(1.1);
}

.feature-details-container {
    margin-bottom: 10px;
}

.detail-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.detail-item .feature-detail-input {
    flex: 1;
    padding: 8px;
    background: rgba(0, 195, 255, 0.03);
    border: 1px solid rgba(0, 195, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    min-height: 60px;
    resize: vertical;
}

.detail-item .feature-detail-input:focus {
    outline: none;
    border-color: #00c3ff;
}

.btn-remove-detail {
    background: rgba(255, 77, 77, 0.2);
    border: 1px solid rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 5px;
}

.btn-remove-detail:hover {
    background: rgba(255, 77, 77, 0.4);
}

.btn-add-feature,
.btn-add-detail {
    background: rgba(0, 195, 255, 0.1);
    border: 2px dashed rgba(0, 195, 255, 0.4);
    color: #00c3ff;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.btn-add-feature:hover,
.btn-add-detail:hover {
    background: rgba(0, 195, 255, 0.2);
    border-color: #00c3ff;
}

/* 工具卡片中的功能列表显示 */
.tool-features-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-feature-item {
    background: rgba(0, 195, 255, 0.05);
    border-left: 3px solid #00c3ff;
    padding: 12px;
    border-radius: 6px;
}

.tool-feature-name {
    font-size: 16px;
    font-weight: 600;
    color: #00c3ff;
    margin-bottom: 10px;
}

.tool-feature-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-feature-details li {
    font-size: 14px;
    color: #cbd5e0;
    line-height: 1.6;
    padding: 5px 0;
    padding-left: 15px;
    position: relative;
}

.tool-feature-details li::before {
    content: '•';
    color: #00c3ff;
    position: absolute;
    left: 0;
    font-size: 18px;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #00c3ff;
    box-shadow: 0 0 10px rgba(0, 195, 255, 0.3);
}

.modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

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

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #00c3ff 0%, #0070f3 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 195, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.error-message {
    color: #ff4d4d;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }
    
    .logo {
        font-size: 40px;
    }
    
    .header-login-btn {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .logout-btn {
        margin-left: 0;
        width: 100%;
    }
    
    .add-tool-btn {
        right: 15px;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .add-text {
        display: none;
    }
    
    .add-icon {
        width: 24px;
        height: 24px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .features-container {
        max-height: 300px;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .tool-actions .edit-btn,
    .tool-actions .copy-btn,
    .tool-actions .delete-btn {
        width: 100%;
        min-width: auto;
    }
}

