* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 - 白色主题 (仿 Tailwind) */
.sidebar {
    width: 256px; /* w-64 */
    background-color: #ffffff;
    color: #4b5563; /* text-gray-600 */
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
    border-right: 1px solid #f3f4f6; /* border-gray-100 */
    z-index: 20;
    flex-shrink: 0;
    /* 固定侧边栏关键样式 */
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    padding: 24px; /* p-6 */
    border-bottom: 1px solid #f3f4f6; /* border-b border-gray-100 */
    display: flex;
    align-items: center;
}

/* JS生成的内联样式已经处理了 h2 和图标样式，这里只做兜底 */
.logo h2 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700; /* font-bold */
    color: #1f2937; /* text-gray-800 */
    margin: 0;
}

.menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0; /* py-4 */
}

.menu ul {
    list-style: none;
}

.menu li {
    padding: 12px 24px; /* px-6 py-3 */
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 4px solid transparent; /* border-r-4 border-transparent */
    color: #4b5563; /* text-gray-600 */
}

.menu li:hover {
    background-color: #f9fafb; /* hover:bg-gray-50 */
    color: #2563eb; /* hover:text-blue-600 */
}

.menu li.active {
    background-color: #eff6ff; /* bg-blue-50 */
    color: #2563eb; /* text-blue-600 */
    border-right: 4px solid #2563eb; /* border-r-4 border-blue-600 */
    /* 移除原来的左边框样式 */
    border-left: none;
}

.menu a {
    color: inherit; /* 继承 li 的颜色 */
    text-decoration: none;
    display: block;
    width: 100%;
    font-weight: 500; /* font-medium */
}

.menu-group-title {
    color: #4b5563; /* text-gray-600 */
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    padding: 16px 24px 8px 10px; /* mb-4 mt-6 pl-2 */
    margin-top: 24px;
    margin-bottom: 16px;
    margin-left: 24px;
    border-left: 4px solid #60a5fa; /* border-l-4 border-blue-400 */
    background: none;
    pointer-events: none;
    border-bottom: none; /* 移除旧样式 */
    letter-spacing: normal;
    text-transform: none;
}

.menu-group-title:first-child {
    margin-top: 0;
}

/* 内容区域样式 */
.content {
    flex: 1;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 首页欢迎部分 */
.welcome-section {
    text-align: center;
    padding: 40px 20px;
}

.welcome-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.welcome-section p {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #7f8c8d;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.tool-card {
    width: 300px;
    padding: 25px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.tool-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #2c3e50;
}

.tool-card p {
    margin-bottom: 20px;
    color: #7f8c8d;
    text-align: left;
}

.tool-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.tool-link:hover {
    background-color: #2980b9;
}

/* 通用样式 */
button {
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.input-section, .output-section {
    margin-bottom: 20px;
}

.tool-container {
    margin-top: 20px;
}

.options-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.checkbox-label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

#clear-btn {
    background-color: #3498db;
}

#clear-btn:hover {
    background-color: #2980b9;
}

#copy-btn {
    background-color: #3498db;
}

#copy-btn:hover {
    background-color: #2980b9;
}

#result-output {
    background-color: #f8f8f8;
}

/* 代码显示区域样式 */
.code-display {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-x: hidden;
    margin: 0;
    height: auto;
    overflow-y: visible;
}

.output-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.copy-btn {
    align-self: flex-start;
    margin-top: 10px;
    background-color: #3498db;
}

.copy-btn:hover {
    background-color: #2980b9;
} 