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

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

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px;
}

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

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

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

.upload-box:hover,
.upload-box.drag-over {
    border-color: #1677ff;
    background-color: #fbfdff;
}

.upload-box i {
    font-size: 36px;
    color: #999;
    margin-bottom: 12px;
}

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

.upload-box img {
    display: none;
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin: 12px auto 0;
    border-radius: 4px;
}

.upload-box.small {
    padding: 16px 12px;
}

.upload-box.small i {
    font-size: 24px;
    margin-bottom: 6px;
}

.upload-box.small img {
    max-height: 80px;
}

.file-input {
    display: none;
}

.type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.type-tab {
    border: 2px solid #e5e9f2;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #666;
    background: #fafafa;
}

.type-tab i {
    margin-right: 6px;
}

.type-tab:hover {
    border-color: #1677ff;
    color: #1677ff;
    background: #fbfdff;
}

.type-tab.active {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #1677ff;
    font-weight: 500;
}

.param-group {
    margin-bottom: 18px;
}

.param-item {
    margin-bottom: 16px;
}

.param-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.param-item input[type="text"],
.param-item input[type="number"],
.param-item select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.param-item input:focus,
.param-item select:focus {
    border-color: #1677ff;
}

.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.param-item.half {
    margin-bottom: 0;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #e5e9f2;
    border-radius: 3px;
    outline: none;
    margin-top: 6px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1677ff;
    cursor: pointer;
}

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="color"] {
    width: 44px;
    height: 36px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

.color-text {
    flex: 1;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #333;
}

.checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 132px;
}

.position-item {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e9f2;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.position-item:hover {
    border-color: #1677ff;
    background: #fbfdff;
}

.position-item.active {
    border-color: #1677ff;
    background: #1677ff;
}

.preset-tip {
    font-size: 12px;
    color: #86909c;
    margin-top: 6px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
}

.btn-primary:hover {
    background: #0d63d1;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.w-full {
    width: 100%;
}

.preview-box {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    background: #fafafa;
    overflow: auto;
}

.preview-box p {
    text-align: center;
}

.preview-box img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
}

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

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

.hidden {
    display: none !important;
}

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

.tip {
    background: #e6f4ff;
    border: 1px solid #b3d8ff;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    color: #333;
}

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

.tip i {
    margin-right: 8px;
    color: #1677ff;
}

.mr-2 {
    margin-right: 8px;
}
