/* 工具页面通用样式 */
.tool-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-secondary);
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.tool-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-main {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sidebar-card ul {
    list-style: none;
}

.sidebar-card li {
    margin-bottom: 0.5rem;
}

.sidebar-card a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.sidebar-card a:hover {
    color: var(--primary-color);
}

/* 表单元素 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
    font-family: 'Courier New', Courier, monospace;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-full {
    width: 100%;
}

/* 结果展示 */
.result-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.result-label h3 {
    font-size: 1rem;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-icon:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
}

.result-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 100px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 使用说明 */
.usage-guide {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 3rem;
}

.usage-guide h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.usage-guide h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.usage-guide p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.usage-guide ul,
.usage-guide ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.usage-guide li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.usage-guide code {
    background-color: var(--bg-color);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .tool-content {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .result-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 特殊元素 */
.info-box {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .info-box {
    background-color: #1e3a8a;
}

.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .warning-box {
    background-color: #78350f;
}

.info-box p,
.warning-box p {
    margin: 0;
    font-size: 0.875rem;
}

