/* ===== 全局 ===== */
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    /*background-color: black;*/
}

/* ===== 顶部导航 ===== */
.navbar {
    font-size: 1.4rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #222;
    z-index: 9999;
}

/* 中间导航 */
.nav-left {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 20px;
}

/* 右侧区域 */
.nav-right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.navbar a {
    color: white;
    text-decoration: none;
}

.nav-left a {
    padding: 6px 10px;
    position: relative;
    transition: all 0.2s ease;
}

.nav-left a:hover {
    opacity: 0.8;
}

.nav-left a.active {
    border-bottom: 2px solid #fff;
}

/* ===== 布局 ===== */
.layout {
    display: flex;
    margin-top: 56px;
    height: calc(100vh - 56px);
}

/* ===== 左侧工具栏 ===== */
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 20px 10px;
}

.tool-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.tool-item:hover {
    background: #ecf0f1;
}

.tool-item.active {
    background: #3498db;
    color: white;
}

/* ===== 内容区域 ===== */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

/* ===== 工具卡片 ===== */
.tool-card {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-card h2 {
    margin-top: 0;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 20px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.text-input {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.text-output {
    background: #f3f3f3;
}

/* ===== 按钮 ===== */
.buttons-container {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn.primary {
    background: #3498db;
    color: white;
}

.btn.success {
    background: #2ecc71;
    color: white;
}

.btn.info {
    background: #9b59b6;
    color: white;
}

.btn.ghost {
    background: #bdc3c7;
}