/* 工具页面通用样式 */
.tool-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.tool-right{
    overflow: hidden;
}

@media (min-width: 992px) {
    .tool-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

/* 文本域 */
.tool-textarea {
    width: 100%;
    min-height: 260px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border 0.3s;
    box-sizing: border-box;
}

.tool-textarea:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

/* 参数项 */
.param-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.param-item label {
    font-size: 14px;
    color: #444;
    font-weight: 500;
}

.param-item select,
.param-item input {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
}

.param-item select:focus,
.param-item input:focus {
    border-color: #409eff;
}

.preset-tip {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 按钮 */
.btn-primary,
.btn-secondary,
.btn-warning,
.btn-danger,
.btn-success {
    height: 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background: #409eff;
    color: #fff;
}

.btn-primary:hover {
    background: #337ecc;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-warning {
    background: #ff9800;
    color: #fff;
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-danger {
    background: #f56c6c;
    color: #fff;
}

.btn-danger:hover {
    background: #e45454;
}

.btn-success {
    background: #67c23a;
    color: #fff;
}

.btn-success:hover {
    background: #5eaf34;
}

.btn-sm {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

/* 预览区域 */
.preview-box {
    width: 100%;
    min-height: 320px;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    background: #fafbfc;
    position: relative;
    overflow: auto;
    box-sizing: border-box;
}

/* 上传 */
.upload-box {
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border 0.3s;
    display: block;
}

.upload-box:hover {
    border-color: #409eff;
}

.upload-box input {
    display: none;
}

.upload-box i {
    font-size: 40px;
    color: #409eff;
    margin-bottom: 12px;
}

.upload-box p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

#png-preview {
    max-width: 100%;
    max-height: 240px;
    margin: 10px auto 0;
    display: none;
}

/* 提示 */
.tip {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.tip p {
    margin: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tip i {
    color: #409eff;
    margin-top: 2px;
}

/* 工具类 */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

.flex-1 {
    flex: 1;
}

.gap-2 {
    gap: 8px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.w-full {
    width: 100%;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-xs {
    font-size: 12px;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-400 {
    color: #9ca3af;
}