@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --bg-deep: #0b0b10;
    --primary: #00f2ff;
    --accent: #7d2ae8;
    --glass: rgba(30, 32, 40, 0.85); 
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-sub: #9090a0;
    --card-radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-deep); color: var(--text-main); height: 100vh; overflow-y: auto; }

#particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.background-layer { position: fixed; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.3; }
.orb-1 { width: 300px; height: 300px; background: var(--accent); top: -50px; left: -50px; animation: float 10s infinite alternate; }
.orb-2 { width: 250px; height: 250px; background: var(--primary); bottom: -50px; right: -50px; animation: float 12s infinite alternate-reverse; }
@keyframes float { 0% { transform: translateY(0); } 100% { transform: translateY(30px); } }

header { padding: 30px 15px 15px; text-align: center; }
.logo-area h1 { font-size: 2rem; font-weight: 800; background: linear-gradient(to right, #fff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.search-wrapper { position: relative; width: 100%; max-width: 600px; margin: 20px auto 0; }
.search-wrapper input { width: 100%; padding: 12px 20px 12px 45px; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border); border-radius: 30px; color: #fff; outline: none; transition: 0.3s; }
.search-wrapper input:focus { border-color: var(--primary); background: rgba(0,0,0,0.5); }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-sub); }

.category-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 25px; position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 16, 0.9); backdrop-filter: blur(10px); padding: 15px 5px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); }
.nav-button { background: transparent; color: var(--text-sub); border: 1px solid var(--glass-border); padding: 5px 12px; border-radius: 20px; cursor: pointer; transition: 0.3s; font-size: 0.8rem; white-space: nowrap; }
.nav-button.active, .nav-button:hover { background: var(--primary); color: #000; border-color: var(--primary); font-weight: bold; }

.main-container { max-width: 1300px; margin: 0 auto; padding: 0 15px 80px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tool-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--card-radius); padding: 15px; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; gap: 8px; text-decoration: none; position: relative; overflow: hidden; min-height: 90px; }
.tool-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.icon-box { width: 30px; height: 30px; background: rgba(255,255,255,0.05); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--primary); }
.text-box h2 { font-size: 0.85rem; color: #fff; margin-bottom: 2px; font-weight: 600; }
.text-box p { font-size: 0.7rem; color: var(--text-sub); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.arrow-icon { position: absolute; right: 10px; top: 10px; font-size: 0.7rem; color: rgba(255,255,255,0.2); }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(5px); z-index: 1000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background: #13131a; width: 95%; max-width: 800px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); padding: 25px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: 0.3s; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.close-modal { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* Tools UI */
.tool-input, .tool-textarea, .tool-select { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 10px; border-radius: 6px; font-family: monospace; outline: none; margin-bottom: 10px; font-size: 14px; }
.tool-input:focus, .tool-textarea:focus { border-color: var(--primary); background: rgba(0,0,0,0.5); }
.tool-btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tool-btn { flex: 1; padding: 10px; background: var(--primary); color: #000; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; min-width: 80px; transition: 0.2s; font-size: 0.9rem; }
.tool-btn:hover { filter: brightness(1.1); }
.tool-btn.secondary { background: rgba(255,255,255,0.1); color: #fff; }
.tool-result { background: #08080a; padding: 15px; border-radius: 8px; border: 1px dashed rgba(255,255,255,0.2); color: var(--primary); font-family: monospace; word-break: break-all; white-space: pre-wrap; display: none; margin-top: 15px; max-height: 400px; overflow-y: auto; font-size: 13px; }

/* Canvas & Tables */
#paintCanvas, #barcodeCanvas { background: #fff; border-radius: 4px; display: block; margin: 10px auto; cursor: crosshair; max-width: 100%; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-top: 10px; }
.tool-table th, .tool-table td { border: 1px solid rgba(255,255,255,0.1); padding: 6px; text-align: left; }
.tool-table th { color: var(--primary); background: rgba(255,255,255,0.05); }
.color-preview { width: 100%; height: 50px; border-radius: 6px; border: 1px solid #555; margin-bottom: 10px; }

/* Calc Grid */
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-btn { aspect-ratio: 1.3; background: #2a2a35; border: none; border-radius: 6px; color: #fff; font-size: 1.2rem; cursor: pointer; }
.calc-btn.op { color: var(--primary); background: rgba(0,242,255,0.1); }
.calc-btn.eq { background: var(--primary); color: #000; grid-column: span 2; }

/* Diff Styles */
ins { background: #004d40; color: #4db6ac; text-decoration: none; padding: 2px; }
del { background: #3e2723; color: #ff8a80; text-decoration: none; padding: 2px; }

footer { text-align: center; color: var(--text-sub); padding: 30px; font-size: 0.8rem; }
/* =========================================
   沧烁大爷赏你的加群与客服按钮样式
   ========================================= */
.action-buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px; /* 和下面功能区拉开距离 */
    padding: 0 15px;
    position: relative;
    z-index: 40;
}

.action-btn {
    flex: 1;
    max-width: 220px; /* PC端限制一下宽度，别拉得跟油条一样 */
    padding: 12px 20px;
    border-radius: 30px; /* 圆角配合你那个搜索框 */
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--glass);
    backdrop-filter: blur(5px);
}

/* 加群按钮 - 用主色调 cyan */
.group-btn {
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: var(--primary);
}
.group-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    transform: translateY(-3px);
}

/* 客服按钮 - 用强调色 purple */
.cs-btn {
    border: 1px solid rgba(125, 42, 232, 0.3);
    color: #b07cff;
}
.cs-btn:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(125, 42, 232, 0.4);
    transform: translateY(-3px);
}

/* 移动端适配：屏幕小就给老子乖乖上下排！ */
@media (max-width: 480px) {
    .action-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .action-btn {
        max-width: 100%;
        width: 100%;
    }
}